Jakob Stoklund Olesen
66778dc23c
Typo.
2016-04-08 10:31:14 -07:00
Jakob Stoklund Olesen
24e0828d20
Generate a constant hash table for recognizing opcodes.
...
Use a simple quadratically probed, open addressed hash table. We could use a
parfect hash function, but it would take longer to compute in Python, and this
is not in the critical path performancewise.
2016-04-07 20:24:21 -07:00
Jakob Stoklund Olesen
3dcd2f8e58
Generate an opcode_name() function.
...
This function returning a &'static str is more primitive that the Display
implementation. It allows the opcode strings to be reused by the parser.
2016-04-07 13:49:35 -07:00
Jakob Stoklund Olesen
3a570e8b21
Add repr.rs module containing the representation of functions.
...
A function owns instructions and extended basic blocks. References to these
entities are implemented as opaque structs indexing into the functions internal
tables. This avoids fighting Rust's ownership checking and it also makes
references 4 bytes on all platforms.
SSA values are identified similarly, but with an optimization for the first
value produced by an instruction. Very few instructions will produce more than
one value, and there is an extended value table for those.
2016-04-07 11:53:37 -07:00
Jakob Stoklund Olesen
d650d551a0
Include generated Opcode enum in the immediates module.
...
Generate nice doc comments for the Opcode enum variants that 'cargo doc'
will pick up.
Include a `Display` trait implementation that prints the lower
snake-case version of the opcode name.
2016-04-06 14:55:21 -07:00
Jakob Stoklund Olesen
15f39c776c
Begin source generation.
...
Start out easy by emiting an opcodes.rs file containing an opcode enumeration.
2016-04-06 12:22:56 -07:00
Jakob Stoklund Olesen
7bf4570ba1
Add a RISC-V target.
...
Flesh out the directory structure for defining target instruction set
architectures. Use RISC-V as a startgin point because it is so simple.
2016-04-06 12:00:35 -07:00
Jakob Stoklund Olesen
936d6e523a
Give instructions a CamelCase name.
...
This will be used as the instruction name in Rust code. By making this a
property of the instruction, it can be changed by the user if desired.
2016-04-05 15:29:07 -07:00
Jakob Stoklund Olesen
6f083a310a
Collect all instructions into instruction groups.
2016-04-05 14:42:41 -07:00
Jakob Stoklund Olesen
d32d78d16c
Add scaffolding for a Python build script.
...
Hook up a Cargo build script that runs a Python script in the meta directory.
2016-04-05 13:36:04 -07:00
Jakob Stoklund Olesen
d197f8a104
Add an autohtml target to docs/Makefile.
...
This runs the convenient sphinx-autobuild web server for docs development.
2016-04-05 11:11:53 -07:00
Jakob Stoklund Olesen
043bb1aba5
Replace bool with b1, b8, b16, ...
...
The b1 type is an abstract boolean value. The others are concrete
representations.
2016-04-05 10:45:00 -07:00
Jakob Stoklund Olesen
79e765a183
Display quiet NaNs as 'NaN'.
...
This is recommended by IEEE 754-2008.
We still distinguish signaling NaNs with 'sNaN'.
2016-04-05 10:27:18 -07:00
Jakob Stoklund Olesen
5f706b0a1f
Implement IEEE immediates for binary32 and binary64.
...
Clarify the textual encoding of floating point numbers.
Don't allow decimal floating point since conversion to/from binary can produce
rounding problems on some (buggy) systems.
2016-04-01 14:40:15 -07:00
Jakob Stoklund Olesen
e5305c249b
Move constant instructions into meta.
...
Add new immediate types for floating point and vector immediates.
Use new immediates to define the constant value instructions in meta.
Split the fconst instruction into two: f32const and f64const. This prevents
confusion about the interpretation of 64 immediate bits when generating an f32
constant.
Add an immvector ImmediateType. This immediate type is variable length, and
provides all the bits of a SIMD vector directly.
2016-04-01 10:08:57 -07:00
Jakob Stoklund Olesen
c3233fb332
Move instruction definitions into meta.
...
Use the meta language to define instructions, just insert 'autoinst' references
in langref.
2016-04-01 10:08:57 -07:00
Jakob Olesen
a76a0da826
Add Instruction and Operand classes to the meta language.
2016-04-01 10:08:57 -07:00
Jakob Stoklund Olesen
38d0f626a7
Implement Imm64 in an 'immediates.rs' module.
...
Format larger immediates as hexadecimal with a multiple of 4 digits and '_'
group separators.
2016-04-01 10:08:01 -07:00
Jakob Stoklund Olesen
10903503c4
Add ImmediateType for declaring immediate operands.
2016-03-30 14:17:42 -07:00
Jakob Olesen
29481a5851
Add type variables.
2016-03-16 10:41:24 -07:00
Jakob Stoklund Olesen
4ba29e594f
Make the types module public, add documentation comments.
2016-03-11 16:06:14 -08:00
Jakob Stoklund Olesen
82e05bcbc9
Implement type representation in Rust.
...
Start the Cretonne library as a Rust crate.
2016-03-11 15:54:28 -08:00
Jakob Olesen
29cc36c8d9
Enable inheritance diagrams.
2016-02-09 08:11:20 -08:00
Jakob Olesen
06f9b65e12
Add a TypeDocumenter for Cretonne types.
...
Use the autodoc Sphinx module to add a .. autoctontype:: directive which
generates documentation for one of the types in the cretonne.types module.
2016-02-09 06:55:53 -08:00
Jakob Olesen
ec918fe332
Begin defining the meta language.
...
The Cretonne meta language is used to describe Cretonne instructions, both the
target independent ones in the base instruction set and real target
instructions.
Start by providing type definitions matching langref, and begin the meta
language reference using autodoc to pull in the PYthon definitions.
2016-02-04 19:51:38 -08:00
Jakob Olesen
f66d2a26a2
Add some more type classes.
2016-02-04 12:19:08 -08:00
Jakob Olesen
d1ed09183b
Add ReadTheDocs badge with link to documentation.
2016-02-04 11:47:25 -08:00
Jakob Olesen
5997554aed
Update README.
2016-01-23 18:03:23 -08:00
Jakob Stoklund Olesen
ec7d65d8f1
Clean up the list of operations somewhat.
2016-01-22 17:30:30 -08:00
Jakob Stoklund Olesen
519fed894b
Document heaps.
2016-01-22 16:48:11 -08:00
Jakob Stoklund Olesen
095190b1a7
Load, store, local variables.
2016-01-22 15:47:15 -08:00
Jakob Stoklund Olesen
43b4f7f4e7
Expand on control flow and direct function calls.
...
Define the syntax for function signatures.
2016-01-22 13:47:53 -08:00
Jakob Stoklund Olesen
74eb6ce901
Clarify local SSA form.
...
Rename 'local' to 'stack_slot'.
2016-01-22 12:13:38 -08:00
Jakob Olesen
189fc7dfb7
Add hexadecimal numbers to the lexer.
...
Also decimal and hexadecimal exponential notation for float constants.
2016-01-22 10:31:24 -08:00
Jakob Stoklund Olesen
45caa52622
Document control flow instructions.
2016-01-21 17:15:20 -08:00
Jakob Stoklund Olesen
a3f97e4d1f
Switch SIMD type spelling to i32x4.
...
Add support for 'type variables' in type directives.
2016-01-21 16:39:45 -08:00
Jakob Stoklund Olesen
401afdc48c
Update language reference.
...
Add a glossary and explain the overall shape of a Cretonne function.
2016-01-21 14:25:16 -08:00
Jakob Olesen
2b2b79dcf8
Add langref example
2016-01-21 11:46:30 -08:00
Jakob Olesen
36cb753c4f
Cretonne pygments lexer
2016-01-20 07:13:02 -08:00
Jakob Olesen
edb2440eaf
Emit list of todo items.
2016-01-19 19:54:33 -08:00
Jakob Olesen
b5ee157d46
Begin the intermediate language reference.
2016-01-19 19:54:33 -08:00
Jakob Olesen
c8f20534d3
Add a Cretonne domain for Sphinx.
...
Include roles for documenting IL instructions and types, including
index cross references.
2016-01-19 19:54:27 -08:00
Jakob Olesen
ae54206e66
Initial Sphinx configuration.
2016-01-12 16:51:35 -08:00
Jakob Olesen
399be07fcf
Cretonne README and LICENSE.
2016-01-12 16:51:35 -08:00