2012-07-10 02:34:21 +08:00
|
|
|
// REQUIRES: arm-registered-target
|
2010-06-08 11:59:28 +08:00
|
|
|
// RUN: %clang_cc1 -Wall -Werror -triple thumbv7-eabi -target-cpu cortex-a8 -O3 -emit-llvm -o - %s | FileCheck %s
|
2010-03-04 03:03:45 +08:00
|
|
|
|
|
|
|
void *f0()
|
|
|
|
{
|
|
|
|
return __builtin_thread_pointer();
|
|
|
|
}
|
2010-06-08 11:59:28 +08:00
|
|
|
|
|
|
|
void f1(char *a, char *b) {
|
|
|
|
__clear_cache(a,b);
|
|
|
|
}
|
|
|
|
|
2010-07-16 08:31:23 +08:00
|
|
|
// CHECK: call {{.*}} @__clear_cache
|
2013-02-23 12:24:36 +08:00
|
|
|
|
|
|
|
void test_eh_return_data_regno()
|
|
|
|
{
|
|
|
|
volatile int res;
|
|
|
|
res = __builtin_eh_return_data_regno(0); // CHECK: store volatile i32 0
|
|
|
|
res = __builtin_eh_return_data_regno(1); // CHECK: store volatile i32 1
|
|
|
|
}
|
2013-10-02 18:00:18 +08:00
|
|
|
|
|
|
|
void sevl() {
|
|
|
|
__builtin_arm_sevl();
|
|
|
|
}
|
|
|
|
// CHECK: call {{.*}} @llvm.arm.sevl
|
2013-11-13 05:42:50 +08:00
|
|
|
|
|
|
|
void test_barrier() {
|
|
|
|
__builtin_arm_dmb(1); //CHECK: call {{.*}} @llvm.arm.dmb(i32 1)
|
|
|
|
__builtin_arm_dsb(2); //CHECK: call {{.*}} @llvm.arm.dsb(i32 2)
|
|
|
|
}
|