diff options
author | Kristina Brooks <kristina@nym.hush.com> | 2018-10-18 14:07:02 +0000 |
---|---|---|
committer | Kristina Brooks <kristina@nym.hush.com> | 2018-10-18 14:07:02 +0000 |
commit | 7f569b7c4f39881a1e4843f4f44ae413e67da65b (patch) | |
tree | 246c4f2a5c712e1910a57eae806c0d0d5a6389d7 /clang/test/CodeGen/indirect-tls-seg-refs.c | |
parent | 7052cb35a1fc33951be1401597154cde94acc17a (diff) | |
download | bcm5719-llvm-7f569b7c4f39881a1e4843f4f44ae413e67da65b.tar.gz bcm5719-llvm-7f569b7c4f39881a1e4843f4f44ae413e67da65b.zip |
Add support for -mno-tls-direct-seg-refs to Clang
This patch exposes functionality added in rL344723 to the Clang driver/frontend
as a flag and adds appropriate metadata.
Driver tests pass:
```
ninja check-clang-driver
-snip-
Expected Passes : 472
Expected Failures : 3
Unsupported Tests : 65
```
Odd failure in CodeGen tests but unrelated to this:
```
ninja check-clang-codegen
-snip-
/SourceCache/llvm-trunk-8.0/tools/clang/test/CodeGen/builtins-wasm.c:87:10:
error: cannot compile this builtin function yet
-snip-
Failing Tests (1):
Clang :: CodeGen/builtins-wasm.c
Expected Passes : 1250
Expected Failures : 2
Unsupported Tests : 120
Unexpected Failures: 1
```
Original commit:
[X86] Support for the mno-tls-direct-seg-refs flag
Allows to disable direct TLS segment access (%fs or %gs). GCC supports a
similar flag, it can be useful in some circumstances, e.g. when a thread
context block needs to be updated directly from user space. More info and
specific use cases: https://bugs.llvm.org/show_bug.cgi?id=16145
Patch by nruslan (Ruslan Nikolaev).
Differential Revision: https://reviews.llvm.org/D53102
llvm-svn: 344739
Diffstat (limited to 'clang/test/CodeGen/indirect-tls-seg-refs.c')
-rw-r--r-- | clang/test/CodeGen/indirect-tls-seg-refs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/indirect-tls-seg-refs.c b/clang/test/CodeGen/indirect-tls-seg-refs.c new file mode 100644 index 00000000000..26806801ad0 --- /dev/null +++ b/clang/test/CodeGen/indirect-tls-seg-refs.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - -mno-tls-direct-seg-refs | FileCheck %s -check-prefix=NO-TLSDIRECT +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s -check-prefix=TLSDIRECT + +// NO-TLSDIRECT: attributes #{{[0-9]+}} = {{{.*}} "indirect-tls-seg-refs" +// TLSDIRECT-NOT: attributes #{{[0-9]+}} = {{{.*}} "indirect-tls-seg-refs" + +void test1() { +} |