diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-05-08 17:13:30 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-05-09 06:44:29 -0700 |
commit | a72d2af2c76f82cc8a198919f73585e11d0a4c60 (patch) | |
tree | 5d85f081aa606070939e56f721eadfa978b6011d /ld | |
parent | 504374b503c194bef5c6bcf432e6ef8481322880 (diff) | |
download | gdb-a72d2af2c76f82cc8a198919f73585e11d0a4c60.zip gdb-a72d2af2c76f82cc8a198919f73585e11d0a4c60.tar.gz gdb-a72d2af2c76f82cc8a198919f73585e11d0a4c60.tar.bz2 |
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.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsgdesc.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/tlspic.dd | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ld/testsuite/ld-x86-64/tlsgdesc.dd b/ld/testsuite/ld-x86-64/tlsgdesc.dd index 85b219f..88eb953 100644 --- a/ld/testsuite/ld-x86-64/tlsgdesc.dd +++ b/ld/testsuite/ld-x86-64/tlsgdesc.dd @@ -41,7 +41,7 @@ Disassembly of section .text: +[0-9a-f]+: 66 48 8d 3d ([0-9a-f]{2} ){3}[ ]+data16 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x180> +[0-9a-f]+: [0-9a-f]{2} * # -> R_X86_64_DTPMOD64 sG1 - +[0-9a-f]+: 66 66 48 e8 ([0-9a-f]{2} ){3}[ ]+data16 data16 callq [0-9a-f]+ <__tls_get_addr@plt> + +[0-9a-f]+: 66 66 48 e8 ([0-9a-f]{2} ){3}[ ]+data16 data16 rex.W callq [0-9a-f]+ <__tls_get_addr@plt> +[0-9a-f]+: [0-9a-f]{2} * # -> R_X86_64_JUMP_SLOT __tls_get_addr +[0-9a-f]+: 90[ ]+nop * @@ -66,7 +66,7 @@ Disassembly of section .text: +[0-9a-f]+: 66 48 8d 3d ([0-9a-f]{2} ){3}[ ]+data16 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x160> +[0-9a-f]+: [0-9a-f]{2} * # -> R_X86_64_DTPMOD64 sG2 - +[0-9a-f]+: 66 66 48 e8 ([0-9a-f]{2} ){3}[ ]+data16 data16 callq [0-9a-f]+ <__tls_get_addr@plt> + +[0-9a-f]+: 66 66 48 e8 ([0-9a-f]{2} ){3}[ ]+data16 data16 rex.W callq [0-9a-f]+ <__tls_get_addr@plt> +[0-9a-f]+: [0-9a-f]{2} * # -> R_X86_64_JUMP_SLOT __tls_get_addr +[0-9a-f]+: 90[ ]+nop * diff --git a/ld/testsuite/ld-x86-64/tlspic.dd b/ld/testsuite/ld-x86-64/tlspic.dd index 26d83e9..aab8181 100644 --- a/ld/testsuite/ld-x86-64/tlspic.dd +++ b/ld/testsuite/ld-x86-64/tlspic.dd @@ -20,7 +20,7 @@ Disassembly of section .text: +1008: 66 48 8d 3d ([0-9a-f]{2} ){3}[ ]+data16 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x180> +100f: [0-9a-f ]+ # -> R_X86_64_DTPMOD64 sg1 - +1010: 66 66 48 e8 [0-9a-f ]+data16 data16 callq [0-9a-f]+ <.*> + +1010: 66 66 48 e8 [0-9a-f ]+data16 data16 rex.W callq [0-9a-f]+ <.*> # -> R_X86_64_JUMP_SLOT __tls_get_addr +1017: [0-9a-f ]+ +1018: 90[ ]+nop * @@ -40,7 +40,7 @@ Disassembly of section .text: +1030: 66 48 8d 3d ([0-9a-f]{2} ){3}[ ]+data16 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x130> +1037: [0-9a-f ]+ # -> R_X86_64_DTPMOD64 [0 0x2000000000000000] - +1038: 66 66 48 e8 [0-9a-f ]+data16 data16 callq [0-9a-f]+ <.*> + +1038: 66 66 48 e8 [0-9a-f ]+data16 data16 rex.W callq [0-9a-f]+ <.*> # -> R_X86_64_JUMP_SLOT __tls_get_addr +103f: [0-9a-f ]+ +1040: 90[ ]+nop * @@ -60,7 +60,7 @@ Disassembly of section .text: +1058: 66 48 8d 3d ([0-9a-f]{2} ){3}[ ]+data16 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x1a8> +105f: [0-9a-f ]+ # -> R_X86_64_DTPMOD64 [0 0x4000000000000000] - +1060: 66 66 48 e8 [0-9a-f ]+data16 data16 callq [0-9a-f]+ <.*> + +1060: 66 66 48 e8 [0-9a-f ]+data16 data16 rex.W callq [0-9a-f]+ <.*> # -> R_X86_64_JUMP_SLOT __tls_get_addr +1067: [0-9a-f ]+ +1068: 90[ ]+nop * @@ -80,7 +80,7 @@ Disassembly of section .text: +1080: 66 48 8d 3d ([0-9a-f]{2} ){3}[ ]+data16 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x160> +1087: [0-9a-f ]+ # -> R_X86_64_DTPMOD64 [0 0x6000000000000000] - +1088: 66 66 48 e8 [0-9a-f ]+data16 data16 callq [0-9a-f]+ <.*> + +1088: 66 66 48 e8 [0-9a-f ]+data16 data16 rex.W callq [0-9a-f]+ <.*> # -> R_X86_64_JUMP_SLOT __tls_get_addr +108f: [0-9a-f ]+ +1090: 90[ ]+nop * |