aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-11-13 20:42:10 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-11-13 20:42:10 +0000
commitf16cd0d502d32721849ec650d4dfda17fb530066 (patch)
tree397095fb3297f5c9d224cc113e318d53f00427b8 /ld
parentbdea3a92b7a2c527ba40aa646d669c2c338f0a92 (diff)
downloadfsf-binutils-gdb-f16cd0d502d32721849ec650d4dfda17fb530066.zip
fsf-binutils-gdb-f16cd0d502d32721849ec650d4dfda17fb530066.tar.gz
fsf-binutils-gdb-f16cd0d502d32721849ec650d4dfda17fb530066.tar.bz2
Rewrite prefix processing.
gas/testsuite/ 2009-11-13 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run long-1, long-1-intel, x86-64-long-1, and x86-64-long-1-intel. * gas/i386/long-1-intel.d: New. * gas/i386/long-1.d: Likewise. * gas/i386/long-1.s: Likewise. * gas/i386/x86-64-long-1-intel.d: Likewise. * gas/i386/x86-64-long-1.d: Likewise. * gas/i386/x86-64-long-1.s: Likewise. * gas/i386/jump16.d: Updated for prefix processing. * gas/i386/naked.d: Likewise. * gas/i386/nops-1-core2.d: Likewise. * gas/i386/nops-1-i686.d: Likewise. * gas/i386/nops-3-i686.d: Likewise. * gas/i386/nops-4-i686.d: Likewise. * gas/i386/nops-5-i686.d: Likewise. * gas/i386/nops-5.d: Likewise. * gas/i386/prefix.d: Likewise. * gas/i386/rep.d: Likewise. * gas/i386/string-ok.d: Likewise. * gas/i386/x86-64-addr32-intel.d: Likewise. * gas/i386/x86-64-addr32.d: Likewise. * gas/i386/x86-64-cbw-intel.d: Likewise. * gas/i386/x86-64-cbw.d: Likewise. * gas/i386/x86-64-io-intel.d: Likewise. * gas/i386/x86-64-io-suffix.d: Likewise. * gas/i386/x86-64-io.d: Likewise. * gas/i386/x86-64-lwp.d: Likewise. * gas/i386/x86-64-nops-1-core2.d: Likewise. * gas/i386/x86-64-nops-1-nocona.d: Likewise. * gas/i386/x86-64-nops-1.d: Likewise. * gas/i386/x86-64-nops-2.d: Likewise. * gas/i386/x86-64-nops-3.d: Likewise. * gas/i386/x86-64-nops-4-core2.d: Likewise. * gas/i386/x86-64-nops-4.d: Likewise. * gas/i386/x86-64-nops-5-k8.d: Likewise. * gas/i386/x86-64-nops-5.d: Likewise. * gas/i386/x86-64-rep.d: Likewise. * gas/i386/x86-64-stack-intel.d: Likewise. * gas/i386/x86-64-stack-suffix.d: Likewise. * gas/i386/x86-64-stack.d: Likewise. ld/testsuite/ 2009-11-13 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/tlsbin.dd: Updated for prefix processing. * ld-x86-64/tlsgdesc.dd: Likewise. * ld-x86-64/tlsld1.dd: Likewise. * ld-x86-64/tlspic.dd: Likewise. opcodes/ 2009-11-13 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (ckprefix): Updated to return 0 if number of prefixes > 14 and record the last position for each prefix. (lock_prefix): Removed. (data_prefix): Likewise. (addr_prefix): Likewise. (repz_prefix): Likewise. (repnz_prefix): Likewise. (last_lock_prefix): New. (last_repz_prefix): Likewise. (last_repnz_prefix): Likewise. (last_data_prefix): Likewise. (last_addr_prefix): Likewise. (last_rex_prefix): Likewise. (last_seg_prefix): Likewise. (MAX_CODE_LENGTH): Likewise. (ADDR16_PREFIX): Likewise. (ADDR32_PREFIX): Likewise. (DATA16_PREFIX): Likewise. (DATA32_PREFIX): Likewise. (REP_PREFIX): Likewise. (seg_prefix): Likewise. (all_prefixes): Change size to MAX_CODE_LENGTH - 1. (prefix_name): Handle ADDR16_PREFIX, ADDR32_PREFIX, DATA16_PREFIX, DATA32_PREFIX and REP_PREFIX. (get_valid_dis386): Updated. (OP_C): Likewise. (OP_Monitor): Likewise. (REP_Fixup): Likewise. (print_insn): Display all prefixes. (putop): Set PREFIX_DATA on used_prefixes only if it is used. (intel_operand_size): Likewise. (OP_E_register): Likewise. (OP_G): Likewise. (OP_REG): Likewise. (OP_IMREG): Likewise. (OP_I): Likewise. (OP_I64): Likewise. (OP_sI): Likewise. (CRC32_Fixup): Likewise. (MOVBE_Fixup): Likewise. (OP_E_memory): Set REFIX_DATA on used_prefixes when it is used in 16bit mode. (OP_J): Set REX_W used if it is used. Set PREFIX_DATA on used_prefixes only if it is used.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-x86-64/tlsbin.dd4
-rw-r--r--ld/testsuite/ld-x86-64/tlsgdesc.dd8
-rw-r--r--ld/testsuite/ld-x86-64/tlsld1.dd2
-rw-r--r--ld/testsuite/ld-x86-64/tlspic.dd16
5 files changed, 22 insertions, 15 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e5ffab9..c6a4d7a 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2009-11-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-x86-64/tlsbin.dd: Updated for prefix processing.
+ * ld-x86-64/tlsgdesc.dd: Likewise.
+ * ld-x86-64/tlsld1.dd: Likewise.
+ * ld-x86-64/tlspic.dd: Likewise.
+
2009-11-09 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10911
diff --git a/ld/testsuite/ld-x86-64/tlsbin.dd b/ld/testsuite/ld-x86-64/tlsbin.dd
index 1ea00d0..6d0de98 100644
--- a/ld/testsuite/ld-x86-64/tlsbin.dd
+++ b/ld/testsuite/ld-x86-64/tlsbin.dd
@@ -68,7 +68,7 @@ Disassembly of section .text:
401066: 90[ ]+nop *
401067: 90[ ]+nop *
# LD -> LE
- 401068: 66 66 66 64 48 8b 04[ ]+mov %fs:0x0,%rax
+ 401068: 66 66 66 64 48 8b 04[ ]+data32 data32 data32 mov %fs:0x0,%rax
40106f: 25 00 00 00 00 *
401074: 90[ ]+nop *
401075: 90[ ]+nop *
@@ -83,7 +83,7 @@ Disassembly of section .text:
401088: 90[ ]+nop *
401089: 90[ ]+nop *
# LD -> LE against hidden variables
- 40108a: 66 66 66 64 48 8b 04[ ]+mov %fs:0x0,%rax
+ 40108a: 66 66 66 64 48 8b 04[ ]+data32 data32 data32 mov %fs:0x0,%rax
401091: 25 00 00 00 00 *
401096: 90[ ]+nop *
401097: 90[ ]+nop *
diff --git a/ld/testsuite/ld-x86-64/tlsgdesc.dd b/ld/testsuite/ld-x86-64/tlsgdesc.dd
index fab88e7..75e8da4 100644
--- a/ld/testsuite/ld-x86-64/tlsgdesc.dd
+++ b/ld/testsuite/ld-x86-64/tlsgdesc.dd
@@ -38,10 +38,10 @@ Disassembly of section .text:
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD, gd first
- +[0-9a-f]+: 66 48 8d 3d 6c 02 20[ ]+lea 0x20026c\(%rip\),%rdi +# 200690 <.*>
+ +[0-9a-f]+: 66 48 8d 3d 6c 02 20[ ]+data32 lea 0x20026c\(%rip\),%rdi +# 200690 <.*>
+[0-9a-f]+: 00 *
# -> R_X86_64_DTPMOD64 sG1
- +[0-9a-f]+: 66 66 48 e8 9c ff ff[ ]+callq [0-9a-f]+ <.*>
+ +[0-9a-f]+: 66 66 48 e8 9c ff ff[ ]+data32 data32 callq [0-9a-f]+ <.*>
+[0-9a-f]+: ff[ ]+
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+[0-9a-f]+: 90[ ]+nop *
@@ -63,10 +63,10 @@ Disassembly of section .text:
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 66 48 8d 3d 1e 02 20[ ]+lea 0x20021e\(%rip\),%rdi +# 200670 <.*>
+ +[0-9a-f]+: 66 48 8d 3d 1e 02 20[ ]+data32 lea 0x20021e\(%rip\),%rdi +# 200670 <.*>
+[0-9a-f]+: 00 *
# -> R_X86_64_DTPMOD64 sG2
- +[0-9a-f]+: 66 66 48 e8 6e ff ff[ ]+callq [0-9a-f]+ <.*>
+ +[0-9a-f]+: 66 66 48 e8 6e ff ff[ ]+data32 data32 callq [0-9a-f]+ <.*>
+[0-9a-f]+: ff[ ]+
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+[0-9a-f]+: 90[ ]+nop *
diff --git a/ld/testsuite/ld-x86-64/tlsld1.dd b/ld/testsuite/ld-x86-64/tlsld1.dd
index c10f7ff..e91ce08 100644
--- a/ld/testsuite/ld-x86-64/tlsld1.dd
+++ b/ld/testsuite/ld-x86-64/tlsld1.dd
@@ -9,5 +9,5 @@
Disassembly of section .text:
[a-f0-9]+ <_start>:
-[ ]*[a-f0-9]+: 66 66 66 64 48 8b 04 25 00 00 00 00 mov %fs:0x0,%rax
+[ ]*[a-f0-9]+: 66 66 66 64 48 8b 04 25 00 00 00 00 data32 data32 data32 mov %fs:0x0,%rax
#pass
diff --git a/ld/testsuite/ld-x86-64/tlspic.dd b/ld/testsuite/ld-x86-64/tlspic.dd
index 230d188..e1b64fc 100644
--- a/ld/testsuite/ld-x86-64/tlspic.dd
+++ b/ld/testsuite/ld-x86-64/tlspic.dd
@@ -17,10 +17,10 @@ Disassembly of section .text:
+1006: 90[ ]+nop *
+1007: 90[ ]+nop *
# GD
- +1008: 66 48 8d 3d 80 03 20[ ]+lea 0x200380\(%rip\),%rdi +# 201390 <.*>
+ +1008: 66 48 8d 3d 80 03 20[ ]+data32 lea 0x200380\(%rip\),%rdi +# 201390 <.*>
+100f: 00 *
# -> R_X86_64_DTPMOD64 sg1
- +1010: 66 66 48 e8 [0-9a-f ]+callq [0-9a-f]+ <.*>
+ +1010: 66 66 48 e8 [0-9a-f ]+data32 data32 callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+1017: [0-9a-f ]+
+1018: 90[ ]+nop *
@@ -37,10 +37,10 @@ Disassembly of section .text:
+102e: 90[ ]+nop *
+102f: 90[ ]+nop *
# GD against local variable
- +1030: 66 48 8d 3d 08 03 20[ ]+lea 0x200308\(%rip\),%rdi +# 201340 <.*>
+ +1030: 66 48 8d 3d 08 03 20[ ]+data32 lea 0x200308\(%rip\),%rdi +# 201340 <.*>
+1037: 00 *
# -> R_X86_64_DTPMOD64 [0 0x2000000000000000]
- +1038: 66 66 48 e8 [0-9a-f ]+callq [0-9a-f]+ <.*>
+ +1038: 66 66 48 e8 [0-9a-f ]+data32 data32 callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+103f: [0-9a-f ]+
+1040: 90[ ]+nop *
@@ -57,10 +57,10 @@ Disassembly of section .text:
+1056: 90[ ]+nop *
+1057: 90[ ]+nop *
# GD against hidden and local variable
- +1058: 66 48 8d 3d 58 03 20[ ]+lea 0x200358\(%rip\),%rdi +# 2013b8 <.*>
+ +1058: 66 48 8d 3d 58 03 20[ ]+data32 lea 0x200358\(%rip\),%rdi +# 2013b8 <.*>
+105f: 00 *
# -> R_X86_64_DTPMOD64 [0 0x4000000000000000]
- +1060: 66 66 48 e8 [0-9a-f ]+callq [0-9a-f]+ <.*>
+ +1060: 66 66 48 e8 [0-9a-f ]+data32 data32 callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+1067: [0-9a-f ]+
+1068: 90[ ]+nop *
@@ -77,10 +77,10 @@ Disassembly of section .text:
+107e: 90[ ]+nop *
+107f: 90[ ]+nop *
# GD against hidden but not local variable
- +1080: 66 48 8d 3d e8 02 20[ ]+lea 0x2002e8\(%rip\),%rdi +# 201370 <.*>
+ +1080: 66 48 8d 3d e8 02 20[ ]+data32 lea 0x2002e8\(%rip\),%rdi +# 201370 <.*>
+1087: 00 *
# -> R_X86_64_DTPMOD64 [0 0x6000000000000000]
- +1088: 66 66 48 e8 [0-9a-f ]+callq [0-9a-f]+ <.*>
+ +1088: 66 66 48 e8 [0-9a-f ]+data32 data32 callq [0-9a-f]+ <.*>
# -> R_X86_64_JUMP_SLOT __tls_get_addr
+108f: [0-9a-f ]+
+1090: 90[ ]+nop *