1 /* Test the mcr ACLE intrinsic.  */
2 
3 /* { dg-do assemble } */
4 /* { dg-options "-save-temps" } */
5 /* { dg-require-effective-target arm_coproc1_ok } */
6 
7 #include "arm_acle.h"
8 #if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
9     && (__ARM_FEATURE_COPROC & 0x1) == 0
10   #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
11 #endif
12 
test_mcr(uint32_t a)13 void test_mcr (uint32_t a)
14 {
15   a += 77;
16   __arm_mcr (10, 5, a, 3, 4, 7);
17 }
18 
19 /* { dg-final { scan-assembler "add\[^\n\]*#77\n" } } */
20 /* { dg-final { scan-assembler "mcr\tp10, #5, r\[r0-9\]*, CR3, CR4, #7\n" } } */
21