| 1 |
/* Test the mcrr2 ACLE intrinsic. */ |
| 2 |
|
| 3 |
/* { dg-do assemble } */ |
| 4 |
/* { dg-options "-save-temps" } */ |
| 5 |
/* { dg-require-effective-target arm_coproc4_ok } */ |
| 6 |
/* { dg-final { check-function-bodies "**" "" "" } } */ |
| 7 |
|
| 8 |
#include "arm_acle.h" |
| 9 |
#if (__ARM_ARCH < 8 || !defined (__ARM_ARCH_ISA_ARM)) \ |
| 10 |
&& (__ARM_FEATURE_COPROC & 0x8) == 0 |
| 11 |
#error "__ARM_FEATURE_COPROC does not have correct feature bits set" |
| 12 |
#endif |
| 13 |
|
| 14 |
void test_mcrr2 (uint64_t a) |
| 15 |
{ |
| 16 |
a += 77; |
| 17 |
__arm_mcrr2 (10, 5, a, 3); |
| 18 |
} |
| 19 |
/* |
| 20 |
** test_mcrr2: |
| 21 |
** ... |
| 22 |
** add.*#77 |
| 23 |
** ... |
| 24 |
** mcrr2 p10, #5, r[0-9]+, r[0-9]+, CR3 |
| 25 |
** ... |
| 26 |
*/ |
| 27 |
|
| 28 |
void test_mcrr2_pr121464 (void) |
| 29 |
{ |
| 30 |
__arm_mcrr2 (3, 12, 49, 4); |
| 31 |
} |
| 32 |
|
| 33 |
/* |
| 34 |
** test_mcrr2_pr121464: |
| 35 |
** ... |
| 36 |
** mov.*#49 |
| 37 |
** ... |
| 38 |
** mcrr2 p3, #12, r[0-9]+, r[0-9]+, CR4 |
| 39 |
** ... |
| 40 |
*/ |