[lld] r341153 - [PPC64] Improve a test ppc64_entry_point.s
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 30 17:33:16 PDT 2018
Author: maskray
Date: Thu Aug 30 17:33:16 2018
New Revision: 341153
URL: http://llvm.org/viewvc/llvm-project?rev=341153&view=rev
Log:
[PPC64] Improve a test ppc64_entry_point.s
Rename to ppc64-entry-point.s
Deduplicate .text dump of little-endian big-endian
Added:
lld/trunk/test/ELF/ppc64-entry-point.s
- copied, changed from r341150, lld/trunk/test/ELF/ppc64_entry_point.s
Removed:
lld/trunk/test/ELF/ppc64_entry_point.s
Copied: lld/trunk/test/ELF/ppc64-entry-point.s (from r341150, lld/trunk/test/ELF/ppc64_entry_point.s)
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/ppc64-entry-point.s?p2=lld/trunk/test/ELF/ppc64-entry-point.s&p1=lld/trunk/test/ELF/ppc64_entry_point.s&r1=341150&r2=341153&rev=341153&view=diff
==============================================================================
--- lld/trunk/test/ELF/ppc64_entry_point.s (original)
+++ lld/trunk/test/ELF/ppc64-entry-point.s Thu Aug 30 17:33:16 2018
@@ -3,9 +3,11 @@
# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t
# RUN: ld.lld %t -o %t2
# RUN: llvm-objdump -D %t2 | FileCheck %s
+# RUN: llvm-objdump -D %t2 | FileCheck -check-prefix=CHECK-LE %s
# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t
# RUN: ld.lld %t -o %t2
+# RUN: llvm-objdump -D %t2 | FileCheck %s
# RUN: llvm-objdump -D %t2 | FileCheck -check-prefix=CHECK-BE %s
.text
@@ -36,14 +38,11 @@ _start:
// CHECK-NEXT: 10010004: {{.*}} addi 4, 4, 0
// CHECK-NEXT: 10010008: {{.*}} lis 5, 2
// CHECK-NEXT: 1001000c: {{.*}} addi 5, 5, -32768
-// CHECK: Disassembly of section .got:
-// CHECK-NEXT: .got:
-// CHECK-NEXT: 10020000: 00 80 02 10
-
-// CHECK-BE: 10010000: {{.*}} lis 4, 4097
-// CHECK-BE-NEXT: 10010004: {{.*}} addi 4, 4, 0
-// CHECK-BE-NEXT: 10010008: {{.*}} lis 5, 2
-// CHECK-BE-NEXT: 1001000c: {{.*}} addi 5, 5, -32768
+
+// CHECK-LE: Disassembly of section .got:
+// CHECK-LE-NEXT: .got:
+// CHECK-LE-NEXT: 10020000: 00 80 02 10
+
// CHECK-BE: Disassembly of section .got:
// CHECK-BE-NEXT: .got:
// CHECK-BE-NEXT: 10020000: 00 00 00 00 {{.*}}
Removed: lld/trunk/test/ELF/ppc64_entry_point.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/ppc64_entry_point.s?rev=341152&view=auto
==============================================================================
--- lld/trunk/test/ELF/ppc64_entry_point.s (original)
+++ lld/trunk/test/ELF/ppc64_entry_point.s (removed)
@@ -1,50 +0,0 @@
-# REQUIRES: ppc
-
-# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2
-# RUN: llvm-objdump -D %t2 | FileCheck %s
-
-# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2
-# RUN: llvm-objdump -D %t2 | FileCheck -check-prefix=CHECK-BE %s
-
-.text
-.abiversion 2
-.globl _start
-.p2align 4
-.type _start, at function
-
-_start:
-.Lfunc_begin0:
-.Lfunc_gep0:
- lis 4, .Lfunc_gep0 at ha
- addi 4, 4, .Lfunc_gep0 at l
- # now r4 should contain the address of _start
-
- lis 5, .TOC.-.Lfunc_gep0 at ha
- addi 5, 5, .TOC.-.Lfunc_gep0 at l
- # now r5 should contain the offset s.t. r4 + r5 = TOC base
-
- # exit 55
- li 0, 1
- li 3, 55
- sc
-.Lfunc_end0:
- .size _start, .Lfunc_end0-.Lfunc_begin0
-
-// CHECK: 10010000: {{.*}} lis 4, 4097
-// CHECK-NEXT: 10010004: {{.*}} addi 4, 4, 0
-// CHECK-NEXT: 10010008: {{.*}} lis 5, 2
-// CHECK-NEXT: 1001000c: {{.*}} addi 5, 5, -32768
-// CHECK: Disassembly of section .got:
-// CHECK-NEXT: .got:
-// CHECK-NEXT: 10020000: 00 80 02 10
-
-// CHECK-BE: 10010000: {{.*}} lis 4, 4097
-// CHECK-BE-NEXT: 10010004: {{.*}} addi 4, 4, 0
-// CHECK-BE-NEXT: 10010008: {{.*}} lis 5, 2
-// CHECK-BE-NEXT: 1001000c: {{.*}} addi 5, 5, -32768
-// CHECK-BE: Disassembly of section .got:
-// CHECK-BE-NEXT: .got:
-// CHECK-BE-NEXT: 10020000: 00 00 00 00 {{.*}}
-// CHECK-BE-NEXT: 10020004: 10 02 80 00 {{.*}}
More information about the llvm-commits
mailing list