summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/arm-microsoft-intrinsics.c
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2015-06-23 21:10:15 +0000
committerBob Wilson <bob.wilson@apple.com>2015-06-23 21:10:15 +0000
commit09aa90bbe16896e8677ee058778e332ad5af32cc (patch)
tree5a3e4394d31bef6776f79755fe0e4e15a5695dc6 /clang/test/CodeGen/arm-microsoft-intrinsics.c
parent60c915e96a6e0d26b5ecc93c4d72b5aa40216c44 (diff)
downloadbcm5719-llvm-09aa90bbe16896e8677ee058778e332ad5af32cc.tar.gz
bcm5719-llvm-09aa90bbe16896e8677ee058778e332ad5af32cc.zip
PR22560: Fix argument order for ARM _MoveToCoprocessor builtins.
The Microsoft-extension _MoveToCoprocessor and _MoveToCoprocessor2 builtins take the register value to be moved as the first argument, but the corresponding mcr and mcr2 LLVM intrinsics expect that value to be the third argument. Handle this as a special case, while still leaving those intrinsics as generic MSBuiltins. I considered the alternative of handling these in EmitARMBuiltinExpr, but that does not work well for the follow-up change that I'm going to make to improve the error handling for PR22560 -- we need the GetBuiltinType() checks for ICEArguments, and the ARM version of that code is only used for Neon intrinsics where the last argument is special and not checked in the normal way. llvm-svn: 240462
Diffstat (limited to 'clang/test/CodeGen/arm-microsoft-intrinsics.c')
-rw-r--r--clang/test/CodeGen/arm-microsoft-intrinsics.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/CodeGen/arm-microsoft-intrinsics.c b/clang/test/CodeGen/arm-microsoft-intrinsics.c
index 5f19e5e7c87..44782453a7a 100644
--- a/clang/test/CodeGen/arm-microsoft-intrinsics.c
+++ b/clang/test/CodeGen/arm-microsoft-intrinsics.c
@@ -47,17 +47,17 @@ unsigned int check_MoveFromCoprocessor2(void) {
// CHECK-MSVC: @llvm.arm.mrc2(i32 0, i32 0, i32 0, i32 0, i32 0)
// CHECK-EABI: error: implicit declaration of function '_MoveFromCoprocessor2'
-void check_MoveToCoprocessor(void) {
- _MoveToCoprocessor(0, 0, 0, 0, 0, 0);
+void check_MoveToCoprocessor(unsigned int value) {
+ _MoveToCoprocessor(value, 10, 7, 1, 0, 0);
}
-// CHECK-MSVC: @llvm.arm.mcr(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+// CHECK-MSVC: @llvm.arm.mcr(i32 10, i32 7, i32 %0, i32 1, i32 0, i32 0)
// CHECK-EABI: error: implicit declaration of function '_MoveToCoprocessor'
-void check_MoveToCoprocessor2(void) {
- _MoveToCoprocessor2(0, 0, 0, 0, 0, 0);
+void check_MoveToCoprocessor2(unsigned int value) {
+ _MoveToCoprocessor2(value, 10, 7, 1, 0, 0);
}
-// CHECK-MSVC: @llvm.arm.mcr2(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+// CHECK-MSVC: @llvm.arm.mcr2(i32 10, i32 7, i32 %0, i32 1, i32 0, i32 0)
// CHECK-EABI: error: implicit declaration of function '_MoveToCoprocessor2'
OpenPOWER on IntegriCloud