x86-64: adjust far indirect branch handling
authorJan Beulich <jbeulich@suse.com>
Tue, 9 Jun 2020 06:47:31 +0000 (08:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 9 Jun 2020 06:47:31 +0000 (08:47 +0200)
commit828c2a2580aa0a505e72cb8307905dd03c55d2a1
treee97ad7044c6f53f92233b1cc0d143c160e1f9650
parentda4977e00b73835180ccbce8a2046705fd8ade62
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/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/noreg-intel64.d [new file with mode: 0644]
gas/testsuite/gas/i386/noreg-intel64.l [new file with mode: 0644]
gas/testsuite/gas/i386/noreg-intel64.s [new file with mode: 0644]
gas/testsuite/gas/i386/noreg64.d
gas/testsuite/gas/i386/noreg64.s