1 /* Test the ldc2 ACLE intrinsic.  */
2 
3 /* { dg-do assemble } */
4 /* { dg-options "-save-temps" } */
5 /* { dg-require-effective-target arm_coproc2_ok } */
6 
7 #include "arm_acle.h"
8 #if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \
9     && (__ARM_FEATURE_COPROC & 0x2) == 0
10   #error "__ARM_FEATURE_COPROC does not have correct feature bits set"
11 #endif
12 
13 extern void * p;
14 
test_ldc2(void)15 void test_ldc2 (void)
16 {
17   __arm_ldc2 (10, 1, p - 120);
18   __arm_ldc2 (11, 1, p - 122);
19 }
20 
21 /* { dg-final { scan-assembler "ldc2\tp10, CR1, \[r\[0-9\]+" } } */
22 /* { dg-final { scan-assembler "ldc2\tp11, CR1, \[r\[0-9\]+\]\n" } } */
23