x86: fold assembly dialect attributes
Now that ATTSyntax and ATTMnemonic aren't use in combination anymore, fold them and IntelSyntax into a single, enum-like attribute. Note that this shrinks i386_opcode_modifier back to 2 32-bit words (albeit that's not for long, seeing in-flight additions for APX).
This commit is contained in:
parent
7d3182d6aa
commit
35266cb139
@ -825,8 +825,7 @@ i386_intel_operand (char *operand_string, int got_a_float)
|
||||
|
||||
/* Easy checks to skip templates which won't match anyway. */
|
||||
if (this_operand >= t->operands
|
||||
|| t->opcode_modifier.attsyntax
|
||||
|| t->opcode_modifier.attmnemonic)
|
||||
|| t->opcode_modifier.dialect >= ATT_SYNTAX)
|
||||
continue;
|
||||
|
||||
switch (suffix)
|
||||
|
@ -7052,14 +7052,15 @@ match_template (char mnem_suffix)
|
||||
|
||||
/* Check AT&T mnemonic. */
|
||||
specific_error = progress (unsupported_with_intel_mnemonic);
|
||||
if (!intel_syntax && intel_mnemonic && t->opcode_modifier.attmnemonic)
|
||||
if (!intel_syntax && intel_mnemonic
|
||||
&& t->opcode_modifier.dialect == ATT_MNEMONIC)
|
||||
continue;
|
||||
|
||||
/* Check AT&T/Intel syntax. */
|
||||
specific_error = progress (unsupported_syntax);
|
||||
if (intel_syntax
|
||||
? t->opcode_modifier.attsyntax || t->opcode_modifier.attmnemonic
|
||||
: t->opcode_modifier.intelsyntax)
|
||||
? t->opcode_modifier.dialect >= ATT_SYNTAX
|
||||
: t->opcode_modifier.dialect == INTEL_SYNTAX)
|
||||
continue;
|
||||
|
||||
/* Check Intel64/AMD64 ISA. */
|
||||
|
@ -482,9 +482,7 @@ static bitfield opcode_modifiers[] =
|
||||
BITFIELD (Disp8MemShift),
|
||||
BITFIELD (Vsz),
|
||||
BITFIELD (Optimize),
|
||||
BITFIELD (ATTMnemonic),
|
||||
BITFIELD (ATTSyntax),
|
||||
BITFIELD (IntelSyntax),
|
||||
BITFIELD (Dialect),
|
||||
BITFIELD (ISA64),
|
||||
};
|
||||
|
||||
|
@ -729,12 +729,12 @@ enum
|
||||
/* Support encoding optimization. */
|
||||
Optimize,
|
||||
|
||||
/* AT&T mnemonic. */
|
||||
ATTMnemonic,
|
||||
/* AT&T syntax. */
|
||||
ATTSyntax,
|
||||
/* Intel syntax. */
|
||||
IntelSyntax,
|
||||
/* Language dialect. NOTE: Order matters! */
|
||||
#define INTEL_SYNTAX 1
|
||||
#define ATT_SYNTAX 2
|
||||
#define ATT_MNEMONIC 3
|
||||
Dialect,
|
||||
|
||||
/* ISA64: Don't change the order without other code adjustments.
|
||||
0: Common to AMD64 and Intel64.
|
||||
1: AMD64.
|
||||
@ -788,9 +788,7 @@ typedef struct i386_opcode_modifier
|
||||
unsigned int disp8memshift:3;
|
||||
unsigned int vsz:3;
|
||||
unsigned int optimize:1;
|
||||
unsigned int attmnemonic:1;
|
||||
unsigned int attsyntax:1;
|
||||
unsigned int intelsyntax:1;
|
||||
unsigned int dialect:2;
|
||||
unsigned int isa64:2;
|
||||
} i386_opcode_modifier;
|
||||
|
||||
|
@ -86,6 +86,10 @@
|
||||
#define SwapSources OperandConstraint=SWAP_SOURCES
|
||||
#define Ugh OperandConstraint=UGH
|
||||
|
||||
#define ATTSyntax Dialect=ATT_SYNTAX
|
||||
#define ATTMnemonic Dialect=ATT_MNEMONIC
|
||||
#define IntelSyntax Dialect=INTEL_SYNTAX
|
||||
|
||||
#define IgnoreSize MnemonicSize=IGNORESIZE
|
||||
#define DefaultSize MnemonicSize=DEFAULTSIZE
|
||||
|
||||
|
11229
opcodes/i386-tbl.h
11229
opcodes/i386-tbl.h
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user