From 828c2a2580aa0a505e72cb8307905dd03c55d2a1 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 9 Jun 2020 08:47:31 +0200 Subject: x86-64: adjust far indirect branch handling An unwanted side effect of 5990e377e5a3 ("x86-64: Intel64 adjustments for insns dealing with far pointers") was that with -mintel64 LCALL and LJMP would now default to 64-bit operand size. Since 64-bit far branches aren't portable, the default operand size should still be 32-bit. However, since the 64-bit variant is permitted, an ambiguous operand warning should be issued. As to the actual code change, please note that the conditional surrounding the switch() that gets adjusted covers several cases which are of no interest to or benign in 64-bit mode, hence the new conditional added can be quite a bit less involved. --- gas/config/tc-i386.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gas/config') diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index c5fff6f..a5b9061 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -6836,7 +6836,9 @@ process_suffix (void) case CODE_64BIT: if (!i.tm.opcode_modifier.no_qsuf) { - i.suffix = QWORD_MNEM_SUFFIX; + if (i.tm.opcode_modifier.jump == JUMP_BYTE + || i.tm.opcode_modifier.no_lsuf) + i.suffix = QWORD_MNEM_SUFFIX; break; } /* Fall through. */ -- cgit v1.1