1 // RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -emit-llvm -o - %s \
2 // RUN: | FileCheck %s -check-prefix CHECK-MSVC
4 // RUN: not %clang_cc1 -triple armv7-eabi -Werror -S -o /dev/null %s 2>&1 \
5 // RUN: | FileCheck %s -check-prefix CHECK-EABI
7 void check__dmb(void) {
11 // CHECK-MSVC: @llvm.arm.dmb(i32 0)
12 // CHECK-EABI: error: call to undeclared function '__dmb'
14 void check__dsb(void) {
18 // CHECK-MSVC: @llvm.arm.dsb(i32 0)
19 // CHECK-EABI: error: call to undeclared function '__dsb'
21 void check__isb(void) {
25 // CHECK-MSVC: @llvm.arm.isb(i32 0)
26 // CHECK-EABI: error: call to undeclared function '__isb'
28 __INT64_TYPE__
check__ldrexd(void) {
30 return __ldrexd(&i64
);
33 // CHECK-MSVC: @llvm.arm.ldrexd(ptr {{.*}})
34 // CHECK-EABI: error: call to undeclared function '__ldrexd'
36 unsigned int check_MoveFromCoprocessor(void) {
37 return _MoveFromCoprocessor(0, 0, 0, 0, 0);
40 // CHECK-MSVC: @llvm.arm.mrc(i32 0, i32 0, i32 0, i32 0, i32 0)
41 // CHECK-EABI: error: call to undeclared function '_MoveFromCoprocessor'
43 unsigned int check_MoveFromCoprocessor2(void) {
44 return _MoveFromCoprocessor2(0, 0, 0, 0, 0);
47 // CHECK-MSVC: @llvm.arm.mrc2(i32 0, i32 0, i32 0, i32 0, i32 0)
48 // CHECK-EABI: error: call to undeclared function '_MoveFromCoprocessor2'
50 void check_MoveToCoprocessor(unsigned int value
) {
51 _MoveToCoprocessor(value
, 10, 7, 1, 0, 0);
54 // CHECK-MSVC: @llvm.arm.mcr(i32 10, i32 7, i32 %{{[^,]*}}, i32 1, i32 0, i32 0)
55 // CHECK-EABI: error: call to undeclared function '_MoveToCoprocessor'
57 void check_MoveToCoprocessor2(unsigned int value
) {
58 _MoveToCoprocessor2(value
, 10, 7, 1, 0, 0);
61 // CHECK-MSVC: @llvm.arm.mcr2(i32 10, i32 7, i32 %{{[^,]*}}, i32 1, i32 0, i32 0)
62 // CHECK-EABI: error: call to undeclared function '_MoveToCoprocessor2'