Commit Graph

14 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
aae946128b Add heap_addr custom legalization.
The expansion of a heap_addr instruction depends on the type of heap and
its configuration, so this is handled by custom code.

Add a couple examples of heap access code to the language reference
manual.
2017-08-24 14:44:47 -07:00
Jakob Stoklund Olesen
d424589daa Allow for special purpose function arguments and return values.
Enumerate a set of special purposes for function arguments that general
purpose code needs to know about. Some of these argument purposes will
only appear in the signature of the current function, representing
things the prologue and epilogues need to know about like the link
register and callee-saved registers.

Get rid of the 'inreg' argument flag. Arguments can be pre-assigned to a
specific register instead.
2017-04-17 15:06:30 -07:00
Jakob Stoklund Olesen
18b567f88e Flatten the Value reference representation.
All values are now references into the value table, so drop the
distinction between direct and table values. Direct values don't exist
any more.

Also remove the parser support for the 'vxNN' syntax. Only 'vNN' values
can be parsed now.
2017-04-12 14:45:22 -07:00
Jakob Stoklund Olesen
0c3771bccb Ensure that the docs examples verify as Cretonne IL.
Any *.cton files in the docs directory are now included when running the
test-all.sh script. This is to ensure that the examples are in fact
correct IL.

Always print NaN and Inf floats with a sign. Print the positive ones as
+NaN and +Inf to make them easier to parse.
2017-04-10 15:28:24 -07:00
Jakob Stoklund Olesen
acf41a7c09 Add a Cretonne testing guide.
Describe the basics of Rust-level tests, and go into more detail about
the file-level tests.
2016-09-23 11:37:40 -07:00
Jakob Stoklund Olesen
8641076369 Fix Python3 compat in docs directory.
Update copyright.
2016-08-25 11:55:57 -07:00
Jakob Stoklund Olesen
8296e92ddc Move entry_block() into Layout.
The single entry block in a function is simply the first block in the layout.

Remove the 'entry' keyword from the textual IL, the lexer and parser.
2016-07-22 10:06:51 -07:00
Jakob Stoklund Olesen
f72f47aece 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
ad07f67331 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
4bd4efaf67 Load, store, local variables. 2016-01-22 15:47:15 -08:00
Jakob Stoklund Olesen
cdc0047ee1 Expand on control flow and direct function calls.
Define the syntax for function signatures.
2016-01-22 13:47:53 -08:00
Jakob Olesen
e238df3e7c 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
c228c0b3ae Switch SIMD type spelling to i32x4.
Add support for 'type variables' in type directives.
2016-01-21 16:39:45 -08:00
Jakob Olesen
fbb3174793 Cretonne pygments lexer 2016-01-20 07:13:02 -08:00