Define icmp and fcmp comparison instructions.

Add new intcc and floatcc operand types for the immediate condition codes on
these instructions.

Add new IntCompare and FloatCompare instruction formats.

Add a generic match_enum() parser function that can match any identifier-like
enumerated operand kind that implements FromStr.

Define the icmp and fcmp instructions in case.py. Include documentation for the
condition codes with these two instructions.
This commit is contained in:
Jakob Stoklund Olesen
2016-07-07 11:20:56 -07:00
parent 70507a3be0
commit 5d8fb0fdc3
9 changed files with 218 additions and 52 deletions

View File

@@ -8,7 +8,7 @@ in this module.
from . import InstructionFormat, value, variable_args
from immediates import imm64, uimm8, ieee32, ieee64, immvector
from immediates import imm64, uimm8, ieee32, ieee64, immvector, intcc, floatcc
from entities import ebb, function, jump_table
Nullary = InstructionFormat()
@@ -33,6 +33,9 @@ Select = InstructionFormat(value, value, value, typevar_operand=1)
InsertLane = InstructionFormat(value, uimm8, value)
ExtractLane = InstructionFormat(value, uimm8)
IntCompare = InstructionFormat(intcc, value, value)
FloatCompare = InstructionFormat(floatcc, value, value)
Jump = InstructionFormat(ebb, variable_args, boxed_storage=True)
Branch = InstructionFormat(value, ebb, variable_args, boxed_storage=True)
BranchTable = InstructionFormat(value, jump_table)