x86-64: improve handling of branches to absolute addresses
authorJan Beulich <jbeulich@suse.com>
Mon, 4 Jul 2022 06:31:21 +0000 (08:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 Jul 2022 06:31:21 +0000 (08:31 +0200)
commit9386188e95f4dee6319c51b30e2ea64b27ae0084
treeec9a18337ec0f2d2193f78c0eddc0fc2b9d9674a
parent0f2f2e7019f6c3415069a5bf5f47064d45d87571
x86-64: improve handling of branches to absolute addresses

There are two related problems here: The use of "addr32" on a direct
branch would, besides causing a warning, result in operands to be
permitted which mistakenly are refused without "addr32". Plus at some
point not too long ago I'm afraid it may have been me who regressed the
relocation addends emitted for such branches. Correct both problems,
adding a testcase to guard against regressing this again.
gas/config/tc-i386.c
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/x86-64-branch-6.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-branch-6.e [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-branch-6.s [new file with mode: 0644]