Ignore 0x66 prefix for call/jmp/jcc in 64-bit mode
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 9 May 2015 00:13:30 +0000 (17:13 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 9 May 2015 13:44:29 +0000 (06:44 -0700)
commita72d2af2c76f82cc8a198919f73585e11d0a4c60
tree5d85f081aa606070939e56f721eadfa978b6011d
parent504374b503c194bef5c6bcf432e6ef8481322880
Ignore 0x66 prefix for call/jmp/jcc in 64-bit mode

The operand size prefix (0x66) is ignored for 32-bit PC-relative call,
jmp and jcc in 64-bit mode.

gas/testsuite/

PR binutis/18386
* gas/i386/i386.exp: Run x86-64-jump.
* gas/i386/x86-64-branch.d: Updated.
* gas/i386/ilp32/x86-64-branch.d: Likewise.
* gas/i386/x86-64-branch.s: Add tests for the operand size prefix
with call, jmp and jb.
* gas/i386/x86-64-jump.d: New file.
* gas/i386/x86-64-jump.s: Likewise.

ld/testsuite/

PR binutis/18386
* ld-x86-64/tlsgdesc.dd: Updated.
* ld-x86-64/tlspic.dd: Likewise.

opcodes/

PR binutis/18386
* i386-dis.c (X86_64_E8): New.
(X86_64_E9): Likewise.
Update comments on 'T', 'U', 'V'.  Add comments for '^'.
(dis386): Replace callT/jmpT with X86_64_E8/X86_64_E9.
(x86_64_table): Add X86_64_E8 and X86_64_E9.
(mod_table): Replace {T|} with ^ on Jcall/Jmp.
(putop): Handle '^'.
(OP_J): Ignore the operand size prefix in 64-bit.  Don't check
REX_W.
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/ilp32/x86-64-branch.d
gas/testsuite/gas/i386/x86-64-branch.d
gas/testsuite/gas/i386/x86-64-branch.s
gas/testsuite/gas/i386/x86-64-jump.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-jump.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlsgdesc.dd
ld/testsuite/ld-x86-64/tlspic.dd
opcodes/i386-dis.c