diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-04-14 04:57:51 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-04-14 04:57:51 +0000 |
| commit | c8fc76b0788357e3e0f1ba6a29f25458dc18e696 (patch) | |
| tree | cd337945e34a86c61e22051031f60d1cbc6f73af /llvm/test/CodeGen/SPARC/globals.ll | |
| parent | 2e64d7ab1dac9f5a663e286b30badbed4dc766b9 (diff) | |
| download | bcm5719-llvm-c8fc76b0788357e3e0f1ba6a29f25458dc18e696.tar.gz bcm5719-llvm-c8fc76b0788357e3e0f1ba6a29f25458dc18e696.zip | |
Add support for the SPARC v9 abs44 code model.
This is the default model for non-PIC 64-bit code. It supports
text+data+bss linked anywhere in the low 16 TB of the address space.
llvm-svn: 179473
Diffstat (limited to 'llvm/test/CodeGen/SPARC/globals.ll')
| -rw-r--r-- | llvm/test/CodeGen/SPARC/globals.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SPARC/globals.ll b/llvm/test/CodeGen/SPARC/globals.ll index 882fe7f5103..957059d0b83 100644 --- a/llvm/test/CodeGen/SPARC/globals.ll +++ b/llvm/test/CodeGen/SPARC/globals.ll @@ -1,5 +1,6 @@ ; RUN: llc < %s -march=sparc -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s ; RUN: llc < %s -march=sparcv9 -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s +; RUN: llc < %s -march=sparcv9 -relocation-model=static -code-model=medium | FileCheck --check-prefix=abs44 %s ; RUN: llc < %s -march=sparc -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v8pic32 %s ; RUN: llc < %s -march=sparcv9 -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v9pic32 %s @@ -15,6 +16,13 @@ define zeroext i8 @loadG() { ; abs32: ldub [%[[R]]+%lo(G)], %i0 ; abs32: jmp %i7+8 +; abs44: loadG +; abs44: sethi %h44(G), %[[R1:[gilo][0-7]]] +; abs44: add %[[R1]], %m44(G), %[[R2:[gilo][0-7]]] +; abs44: sllx %[[R2]], 12, %[[R3:[gilo][0-7]]] +; abs44: ldub [%[[R3]]+%l44(G)], %i0 +; abs44: jmp %i7+8 + ; v8pic32: loadG ; v8pic32: _GLOBAL_OFFSET_TABLE_ ; v8pic32: sethi %hi(G), %[[R1:[gilo][0-7]]] |

