[lld] r287778 - Replace test instruction byte strings with {{.*}}
Ed Maste via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 09:09:38 PST 2016
Author: emaste
Date: Wed Nov 23 11:09:38 2016
New Revision: 287778
URL: http://llvm.org/viewvc/llvm-project?rev=287778&view=rev
Log:
Replace test instruction byte strings with {{.*}}
An upcoming change to the image base address for x86-64 (D27042) will
will change some addresses and hence the instruction encodings. We care
about the disassembled instructions, not their encodings.
Differential Revision: https://reviews.llvm.org/D27056
Modified:
lld/trunk/test/ELF/gnu-ifunc.s
lld/trunk/test/ELF/gotpc-relax-nopic.s
lld/trunk/test/ELF/no-inhibit-exec.s
lld/trunk/test/ELF/relocation-copy.s
Modified: lld/trunk/test/ELF/gnu-ifunc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gnu-ifunc.s?rev=287778&r1=287777&r2=287778&view=diff
==============================================================================
--- lld/trunk/test/ELF/gnu-ifunc.s (original)
+++ lld/trunk/test/ELF/gnu-ifunc.s Wed Nov 23 11:09:38 2016
@@ -89,26 +89,26 @@
// DISASM: Disassembly of section .text:
// DISASM-NEXT: foo:
-// DISASM-NEXT: 11000: c3 retq
+// DISASM-NEXT: 11000: {{.*}} retq
// DISASM: bar:
-// DISASM-NEXT: 11001: c3 retq
+// DISASM-NEXT: 11001: {{.*}} retq
// DISASM: _start:
-// DISASM-NEXT: 11002: e8 29 00 00 00 callq 41
-// DISASM-NEXT: 11007: e8 34 00 00 00 callq 52
-// DISASM-NEXT: 1100c: ba 58 01 01 00 movl $65880, %edx
-// DISASM-NEXT: 11011: ba 88 01 01 00 movl $65928, %edx
-// DISASM-NEXT: 11016: ba 89 01 01 00 movl $65929, %edx
+// DISASM-NEXT: 11002: {{.*}} callq 41
+// DISASM-NEXT: 11007: {{.*}} callq 52
+// DISASM-NEXT: 1100c: {{.*}} movl $65880, %edx
+// DISASM-NEXT: 11011: {{.*}} movl $65928, %edx
+// DISASM-NEXT: 11016: {{.*}} movl $65929, %edx
// DISASM-NEXT: Disassembly of section .plt:
// DISASM-NEXT: .plt:
-// DISASM-NEXT: 11020: ff 35 e2 0f 00 00 pushq 4066(%rip)
-// DISASM-NEXT: 11026: ff 25 e4 0f 00 00 jmpq *4068(%rip)
-// DISASM-NEXT: 1102c: 0f 1f 40 00 nopl (%rax)
-// DISASM-NEXT: 11030: ff 25 e2 0f 00 00 jmpq *4066(%rip)
-// DISASM-NEXT: 11036: 68 00 00 00 00 pushq $0
-// DISASM-NEXT: 1103b: e9 e0 ff ff ff jmp -32
-// DISASM-NEXT: 11040: ff 25 da 0f 00 00 jmpq *4058(%rip)
-// DISASM-NEXT: 11046: 68 01 00 00 00 pushq $1
-// DISASM-NEXT: 1104b: e9 d0 ff ff ff jmp -48
+// DISASM-NEXT: 11020: {{.*}} pushq 4066(%rip)
+// DISASM-NEXT: 11026: {{.*}} jmpq *4068(%rip)
+// DISASM-NEXT: 1102c: {{.*}} nopl (%rax)
+// DISASM-NEXT: 11030: {{.*}} jmpq *4066(%rip)
+// DISASM-NEXT: 11036: {{.*}} pushq $0
+// DISASM-NEXT: 1103b: {{.*}} jmp -32
+// DISASM-NEXT: 11040: {{.*}} jmpq *4058(%rip)
+// DISASM-NEXT: 11046: {{.*}} pushq $1
+// DISASM-NEXT: 1104b: {{.*}} jmp -48
.text
.type foo STT_GNU_IFUNC
Modified: lld/trunk/test/ELF/gotpc-relax-nopic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gotpc-relax-nopic.s?rev=287778&r1=287777&r2=287778&view=diff
==============================================================================
--- lld/trunk/test/ELF/gotpc-relax-nopic.s (original)
+++ lld/trunk/test/ELF/gotpc-relax-nopic.s Wed Nov 23 11:09:38 2016
@@ -15,15 +15,15 @@
## 73728 = 0x12000 (bar)
# DISASM: Disassembly of section .text:
# DISASM-NEXT: _start:
-# DISASM-NEXT: 11000: 48 81 d0 00 20 01 00 adcq $73728, %rax
-# DISASM-NEXT: 11007: 48 81 c3 00 20 01 00 addq $73728, %rbx
-# DISASM-NEXT: 1100e: 48 81 e1 00 20 01 00 andq $73728, %rcx
-# DISASM-NEXT: 11015: 48 81 fa 00 20 01 00 cmpq $73728, %rdx
-# DISASM-NEXT: 1101c: 48 81 cf 00 20 01 00 orq $73728, %rdi
-# DISASM-NEXT: 11023: 48 81 de 00 20 01 00 sbbq $73728, %rsi
-# DISASM-NEXT: 1102a: 48 81 ed 00 20 01 00 subq $73728, %rbp
-# DISASM-NEXT: 11031: 49 81 f0 00 20 01 00 xorq $73728, %r8
-# DISASM-NEXT: 11038: 49 f7 c7 00 20 01 00 testq $73728, %r15
+# DISASM-NEXT: 11000: {{.*}} adcq $73728, %rax
+# DISASM-NEXT: 11007: {{.*}} addq $73728, %rbx
+# DISASM-NEXT: 1100e: {{.*}} andq $73728, %rcx
+# DISASM-NEXT: 11015: {{.*}} cmpq $73728, %rdx
+# DISASM-NEXT: 1101c: {{.*}} orq $73728, %rdi
+# DISASM-NEXT: 11023: {{.*}} sbbq $73728, %rsi
+# DISASM-NEXT: 1102a: {{.*}} subq $73728, %rbp
+# DISASM-NEXT: 11031: {{.*}} xorq $73728, %r8
+# DISASM-NEXT: 11038: {{.*}} testq $73728, %r15
# RUN: ld.lld -shared %t.o -o %t2
# RUN: llvm-readobj -s -r -d %t2 | FileCheck --check-prefix=SEC-PIC %s
@@ -56,15 +56,15 @@
## 0x102a + 4207 + 7 = 0x20A0
# DISASM-PIC: Disassembly of section .text:
# DISASM-PIC-NEXT: _start:
-# DISASM-PIC-NEXT: 1000: 48 13 05 99 10 00 00 adcq 4249(%rip), %rax
-# DISASM-PIC-NEXT: 1007: 48 03 1d 92 10 00 00 addq 4242(%rip), %rbx
-# DISASM-PIC-NEXT: 100e: 48 23 0d 8b 10 00 00 andq 4235(%rip), %rcx
-# DISASM-PIC-NEXT: 1015: 48 3b 15 84 10 00 00 cmpq 4228(%rip), %rdx
-# DISASM-PIC-NEXT: 101c: 48 0b 3d 7d 10 00 00 orq 4221(%rip), %rdi
-# DISASM-PIC-NEXT: 1023: 48 1b 35 76 10 00 00 sbbq 4214(%rip), %rsi
-# DISASM-PIC-NEXT: 102a: 48 2b 2d 6f 10 00 00 subq 4207(%rip), %rbp
-# DISASM-PIC-NEXT: 1031: 4c 33 05 68 10 00 00 xorq 4200(%rip), %r8
-# DISASM-PIC-NEXT: 1038: 4c 85 3d 61 10 00 00 testq 4193(%rip), %r15
+# DISASM-PIC-NEXT: 1000: {{.*}} adcq 4249(%rip), %rax
+# DISASM-PIC-NEXT: 1007: {{.*}} addq 4242(%rip), %rbx
+# DISASM-PIC-NEXT: 100e: {{.*}} andq 4235(%rip), %rcx
+# DISASM-PIC-NEXT: 1015: {{.*}} cmpq 4228(%rip), %rdx
+# DISASM-PIC-NEXT: 101c: {{.*}} orq 4221(%rip), %rdi
+# DISASM-PIC-NEXT: 1023: {{.*}} sbbq 4214(%rip), %rsi
+# DISASM-PIC-NEXT: 102a: {{.*}} subq 4207(%rip), %rbp
+# DISASM-PIC-NEXT: 1031: {{.*}} xorq 4200(%rip), %r8
+# DISASM-PIC-NEXT: 1038: {{.*}} testq 4193(%rip), %r15
.data
.type bar, @object
Modified: lld/trunk/test/ELF/no-inhibit-exec.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/no-inhibit-exec.s?rev=287778&r1=287777&r2=287778&view=diff
==============================================================================
--- lld/trunk/test/ELF/no-inhibit-exec.s (original)
+++ lld/trunk/test/ELF/no-inhibit-exec.s Wed Nov 23 11:09:38 2016
@@ -6,7 +6,7 @@
# CHECK: Disassembly of section .text:
# CHECK-NEXT: _start
-# CHECK-NEXT: 11000: e8 fb ef fe ff callq -69637
+# CHECK-NEXT: 11000: {{.*}} callq -69637
# next code will not link without noinhibit-exec flag
# because of undefined symbol _bar
Modified: lld/trunk/test/ELF/relocation-copy.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-copy.s?rev=287778&r1=287777&r2=287778&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-copy.s (original)
+++ lld/trunk/test/ELF/relocation-copy.s Wed Nov 23 11:09:38 2016
@@ -59,9 +59,9 @@ movl $z, %edx
// 77844 = 0x13000 + 16 + 4
// CODE: Disassembly of section .text:
// CODE-NEXT: _start:
-// CODE-NEXT: 11000: c7 04 25 00 30 01 00 05 00 00 00 movl $5, 77824
-// CODE-NEXT: 1100b: c7 04 25 10 30 01 00 07 00 00 00 movl $7, 77840
-// CODE-NEXT: 11016: c7 04 25 14 30 01 00 09 00 00 00 movl $9, 77844
-// CODE-NEXT: 11021: ba 00 30 01 00 movl $77824, %edx
-// CODE-NEXT: 11026: ba 10 30 01 00 movl $77840, %edx
-// CODE-NEXT: 1102b: ba 14 30 01 00 movl $77844, %edx
+// CODE-NEXT: 11000: {{.*}} movl $5, 77824
+// CODE-NEXT: 1100b: {{.*}} movl $7, 77840
+// CODE-NEXT: 11016: {{.*}} movl $9, 77844
+// CODE-NEXT: 11021: {{.*}} movl $77824, %edx
+// CODE-NEXT: 11026: {{.*}} movl $77840, %edx
+// CODE-NEXT: 1102b: {{.*}} movl $77844, %edx
More information about the llvm-commits
mailing list