Split out predicates and settings.

- cdsl.predicates defines classes for describing predicates.
- cdsl.settings defines classes for describing settings.
- base.settings defines shared settings.
This commit is contained in:
Jakob Stoklund Olesen
2016-11-08 10:20:07 -08:00
parent f8545574b5
commit 2fe61e83f6
8 changed files with 276 additions and 267 deletions

View File

@@ -28,20 +28,21 @@ process if anything in the :file:`lib/cretonne/meta` directory has changed
since the last build.
.. module:: cdsl.settings
Settings
========
Settings are used by the environment embedding Cretonne to control the details
of code generation. Each setting is defined in the meta language so a compact
and consistent Rust representation can be generated. Shared settings are defined
in the :mod:`cretonne.settings` module. Some settings are specific to a target
ISA, and defined in a `settings` module under the appropriate
in the :mod:`base.settings` module. Some settings are specific to a target ISA,
and defined in a `settings` module under the appropriate
:file:`lib/cretonne/meta/isa/*` directory.
Settings can take boolean on/off values, small numbers, or explicitly enumerated
symbolic values. Each type is represented by a sub-class of :class:`Setting`:
.. currentmodule:: cretonne
.. inheritance-diagram:: Setting BoolSetting NumSetting EnumSetting
:parts: 1
@@ -70,6 +71,8 @@ a module looks like this::
Instruction descriptions
========================
.. currentmodule:: cretonne
New instructions are defined as instances of the :class:`Instruction`
class. As instruction instances are created, they are added to the currently
open :class:`InstructionGroup`.