Add an icmp_imm instruction.

Compare a scalar integer to an immediate constant. Both Intel and RISC-V
ISAs have this operation.

This requires the addition of a new IntCompareImm instruction format.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-03 09:49:44 -07:00
parent 6532cbab6c
commit 2e45365ee1
8 changed files with 48 additions and 6 deletions

View File

@@ -175,6 +175,13 @@ pub enum InstructionData {
cond: IntCC,
args: [Value; 2],
},
IntCompareImm {
opcode: Opcode,
ty: Type,
cond: IntCC,
arg: Value,
imm: Imm64,
},
FloatCompare {
opcode: Opcode,
ty: Type,