aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2019-12-09 13:29:44 +0100
committerJan Beulich <jbeulich@suse.com>2019-12-09 13:29:44 +0100
commita8f4f6b9bc2b1273cfa94fc1f21af7bcf13012d5 (patch)
tree4a4ed5ef02ef18d39fd24acdef17b60e8cc316da /gas
parent4cbda994e6c589b18c88227bf5a2fef089a18cfd (diff)
downloadfsf-binutils-gdb-a8f4f6b9bc2b1273cfa94fc1f21af7bcf13012d5.zip
fsf-binutils-gdb-a8f4f6b9bc2b1273cfa94fc1f21af7bcf13012d5.tar.gz
fsf-binutils-gdb-a8f4f6b9bc2b1273cfa94fc1f21af7bcf13012d5.tar.bz2
x86/Intel: drop pointless suffix setting for "tbyte ptr"
There are extremely few insns accepting "tbyte ptr" operand, so the "tbyte" operand flag checking done by match_operand_size() is already sufficient; the setting of the suffix has become meaningless anyway with dc2be329b950 ("i386: Only check suffix in instruction mnemonic"). Fold the code with that setting the "byte" operand flag to force an error (no insn at all accepts both "byte ptr" and tbyte ptr" operands, except for AnySize ones where the two (conflicting) recorded types don't matter (operand_size_match() doesn't call match_operand_size() in this case).
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-i386-intel.c15
2 files changed, 11 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 70aff3d..54ede43 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
2019-12-09 Jan Beulich <jbeulich@suse.com>
+ * config/tc-i386-intel.c (i386_intel_operand): Set "byte"
+ attribute suffix instead of suffix uniformly for insns not
+ possibly accepting "tbyte ptr" explicitly.
+
+2019-12-09 Jan Beulich <jbeulich@suse.com>
+
* config/tc-i386-intel.c (i386_intel_operand): Don't set suffix
for floating point insns when handling O_fword_ptr.
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index bf8d9be..7d0a5b8d 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -691,17 +691,12 @@ i386_intel_operand (char *operand_string, int got_a_float)
i.types[this_operand].bitfield.tbyte = 1;
if (got_a_float == 1)
suffix = LONG_DOUBLE_MNEM_SUFFIX;
- else if (current_templates->start->operand_types[0].bitfield.fword
- || current_templates->start->operand_types[0].bitfield.tbyte)
- {
- /* l[defgs]s, [ls][gi]dt */
- if (flag_code == CODE_64BIT)
- suffix = QWORD_MNEM_SUFFIX;
- else
- i.types[this_operand].bitfield.byte = 1; /* cause an error */
- }
+ else if ((current_templates->start->operand_types[0].bitfield.fword
+ || current_templates->start->operand_types[0].bitfield.tbyte)
+ && flag_code == CODE_64BIT)
+ suffix = QWORD_MNEM_SUFFIX; /* l[fgs]s, [ls][gi]dt */
else
- suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
+ i.types[this_operand].bitfield.byte = 1; /* cause an error */
break;
case O_oword_ptr: