diff options
author | Martin Storsjo <martin@martin.st> | 2019-05-06 21:19:07 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2019-05-06 21:19:07 +0000 |
commit | 7037a13679bfcec3c8071e1b7d9ab800f722222d (patch) | |
tree | 387f2480086f936550796eee8b065cd84ae9257f /clang/test/CodeGen/builtin-sponentry.c | |
parent | 5e100de2c7d34aa62c5e52b99ef8e9cc1d16c51a (diff) | |
download | bcm5719-llvm-7037a13679bfcec3c8071e1b7d9ab800f722222d.tar.gz bcm5719-llvm-7037a13679bfcec3c8071e1b7d9ab800f722222d.zip |
[AArch64] Add __builtin_sponentry, for calling setjmp in MinGW
In MinGW, setjmp isn't expanded as a builtin in the compiler (like it
is for MSVC), but manually hooked up as calls to the right underlying
functions in headers. Using the actual CRT's real setjmp/longjmp
functions requires this intrinsic. (Currently this is worked around by
using MinGW specific reimplementations of setjmp/longjmp on aarch64.)
Differential Revision: https://reviews.llvm.org/D61592
llvm-svn: 360082
Diffstat (limited to 'clang/test/CodeGen/builtin-sponentry.c')
-rw-r--r-- | clang/test/CodeGen/builtin-sponentry.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtin-sponentry.c b/clang/test/CodeGen/builtin-sponentry.c new file mode 100644 index 00000000000..0a850891060 --- /dev/null +++ b/clang/test/CodeGen/builtin-sponentry.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -triple aarch64-windows-gnu -Oz -emit-llvm %s -o - | FileCheck %s + +void *test_sponentry() { + return __builtin_sponentry(); +} +// CHECK-LABEL: define dso_local i8* @test_sponentry() +// CHECK: = tail call i8* @llvm.sponentry() +// CHECK: ret i8* |