diff options
author | Martin Storsjo <martin@martin.st> | 2017-12-04 09:09:04 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2017-12-04 09:09:04 +0000 |
commit | ed043734401e9177d3456b123dfd90282557359b (patch) | |
tree | 29d43c4be31a140df14a5ab74d45fcae60b48732 /test | |
parent | 57337feb58b58eae69c5e9648a6d78e6d04421ea (diff) |
[AArch64] Allow using emulated tls on platforms other than ELF
This matches how it is done on X86.
This allows using emulated tls on windows; in MinGW environments,
native tls isn't supported at the moment.
Set the right Data*bitsDirective for windows to match the existing
tests for other platforms. Make parts of the existing tests a regex,
to allow matching .section .rdata for windows, to avoid having to
duplicate the rest of the tests for windows.
Differential Revision: https://reviews.llvm.org/D40770
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/AArch64/emutls_generic.ll | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/test/CodeGen/AArch64/emutls_generic.ll b/test/CodeGen/AArch64/emutls_generic.ll index 03473cf80ee..f205078ed41 100644 --- a/test/CodeGen/AArch64/emutls_generic.ll +++ b/test/CodeGen/AArch64/emutls_generic.ll @@ -4,6 +4,10 @@ ; RUN: | FileCheck -check-prefix=ARM_64 %s ; RUN: llc < %s -emulated-tls -mtriple=aarch64-linux-android -O3 \ ; RUN: | FileCheck -check-prefix=ARM_64 %s +; RUN: llc < %s -emulated-tls -mtriple=aarch64-windows-gnu -O3 \ +; RUN: | FileCheck -check-prefix=ARM_64 %s +; RUN: llc < %s -emulated-tls -mtriple=aarch64-apple-darwin -O3 \ +; RUN: | FileCheck -check-prefix=DARWIN %s ; Make sure that TLS symbols are emitted in expected order. @@ -46,7 +50,7 @@ entry: ; ARM_64-NEXT: .xword 0 ; ARM_64-NEXT: .xword __emutls_t.external_y ; ARM_64-NOT: __emutls_v.external_x: -; ARM_64: .section .rodata, +; ARM_64: .section .r{{o?}}data, ; ARM_64-LABEL: __emutls_t.external_y: ; ARM_64-NEXT: .byte 7 ; ARM_64: .data{{$}} @@ -57,6 +61,41 @@ entry: ; ARM_64-NEXT: .xword 16 ; ARM_64-NEXT: .xword 0 ; ARM_64-NEXT: .xword __emutls_t.internal_y -; ARM_64: .section .rodata, +; ARM_64: .section .r{{o?}}data, ; ARM_64-LABEL: __emutls_t.internal_y: ; ARM_64-NEXT: .xword 9 + +; DARWIN-LABEL: _get_external_x: +; DARWIN: ___emutls_v.external_x +; DARWIN: ___emutls_get_address +; DARWIN-LABEL: _get_external_y: +; DARWIN: ___emutls_v.external_y +; DARWIN: ___emutls_get_address +; DARWIN-LABEL: _get_internal_y: +; DARWIN: ___emutls_v.internal_y +; DARWIN: ___emutls_get_address +; DARWIN-NOT: ___emutls_t.external_x +; DARWIN-NOT: ___emutls_v.external_x: +; DARWIN: .section __DATA,__data +; DARWIN: .globl ___emutls_v.external_y +; DARWIN: .p2align 3 +; DARWIN-LABEL: ___emutls_v.external_y: +; DARWIN-NEXT: .quad 1 +; DARWIN-NEXT: .quad 2 +; DARWIN-NEXT: .quad 0 +; DARWIN-NEXT: .quad ___emutls_t.external_y +; DARWIN-NOT: ___emutls_v.external_x: +; DARWIN: .section __TEXT,__const +; DARWIN-LABEL: ___emutls_t.external_y: +; DARWIN-NEXT: .byte 7 +; DARWIN: .section __DATA,__data +; DARWIN-NOT: .globl ___emutls_v +; DARWIN: .p2align 3 +; DARWIN-LABEL: ___emutls_v.internal_y: +; DARWIN-NEXT: .quad 8 +; DARWIN-NEXT: .quad 16 +; DARWIN-NEXT: .quad 0 +; DARWIN-NEXT: .quad ___emutls_t.internal_y +; DARWIN: .section __TEXT,__const +; DARWIN-LABEL: ___emutls_t.internal_y: +; DARWIN-NEXT: .quad 9 |