diff options
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/toc-data-const.ll')
-rw-r--r-- | llvm/test/CodeGen/PowerPC/toc-data-const.ll | 69 |
1 files changed, 31 insertions, 38 deletions
diff --git a/llvm/test/CodeGen/PowerPC/toc-data-const.ll b/llvm/test/CodeGen/PowerPC/toc-data-const.ll index 5ec19cb..740032e 100644 --- a/llvm/test/CodeGen/PowerPC/toc-data-const.ll +++ b/llvm/test/CodeGen/PowerPC/toc-data-const.ll @@ -1,8 +1,5 @@ -; RUN: llc -mtriple powerpc-ibm-aix-xcoff -O0 < %s | FileCheck %s --check-prefixes=CHECK,CHECK32,NOOPT -; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -O0 < %s | FileCheck %s --check-prefixes=CHECK,CHECK64,NOOPT - -; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s --check-prefixes=CHECK,CHECK32,OPT -; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s --check-prefixes=CHECK,CHECK64,OPT +; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s --check-prefix CHECK +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s --check-prefix CHECK ; RUN: llc -filetype=obj -mtriple powerpc-ibm-aix-xcoff -verify-machineinstrs < %s -o %t32.o ; RUN: llvm-readobj %t32.o --syms --relocs | FileCheck %s --check-prefix=OBJ32 @@ -26,31 +23,27 @@ define ptr @retptr() { attributes #0 = { "toc-data" } -; CHECK-LABEL: .read: -; NOOPT: la 3, i1[TD](2) -; NOOPT: lwz 3, 0(3) -; OPT: lwz 3, i1[TD](2) +; CHECK: .read: +; CHECK: la 3, i1[TD](2) -; CHECK-LABEL: .retptr: -; CHECK: la 3, i2[TD](2) -; CHECK-NEXT: blr +; CHECK: .retptr: +; CHECK: la 3, i2[TD](2) ; CHECK-DAG: .toc ; CHECK: .extern i1[TD] -; CHECK32: .csect i2[TD],2 -; CHECK64: .csect i2[TD],3 +; CHECK: .csect i2[TD] ; OBJ32: Relocations [ ; OBJ32-NEXT: Section (index: 1) .text { ; OBJ32-NEXT: 0x2 R_TOC i1(1) 0xF -; OBJ32-NEXT: 0x22 R_TOC i2(15) 0xF +; OBJ32-NEXT: 0x26 R_TOC i2(15) 0xF ; OBJ32-NEXT: } ; OBJ32-NEXT: Section (index: 2) .data { -; OBJ32-NEXT: 0x40 R_POS .read(5) 0x1F -; OBJ32-NEXT: 0x44 R_POS TOC(13) 0x1F -; OBJ32-NEXT: 0x4C R_POS .retptr(7) 0x1F -; OBJ32-NEXT: 0x50 R_POS TOC(13) 0x1F -; OBJ32-NEXT: 0x58 R_POS i1(1) 0x1F +; OBJ32-NEXT: 0x44 R_POS .read(5) 0x1F +; OBJ32-NEXT: 0x48 R_POS TOC(13) 0x1F +; OBJ32-NEXT: 0x50 R_POS .retptr(7) 0x1F +; OBJ32-NEXT: 0x54 R_POS TOC(13) 0x1F +; OBJ32-NEXT: 0x5C R_POS i1(1) 0x1F ; OBJ32-NEXT: } ; OBJ32-NEXT: ] @@ -77,7 +70,7 @@ attributes #0 = { "toc-data" } ; OBJ32: Symbol { ; OBJ32: Index: 13 ; OBJ32-NEXT: Name: TOC -; OBJ32-NEXT: Value (RelocatableAddress): 0x58 +; OBJ32-NEXT: Value (RelocatableAddress): 0x5C ; OBJ32-NEXT: Section: .data ; OBJ32-NEXT: Type: 0x0 ; OBJ32-NEXT: StorageClass: C_HIDEXT (0x6B) @@ -97,7 +90,7 @@ attributes #0 = { "toc-data" } ; OBJ32: Symbol { ; OBJ32: Index: 15 ; OBJ32-NEXT: Name: i2 -; OBJ32-NEXT: Value (RelocatableAddress): 0x58 +; OBJ32-NEXT: Value (RelocatableAddress): 0x5C ; OBJ32-NEXT: Section: .data ; OBJ32-NEXT: Type: 0x0 ; OBJ32-NEXT: StorageClass: C_EXT (0x2) @@ -118,14 +111,14 @@ attributes #0 = { "toc-data" } ; OBJ64: Relocations [ ; OBJ64-NEXT: Section (index: 1) .text { ; OBJ64-NEXT: 0x2 R_TOC i1(1) 0xF -; OBJ64-NEXT: 0x22 R_TOC i2(15) 0xF +; OBJ64-NEXT: 0x26 R_TOC i2(15) 0xF ; OBJ64-NEXT: } ; OBJ64-NEXT: Section (index: 2) .data { -; OBJ64-NEXT: 0x40 R_POS .read(5) 0x3F -; OBJ64-NEXT: 0x48 R_POS TOC(13) 0x3F -; OBJ64-NEXT: 0x58 R_POS .retptr(7) 0x3F -; OBJ64-NEXT: 0x60 R_POS TOC(13) 0x3F -; OBJ64-NEXT: 0x70 R_POS i1(1) 0x3F +; OBJ64-NEXT: 0x48 R_POS .read(5) 0x3F +; OBJ64-NEXT: 0x50 R_POS TOC(13) 0x3F +; OBJ64-NEXT: 0x60 R_POS .retptr(7) 0x3F +; OBJ64-NEXT: 0x68 R_POS TOC(13) 0x3F +; OBJ64-NEXT: 0x78 R_POS i1(1) 0x3F ; OBJ64-NEXT: } ; OBJ64-NEXT: ] @@ -151,7 +144,7 @@ attributes #0 = { "toc-data" } ; OBJ64: Symbol { ; OBJ64: Index: 13 ; OBJ64-NEXT: Name: TOC -; OBJ64-NEXT: Value (RelocatableAddress): 0x70 +; OBJ64-NEXT: Value (RelocatableAddress): 0x78 ; OBJ64-NEXT: Section: .data ; OBJ64-NEXT: Type: 0x0 ; OBJ64-NEXT: StorageClass: C_HIDEXT (0x6B) @@ -170,7 +163,7 @@ attributes #0 = { "toc-data" } ; OBJ64: Symbol { ; OBJ64: Index: 15 ; OBJ64-NEXT: Name: i2 -; OBJ64-NEXT: Value (RelocatableAddress): 0x70 +; OBJ64-NEXT: Value (RelocatableAddress): 0x78 ; OBJ64-NEXT: Section: .data ; OBJ64-NEXT: Type: 0x0 ; OBJ64-NEXT: StorageClass: C_EXT (0x2) @@ -188,15 +181,15 @@ attributes #0 = { "toc-data" } ; OBJ64-NEXT: } ; DIS32: 00000000 <.read>: -; DIS32-NEXT: 0: 80 62 00 00 lwz 3, 0(2) +; DIS32-NEXT: 0: 38 62 00 00 addi 3, 2, 0 ; DIS32-NEXT: 00000002: R_TOC i1 -; DIS32: 00000020 <.retptr>: -; DIS32-NEXT: 20: 38 62 00 00 addi 3, 2, 0 -; DIS32-NEXT: 00000022: R_TOC i2 +; DIS32: 00000024 <.retptr>: +; DIS32-NEXT: 24: 38 62 00 00 addi 3, 2, 0 +; DIS32-NEXT: 00000026: R_TOC i2 ; DIS64: 0000000000000000 <.read>: -; DIS64-NEXT: 0: 80 62 00 00 lwz 3, 0(2) +; DIS64-NEXT: 0: 38 62 00 00 addi 3, 2, 0 ; DIS64-NEXT: 0000000000000002: R_TOC i1 -; DIS64: 0000000000000020 <.retptr>: -; DIS64-NEXT: 20: 38 62 00 00 addi 3, 2, 0 -; DIS64-NEXT: 0000000000000022: R_TOC i2 +; DIS64: 0000000000000024 <.retptr>: +; DIS64-NEXT: 24: 38 62 00 00 addi 3, 2, 0 +; DIS64-NEXT: 0000000000000026: R_TOC i2 |