diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGen/builtins-aarch64.c | 6 | ||||
| -rw-r--r-- | clang/test/Sema/builtins-aarch64.c | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtins-aarch64.c b/clang/test/CodeGen/builtins-aarch64.c new file mode 100644 index 00000000000..8a93cb41fa4 --- /dev/null +++ b/clang/test/CodeGen/builtins-aarch64.c @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -O3 -emit-llvm -o - %s | FileCheck %s + +void f0(char *a, char *b) { + __clear_cache(a,b); +// CHECK: call {{.*}} @__clear_cache +} diff --git a/clang/test/Sema/builtins-aarch64.c b/clang/test/Sema/builtins-aarch64.c new file mode 100644 index 00000000000..03e03343eb9 --- /dev/null +++ b/clang/test/Sema/builtins-aarch64.c @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -fsyntax-only -verify %s + +void test_clear_cache_chars(char *start, char *end) { + __clear_cache(start, end); +} + +void test_clear_cache_voids(void *start, void *end) { + __clear_cache(start, end); +} + +void test_clear_cache_no_args() { + // AArch32 version of this is variadic (at least syntactically). + // However, on AArch64 GCC does not permit this call and the + // implementation I've seen would go disastrously wrong. + __clear_cache(); // expected-error {{too few arguments to function call}} +} |

