aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386-intel.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-03-24 08:32:32 +0100
committerJan Beulich <jbeulich@suse.com>2021-03-24 08:32:32 +0100
commit3564871692e324301c2950679aa0fbb04c6d12dc (patch)
treedae616f226e7169fd83208a080480c97a04f01ac /gas/config/tc-i386-intel.c
parent311845694b1fd27ab869bbadd5d07969a62099f4 (diff)
downloadbinutils-3564871692e324301c2950679aa0fbb04c6d12dc.zip
binutils-3564871692e324301c2950679aa0fbb04c6d12dc.tar.gz
binutils-3564871692e324301c2950679aa0fbb04c6d12dc.tar.bz2
x86: derive mandatory prefix attribute from base opcode
Just like is already done for legacy encoded insns, record the mandatory prefix information in the respective opcode modifier field. Do this without changing the source table, but rather by deriving the values from their existing source representation.
Diffstat (limited to 'gas/config/tc-i386-intel.c')
-rw-r--r--gas/config/tc-i386-intel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index bd3d354..9b7f429 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -642,7 +642,8 @@ i386_intel_operand (char *operand_string, int got_a_float)
return 0;
if (intel_state.op_modifier != O_absent
- && current_templates->start->base_opcode != 0x8d /* lea */)
+ && (current_templates->start->opcode_modifier.opcodespace != SPACE_BASE
+ || current_templates->start->base_opcode != 0x8d /* lea */))
{
i.types[this_operand].bitfield.unspecified = 0;
@@ -666,7 +667,8 @@ i386_intel_operand (char *operand_string, int got_a_float)
if ((current_templates->start->name[0] == 'l'
&& current_templates->start->name[2] == 's'
&& current_templates->start->name[3] == 0)
- || current_templates->start->base_opcode == 0x62 /* bound */)
+ || (current_templates->start->opcode_modifier.opcodespace == SPACE_BASE
+ && current_templates->start->base_opcode == 0x62 /* bound */))
suffix = WORD_MNEM_SUFFIX;
else if (flag_code != CODE_32BIT
&& (current_templates->start->opcode_modifier.jump == JUMP
@@ -696,7 +698,8 @@ i386_intel_operand (char *operand_string, int got_a_float)
case O_qword_ptr: /* O_mmword_ptr */
i.types[this_operand].bitfield.qword = 1;
- if (current_templates->start->base_opcode == 0x62 /* bound */
+ if ((current_templates->start->opcode_modifier.opcodespace == SPACE_BASE
+ && current_templates->start->base_opcode == 0x62 /* bound */)
|| got_a_float == 1) /* "f..." */
suffix = LONG_MNEM_SUFFIX;
else