x86: Check register operand for AddrPrefixOpReg
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 30 Sep 2020 23:33:35 +0000 (16:33 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 30 Sep 2020 23:33:52 +0000 (16:33 -0700)
commit27f134698ac529f3050f5ddbd31a0ab0bbe5be99
tree4d78aee19d40896740744c7d668272fd0b186e66
parent95eb9e54a51fdb819c8525a0a33138d861f31bc8
x86: Check register operand for AddrPrefixOpReg

If the address prefix changes the register operand, we need to check the
register operand when the memory operand is RIP-relative.

PR gas/26685
* config/tc-i386.c (process_suffix): Check the register operand
for the address size prefix if the memory operand is symbol(%rip).
* testsuite/gas/i386/x86-64-enqcmd.s: Add tests with RIP-relative
addressing.
* testsuite/gas/i386/x86-64-movdir.s: Likewise.
* testsuite/gas/i386/x86-64-enqcmd-intel.d: Updated.
* testsuite/gas/i386/x86-64-enqcmd.d: Likewise.
* testsuite/gas/i386/x86-64-movdir-intel.d: Likewise.
* testsuite/gas/i386/x86-64-movdir.d: Likewise.
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/x86-64-enqcmd-intel.d
gas/testsuite/gas/i386/x86-64-enqcmd.d
gas/testsuite/gas/i386/x86-64-enqcmd.s
gas/testsuite/gas/i386/x86-64-movdir-intel.d
gas/testsuite/gas/i386/x86-64-movdir.d
gas/testsuite/gas/i386/x86-64-movdir.s