Commit Graph

18 Commits

Author SHA1 Message Date
Dan Gohman
9e48344f7f Update examples to reflect that Cretonne indices typically start at 0. 2018-04-27 06:02:59 -07:00
Dan Gohman
57cd69d8b4 Say "IR" instead of "IL".
While the specifics of these terms are debatable, "IR" generally
isn't incorrect in this context, and is the more widely recognized
term at this time.

See also the discussion in #267.

Fixes #267.
2018-03-28 22:07:26 -07:00
Jakob Stoklund Olesen
c4db4c124b Begin an Intel-specific instruction group.
Add instructions representing Intel's division instructions which use a
numerator that is twice as wide as the denominator and produce both the
quotient and remainder.

Add encodings for the x86_[su]divmodx instructions.
2017-07-18 11:20:00 -07:00
Jakob Stoklund Olesen
3176ccd131 Use the right operand when documenting type variable inference.
The meaning of format.typevar_operand changes recently to be relative to
value operands only instead of all operands. The Sphinx cton domain
wasn't updated.
2017-04-03 09:56:47 -07:00
Jakob Stoklund Olesen
cfe58d7994 Upgrade to Sphinx 1.5.3
Read the Docs is now using the latest version of Sphinx, so upgrade our
recommended version too.

As of Sphinx 1.4, index entries are 5-tuples instead of 4-tuples. Update
the Cretonne Sphinx domain to generate the new 5-tuples.

Since we're over this compatibility bump, there's no reason to recommend
a specific Sphinx version, so just go back to 'current'.
2017-03-09 10:11:37 -08:00
Jakob Stoklund Olesen
cb631dc578 Fix doc build. 2016-11-08 15:26:30 -08:00
Jakob Stoklund Olesen
0b9b956695 Split out instruction definitions.
- cdsl.instructions defines the Instruction class.
- base.instructions defines the base instruction set.
2016-11-08 12:33:50 -08:00
Jakob Stoklund Olesen
ac59376c46 Move ValueType into a new cdsl top-level module.
We want to separate the Python classes that make up the DSL used to
define the Cretonne language from the concrete definitions.

- cdsl.types defines the ValueType class hierarchy.
- base.types defines the concrete types.
2016-11-08 10:12:47 -08:00
Jakob Stoklund Olesen
6d3883cf78 Add an autoinstgroup Sphinx directive.
This directive documents an instruction group and lists all instructions
contained in the group, whether they have been documented or not.
2016-09-23 16:53:47 -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
3839281414 Define a return instruction.
It is possible to return multiple values from a function, so ReturnData contains
a VariableArgs instance.

We don't want return instructions to appear as 'return (v1)', so tweak the
printing of VariableArgs so the parantheses are added externally.
2016-07-08 16:19:26 -07:00
Jakob Stoklund Olesen
c3b76b67ca Verify restrictions on polymorphism.
Add a typevar_operand argument to the InstructionFormat constructor which
determines the operand used for inferring the controlling type variable.

Identify polymorphic instructions when they are created, determine if the
controlling type variable can be inferred from the typevar_operand, and verify
the use of type variables in the other operands.

Generate type variable summary in the documentation, including how the
controlling type variable is inferred.
2016-05-19 14:59:46 -07:00
Jakob Stoklund Olesen
b06f5ef72f Define control flow instructions.
Rename 'br' to 'jump'. We'll use jump/br to mean unconditional/conditional
control transfer respectively.
2016-05-19 09:01:40 -07:00
Jakob Olesen
20183554a4 Add Instruction and Operand classes to the meta language. 2016-04-01 10:08:57 -07:00
Jakob Olesen
19b4facbe0 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 Stoklund Olesen
4bd4efaf67 Load, store, local variables. 2016-01-22 15:47:15 -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
5638bc464f 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