[lld] r271116 - Make test more realistic.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Sat May 28 08:38:17 PDT 2016
Author: rafael
Date: Sat May 28 10:38:13 2016
New Revision: 271116
URL: http://llvm.org/viewvc/llvm-project?rev=271116&view=rev
Log:
Make test more realistic.
It doesn't make mach sense to fetch less than 64 bits from a got
entry.
Modified:
lld/trunk/test/ELF/gotpc-relax-und-dso.s
lld/trunk/test/ELF/gotpc-relax.s
lld/trunk/test/ELF/gotpcrelx.s
Modified: lld/trunk/test/ELF/gotpc-relax-und-dso.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gotpc-relax-und-dso.s?rev=271116&r1=271115&r2=271116&view=diff
==============================================================================
--- lld/trunk/test/ELF/gotpc-relax-und-dso.s (original)
+++ lld/trunk/test/ELF/gotpc-relax-und-dso.s Sat May 28 10:38:13 2016
@@ -8,9 +8,9 @@
# RELOC: Relocations [
# RELOC-NEXT: Section ({{.*}}) .rela.dyn {
-# RELOC-NEXT: 0x20A8 R_X86_64_GLOB_DAT dsofoo 0x0
-# RELOC-NEXT: 0x20B0 R_X86_64_GLOB_DAT foo 0x0
-# RELOC-NEXT: 0x20A0 R_X86_64_GLOB_DAT und 0x0
+# RELOC-NEXT: R_X86_64_GLOB_DAT dsofoo 0x0
+# RELOC-NEXT: R_X86_64_GLOB_DAT foo 0x0
+# RELOC-NEXT: R_X86_64_GLOB_DAT und 0x0
# RELOC-NEXT: }
# RELOC-NEXT: ]
@@ -18,26 +18,26 @@
# 0x1025 + 7 - 43 = 0x1001
# DISASM: Disassembly of section .text:
# DISASM-NEXT: foo:
-# DISASM-NEXT: 1000: 90 nop
+# DISASM-NEXT: nop
# DISASM: hid:
-# DISASM-NEXT: 1001: 90 nop
+# DISASM-NEXT: nop
# DISASM: _start:
-# DISASM-NEXT: 1002: 48 8b 05 97 10 00 00 movq 4247(%rip), %rax
-# DISASM-NEXT: 1009: 48 8b 05 90 10 00 00 movq 4240(%rip), %rax
-# DISASM-NEXT: 1010: 48 8b 05 91 10 00 00 movq 4241(%rip), %rax
-# DISASM-NEXT: 1017: 48 8b 05 8a 10 00 00 movq 4234(%rip), %rax
-# DISASM-NEXT: 101e: 48 8d 05 dc ff ff ff leaq -36(%rip), %rax
-# DISASM-NEXT: 1025: 48 8d 05 d5 ff ff ff leaq -43(%rip), %rax
-# DISASM-NEXT: 102c: 48 8b 05 7d 10 00 00 movq 4221(%rip), %rax
-# DISASM-NEXT: 1033: 48 8b 05 76 10 00 00 movq 4214(%rip), %rax
-# DISASM-NEXT: 103a: 8b 05 60 10 00 00 movl 4192(%rip), %eax
-# DISASM-NEXT: 1040: 8b 05 5a 10 00 00 movl 4186(%rip), %eax
-# DISASM-NEXT: 1046: 8b 05 5c 10 00 00 movl 4188(%rip), %eax
-# DISASM-NEXT: 104c: 8b 05 56 10 00 00 movl 4182(%rip), %eax
-# DISASM-NEXT: 1052: 8d 05 a9 ff ff ff leal -87(%rip), %eax
-# DISASM-NEXT: 1058: 8d 05 a3 ff ff ff leal -93(%rip), %eax
-# DISASM-NEXT: 105e: 8b 05 4c 10 00 00 movl 4172(%rip), %eax
-# DISASM-NEXT: 1064: 8b 05 46 10 00 00 movl 4166(%rip), %eax
+# DISASM-NEXT: movq 4247(%rip), %rax
+# DISASM-NEXT: movq 4240(%rip), %rax
+# DISASM-NEXT: movq 4241(%rip), %rax
+# DISASM-NEXT: movq 4234(%rip), %rax
+# DISASM-NEXT: leaq -36(%rip), %rax
+# DISASM-NEXT: leaq -43(%rip), %rax
+# DISASM-NEXT: movq 4221(%rip), %rax
+# DISASM-NEXT: movq 4214(%rip), %rax
+# DISASM-NEXT: movq 4191(%rip), %rax
+# DISASM-NEXT: movq 4184(%rip), %rax
+# DISASM-NEXT: movq 4185(%rip), %rax
+# DISASM-NEXT: movq 4178(%rip), %rax
+# DISASM-NEXT: leaq -92(%rip), %rax
+# DISASM-NEXT: leaq -99(%rip), %rax
+# DISASM-NEXT: movq 4165(%rip), %rax
+# DISASM-NEXT: movq 4158(%rip), %rax
.text
.globl foo
@@ -62,11 +62,11 @@ _start:
movq hid at GOTPCREL(%rip), %rax
movq foo at GOTPCREL(%rip), %rax
movq foo at GOTPCREL(%rip), %rax
- movl und at GOTPCREL(%rip), %eax
- movl und at GOTPCREL(%rip), %eax
- movl dsofoo at GOTPCREL(%rip), %eax
- movl dsofoo at GOTPCREL(%rip), %eax
- movl hid at GOTPCREL(%rip), %eax
- movl hid at GOTPCREL(%rip), %eax
- movl foo at GOTPCREL(%rip), %eax
- movl foo at GOTPCREL(%rip), %eax
+ movq und at GOTPCREL(%rip), %rax
+ movq und at GOTPCREL(%rip), %rax
+ movq dsofoo at GOTPCREL(%rip), %rax
+ movq dsofoo at GOTPCREL(%rip), %rax
+ movq hid at GOTPCREL(%rip), %rax
+ movq hid at GOTPCREL(%rip), %rax
+ movq foo at GOTPCREL(%rip), %rax
+ movq foo at GOTPCREL(%rip), %rax
Modified: lld/trunk/test/ELF/gotpc-relax.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gotpc-relax.s?rev=271116&r1=271115&r2=271116&view=diff
==============================================================================
--- lld/trunk/test/ELF/gotpc-relax.s (original)
+++ lld/trunk/test/ELF/gotpc-relax.s Sat May 28 10:38:13 2016
@@ -20,34 +20,34 @@
# DISASM: ifunc:
# DISASM-NEXT: 11002: c3 retq
# DISASM: _start:
-# DISASM-NEXT: 11003: 48 8d 05 f6 ff ff ff leaq -10(%rip), %rax
-# DISASM-NEXT: 1100a: 48 8d 05 ef ff ff ff leaq -17(%rip), %rax
-# DISASM-NEXT: 11011: 48 8d 05 e9 ff ff ff leaq -23(%rip), %rax
-# DISASM-NEXT: 11018: 48 8d 05 e2 ff ff ff leaq -30(%rip), %rax
-# DISASM-NEXT: 1101f: 48 8b 05 da 0f 00 00 movq 4058(%rip), %rax
-# DISASM-NEXT: 11026: 48 8b 05 d3 0f 00 00 movq 4051(%rip), %rax
-# DISASM-NEXT: 1102d: 8d 05 cd ff ff ff leal -51(%rip), %eax
-# DISASM-NEXT: 11033: 8d 05 c7 ff ff ff leal -57(%rip), %eax
-# DISASM-NEXT: 11039: 8d 05 c2 ff ff ff leal -62(%rip), %eax
-# DISASM-NEXT: 1103f: 8d 05 bc ff ff ff leal -68(%rip), %eax
-# DISASM-NEXT: 11045: 8b 05 b5 0f 00 00 movl 4021(%rip), %eax
-# DISASM-NEXT: 1104b: 8b 05 af 0f 00 00 movl 4015(%rip), %eax
-# DISASM-NEXT: 11051: 67 e8 a9 ff ff ff callq -87 <foo>
-# DISASM-NEXT: 11057: 67 e8 a3 ff ff ff callq -93 <foo>
-# DISASM-NEXT: 1105d: 67 e8 9e ff ff ff callq -98 <hid>
-# DISASM-NEXT: 11063: 67 e8 98 ff ff ff callq -104 <hid>
-# DISASM-NEXT: 11069: ff 15 91 0f 00 00 callq *3985(%rip)
-# DISASM-NEXT: 1106f: ff 15 8b 0f 00 00 callq *3979(%rip)
-# DISASM-NEXT: 11075: e9 86 ff ff ff jmp -122 <foo>
-# DISASM-NEXT: 1107a: 90 nop
-# DISASM-NEXT: 1107b: e9 80 ff ff ff jmp -128 <foo>
-# DISASM-NEXT: 11080: 90 nop
-# DISASM-NEXT: 11081: e9 7b ff ff ff jmp -133 <hid>
-# DISASM-NEXT: 11086: 90 nop
-# DISASM-NEXT: 11087: e9 75 ff ff ff jmp -139 <hid>
-# DISASM-NEXT: 1108c: 90 nop
-# DISASM-NEXT: 1108d: ff 25 6d 0f 00 00 jmpq *3949(%rip)
-# DISASM-NEXT: 11093: ff 25 67 0f 00 00 jmpq *3943(%rip)
+# DISASM-NEXT: leaq -10(%rip), %rax
+# DISASM-NEXT: leaq -17(%rip), %rax
+# DISASM-NEXT: leaq -23(%rip), %rax
+# DISASM-NEXT: leaq -30(%rip), %rax
+# DISASM-NEXT: movq 4058(%rip), %rax
+# DISASM-NEXT: movq 4051(%rip), %rax
+# DISASM-NEXT: leaq -52(%rip), %rax
+# DISASM-NEXT: leaq -59(%rip), %rax
+# DISASM-NEXT: leaq -65(%rip), %rax
+# DISASM-NEXT: leaq -72(%rip), %rax
+# DISASM-NEXT: movq 4016(%rip), %rax
+# DISASM-NEXT: movq 4009(%rip), %rax
+# DISASM-NEXT: callq -93 <foo>
+# DISASM-NEXT: callq -99 <foo>
+# DISASM-NEXT: callq -104 <hid>
+# DISASM-NEXT: callq -110 <hid>
+# DISASM-NEXT: callq *3979(%rip)
+# DISASM-NEXT: callq *3973(%rip)
+# DISASM-NEXT: jmp -128 <foo>
+# DISASM-NEXT: nop
+# DISASM-NEXT: jmp -134 <foo>
+# DISASM-NEXT: nop
+# DISASM-NEXT: jmp -139 <hid>
+# DISASM-NEXT: nop
+# DISASM-NEXT: jmp -145 <hid>
+# DISASM-NEXT: nop
+# DISASM-NEXT: jmpq *3943(%rip)
+# DISASM-NEXT: jmpq *3937(%rip)
.text
.globl foo
@@ -77,12 +77,12 @@ _start:
movq hid at GOTPCREL(%rip), %rax
movq ifunc at GOTPCREL(%rip), %rax
movq ifunc at GOTPCREL(%rip), %rax
- movl foo at GOTPCREL(%rip), %eax
- movl foo at GOTPCREL(%rip), %eax
- movl hid at GOTPCREL(%rip), %eax
- movl hid at GOTPCREL(%rip), %eax
- movl ifunc at GOTPCREL(%rip), %eax
- movl ifunc at GOTPCREL(%rip), %eax
+ movq foo at GOTPCREL(%rip), %rax
+ movq foo at GOTPCREL(%rip), %rax
+ movq hid at GOTPCREL(%rip), %rax
+ movq hid at GOTPCREL(%rip), %rax
+ movq ifunc at GOTPCREL(%rip), %rax
+ movq ifunc at GOTPCREL(%rip), %rax
call *foo at GOTPCREL(%rip)
call *foo at GOTPCREL(%rip)
Modified: lld/trunk/test/ELF/gotpcrelx.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gotpcrelx.s?rev=271116&r1=271115&r2=271116&view=diff
==============================================================================
--- lld/trunk/test/ELF/gotpcrelx.s (original)
+++ lld/trunk/test/ELF/gotpcrelx.s Sat May 28 10:38:13 2016
@@ -5,12 +5,12 @@
// RUN: llvm-readobj -s -r %t.so | FileCheck %s
movq foo at GOTPCREL(%rip), %rax
-movl bar at GOTPCREL(%rip), %eax
+movq bar at GOTPCREL(%rip), %rax
// RELS: Relocations [
// RELS-NEXT: Section ({{.*}}) .rela.text {
-// RELS-NEXT: 0x3 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
-// RELS-NEXT: 0x9 R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
+// RELS-NEXT: R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
+// RELS-NEXT: R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
// RELS-NEXT: }
// RELS-NEXT: ]
More information about the llvm-commits
mailing list