mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-18 06:10:37 +00:00

This extends the target builtin support to allow language specific annotations (i.e. LANGBUILTIN). This is to allow MSVC compatibility whilst retaining the ability to have EABI targets use a __builtin_ prefix. This is merely to allow uniformity in the EABI case where the unprefixed name is provided as an alias in the header. llvm-svn: 212196
42 lines
949 B
C
42 lines
949 B
C
// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -emit-llvm -o - %s \
|
|
// RUN: | FileCheck %s -check-prefix CHECK-MSVC
|
|
// RUN: %clang_cc1 -triple armv7-eabi -emit-llvm %s -o - \
|
|
// RUN: | FileCheck %s -check-prefix CHECK-EABI
|
|
// REQUIRES: arm-registered-target
|
|
|
|
void test_yield_intrinsic() {
|
|
__yield();
|
|
}
|
|
|
|
// CHECK-MSVC: call void @llvm.arm.hint(i32 1)
|
|
// CHECK-EABI-NOT: call void @llvm.arm.hint(i32 1)
|
|
|
|
void wfe() {
|
|
__wfe();
|
|
}
|
|
|
|
// CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 2)
|
|
// CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 2)
|
|
|
|
void wfi() {
|
|
__wfi();
|
|
}
|
|
|
|
// CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 3)
|
|
// CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 3)
|
|
|
|
void sev() {
|
|
__sev();
|
|
}
|
|
|
|
// CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 4)
|
|
// CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 4)
|
|
|
|
void sevl() {
|
|
__sevl();
|
|
}
|
|
|
|
// CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 5)
|
|
// CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 5)
|
|
|