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