Add OperandKind to the meta language.

We have a two-level type system: OperandKinds and ValueTypes. The value types
only apply to value operands, but there are many more kinds of operands:
immediate numbers, condition codes, basic block references, etc.
This commit is contained in:
Jakob Stoklund Olesen
2016-05-12 15:59:40 -07:00
parent f1e2dffa81
commit 814231245c
4 changed files with 120 additions and 62 deletions

View File

@@ -277,10 +277,11 @@ ishl = Instruction(
When shifting a B-bits integer type, this instruction computes:
.. math::
s &:= y \pmod B, \\
a &:= x \cdot 2^s \pmod{2^B}.
s &:= y \pmod B, \\
a &:= x \cdot 2^s \pmod{2^B}.
.. todo:: Add ``ishl_imm`` variant with an immediate ``y``.
""",
ins=(x, y), outs=a)
@@ -295,8 +296,8 @@ ushr = Instruction(
When shifting a B-bits integer type, this instruction computes:
.. math::
s &:= y \pmod B, \\
a &:= \lfloor x \cdot 2^{-s} \rfloor.
s &:= y \pmod B, \\
a &:= \lfloor x \cdot 2^{-s} \rfloor.
.. todo:: Add ``ushr_imm`` variant with an immediate ``y``.
""",