diff options
author | Jan Beulich <jbeulich@suse.com> | 2019-12-09 13:31:07 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2019-12-09 13:31:07 +0100 |
commit | 164d49cb1c9b9f7e2914cf78f64f5f57ceb07dde (patch) | |
tree | 571ed2970908cb24c1d784d62fec02de5fc24c10 /gas/config | |
parent | a8f4f6b9bc2b1273cfa94fc1f21af7bcf13012d5 (diff) | |
download | gdb-164d49cb1c9b9f7e2914cf78f64f5f57ceb07dde.zip gdb-164d49cb1c9b9f7e2914cf78f64f5f57ceb07dde.tar.gz gdb-164d49cb1c9b9f7e2914cf78f64f5f57ceb07dde.tar.bz2 |
x86/Intel: fix "near ptr" / "far ptr" handling
Commit dc2be329b950 ("i386: Only check suffix in instruction mnemonic")
broke rejecting of these for floating point insns. Fix this by setting
the "byte" operand attribute, which will now (again) cause an error.
Furthermore the diagnostic for the "far ptr" case in general and for the
"near ptr" case in the non-float cases became "invalid instruction
suffix" instead of the intended "operand size mismatch". Fix this by
also setting the "tbyte" operand attribute (no insn template accepts
both byte and tbyte operands).
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386-intel.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c index 7d0a5b8d..8eb587b 100644 --- a/gas/config/tc-i386-intel.c +++ b/gas/config/tc-i386-intel.c @@ -718,9 +718,12 @@ i386_intel_operand (char *operand_string, int got_a_float) case O_near_ptr: if (current_templates->start->opcode_modifier.jump != JUMP && current_templates->start->opcode_modifier.jump != JUMP_DWORD) - suffix = got_a_float /* so it will cause an error */ - ? BYTE_MNEM_SUFFIX - : LONG_DOUBLE_MNEM_SUFFIX; + { + /* cause an error */ + i.types[this_operand].bitfield.byte = 1; + i.types[this_operand].bitfield.tbyte = 1; + suffix = i.suffix; + } break; default: |