Track the default member name for immediate operands.

Usually an instruction firmat has only a single immediate operand called 'imm',
or 'cond' if it is one of the condigtion codes. Add a 'default_member' field to
ImmediateKind to keep track of this default member name in the InstructionData
struct.
This commit is contained in:
Jakob Stoklund Olesen
2016-08-23 11:39:47 -07:00
parent 2dfeea67e1
commit 7ead1e3f6f
2 changed files with 12 additions and 3 deletions

View File

@@ -34,11 +34,16 @@ immvector = ImmediateKind('immvector', 'An immediate SIMD vector.')
#:
#: This enumerated operand kind is used for the :cton:inst:`icmp` instruction
#: and corresponds to the `condcodes::IntCC` Rust type.
intcc = ImmediateKind('intcc', 'An integer comparison condition code.')
intcc = ImmediateKind(
'intcc',
'An integer comparison condition code.',
default_member='cond')
#: A condition code for comparing floating point values.
#:
#: This enumerated operand kind is used for the :cton:inst:`fcmp` instruction
#: and corresponds to the `condcodes::FloatCC` Rust type.
floatcc = ImmediateKind(
'floatcc', 'A floating point comparison condition code.')
'floatcc',
'A floating point comparison condition code.',
default_member='cond')