xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/builtins-aarch64.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -fsyntax-only -verify %s
2f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -DTEST1 -fsyntax-only -verify %s
3*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple arm64-none-linux-gnu -fsyntax-only -verify %s
4*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple arm64-none-linux-gnu -DTEST1 -fsyntax-only -verify %s
5f4a2713aSLionel Sambuc 
6f4a2713aSLionel Sambuc #ifdef TEST1
7f4a2713aSLionel Sambuc void __clear_cache(void *start, void *end);
8f4a2713aSLionel Sambuc #endif
9f4a2713aSLionel Sambuc 
test_clear_cache_chars(char * start,char * end)10f4a2713aSLionel Sambuc void test_clear_cache_chars(char *start, char *end) {
11f4a2713aSLionel Sambuc   __clear_cache(start, end);
12f4a2713aSLionel Sambuc }
13f4a2713aSLionel Sambuc 
test_clear_cache_voids(void * start,void * end)14f4a2713aSLionel Sambuc void test_clear_cache_voids(void *start, void *end) {
15f4a2713aSLionel Sambuc   __clear_cache(start, end);
16f4a2713aSLionel Sambuc }
17f4a2713aSLionel Sambuc 
test_clear_cache_no_args()18f4a2713aSLionel Sambuc void test_clear_cache_no_args() {
19f4a2713aSLionel Sambuc   // AArch32 version of this is variadic (at least syntactically).
20f4a2713aSLionel Sambuc   // However, on AArch64 GCC does not permit this call and the
21f4a2713aSLionel Sambuc   // implementation I've seen would go disastrously wrong.
22f4a2713aSLionel Sambuc   __clear_cache(); // expected-error {{too few arguments to function call}}
23f4a2713aSLionel Sambuc }
24