Commit Graph

7 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
c998c79fe8 Generate code to precompute predicates.
Each ISA predicate is assigned a bit the the Flags struct, and a corresponding
method is generated.
2016-08-12 10:13:50 -07:00
Jakob Stoklund Olesen
1087aa67f0 Implement the machinery to create a TargetIsa.
Add an isa::lookup() function which serves as a target registry for creating
Box<TargetIsa> trait objects.

An isa::Builder makes it possible to confugure the trait object before it is
created.
2016-08-11 11:52:11 -07:00
Jakob Stoklund Olesen
6e6ad1ef52 Add a settings::Builder data type.
- Move detail data structures into a settings::detail module to avoid polluting
  the settings namespace.

- Rename generated data types to 'Flags' in anticipation of computed predicate
  flags that can't be set. The Flags struct is immutable.

- Use a settings::Builder struct to manipulate settings, then pass it to
  Flags::new().
2016-08-10 15:47:06 -07:00
Jakob Stoklund Olesen
56cb249e13 Add support for enumerated settings.
The EnumSetting objects can take one of 256 named values.
2016-08-09 15:13:43 -07:00
Jakob Stoklund Olesen
530234ad32 Add settings::Stringwise.
This trait allows settings to be manipulated as strings, using descriptors and
constant hash-table lookups.

Amend gen_settings.py to generate the necessary constant tables.
2016-08-09 15:04:42 -07:00
Jakob Stoklund Olesen
4efb0efb44 Add ISA-dependent settings for RISC-V. 2016-08-05 16:19:46 -07:00
Jakob Stoklund Olesen
1925c1b2c2 Scaffolding for defining settings.
Settings can be defined globally or per-ISA. They are available to code through
a generated Settings struct with accessor methods per setting.
2016-08-05 15:50:57 -07:00