Commit Graph

7 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
fc6cb2eac1 Add an isa/encoding module.
Define data types for the level 1 and level 2 hash tables. These data types are
generic over the offset integer type so they can be twice as compact for
typically small ISAs.

Use these new types when generating encoding hash tables.

Emit both level 1 and level 2 hash tables.

Define generic functions that perform lookups in the encoding tables.

Implement the TargetIsa::encode() method for RISC-V using these building
blocks.
2016-08-30 07:49:29 -07:00
Jakob Stoklund Olesen
dcf0b49b07 Add comments to the level2 hash tables concatenation.
The large LEVEL2 table consists on multiple concatenated constant hash tables.
Add comments to the generated output delineating the individual tables.
2016-08-30 07:49:29 -07:00
Jakob Stoklund Olesen
adde184042 Generate level 2 hashtables.
All of the level 2 hashtables are concatenated into one constant array per ISA.
2016-08-26 17:15:05 -07:00
Jakob Stoklund Olesen
0c8f251bee Emit encoding lists (WIP).
Compute the u16 representation of encoding lists and emit a big table
concatenating all of them. Use the UniqueSeqTable to share some table space
between CPU modes.
2016-08-26 16:07:18 -07:00
Jakob Stoklund Olesen
c1ae0c99ed Move predicate collection into TargetISA.
Add a TargetISA.finish() method which computes derived data structures after
the ISA definitions have been loaded.
2016-08-26 09:37:05 -07:00
Jakob Stoklund Olesen
7cb975ce63 Add string conversions for predicates and encodings.
This is just used for printing better comments in generated code.
2016-08-26 08:50:47 -07:00
Jakob Stoklund Olesen
0c6e0e9cb7 Generate encoding tables. (WIP).
Amend build script to generate an encodings-<isa>.rs file for each target ISA.

Emit a function that can evaluate instruction predicates.

Describe the 3-level tables used for representing insrruction encoding tables.
Add Python classes representing the tables.

The generated code is incomplete and not used anywhere yet.
2016-08-25 16:19:10 -07:00