| 1 |
/* { dg-options "-O2 -fpack-struct -mstrict-align -fno-stack-protector -fno-schedule-insns -fno-schedule-insns2" } */ |
| 2 |
/* { dg-final { check-function-bodies "**" "" "" } } */ |
| 3 |
|
| 4 |
#include <arm_neon.h> |
| 5 |
|
| 6 |
extern "C" { |
| 7 |
|
| 8 |
/* |
| 9 |
** ld2: |
| 10 |
** ... |
| 11 |
** ld2 .* |
| 12 |
** ... |
| 13 |
** ( |
| 14 |
** strb .* |
| 15 |
** | |
| 16 |
** bl memcpy |
| 17 |
** ) |
| 18 |
** ... |
| 19 |
*/ |
| 20 |
void |
| 21 |
ld2 (int32x4x2_t *a, int32_t *b) |
| 22 |
{ |
| 23 |
*a = vld2q_s32 (b); |
| 24 |
} |
| 25 |
|
| 26 |
/* |
| 27 |
** ld3: |
| 28 |
** ... |
| 29 |
** ld3 .* |
| 30 |
** ... |
| 31 |
** ( |
| 32 |
** strb .* |
| 33 |
** | |
| 34 |
** bl memcpy |
| 35 |
** ) |
| 36 |
** ... |
| 37 |
*/ |
| 38 |
void |
| 39 |
ld3 (int32x4x3_t *a, int32_t *b) |
| 40 |
{ |
| 41 |
*a = vld3q_s32 (b); |
| 42 |
} |
| 43 |
|
| 44 |
/* |
| 45 |
** ld4: |
| 46 |
** ... |
| 47 |
** ld4 .* |
| 48 |
** ... |
| 49 |
** ( |
| 50 |
** strb .* |
| 51 |
** | |
| 52 |
** bl memcpy |
| 53 |
** ) |
| 54 |
** ... |
| 55 |
*/ |
| 56 |
void |
| 57 |
ld4 (int32x4x4_t *a, int32_t *b) |
| 58 |
{ |
| 59 |
*a = vld4q_s32 (b); |
| 60 |
} |
| 61 |
|
| 62 |
/* |
| 63 |
** ret: |
| 64 |
** ... |
| 65 |
** ldp q0, q1, \[x0\] |
| 66 |
** ldr q2, \[x0, #?32\] |
| 67 |
** ... |
| 68 |
*/ |
| 69 |
int32x4x3_t |
| 70 |
ret (int32x4_t *ptr) |
| 71 |
{ |
| 72 |
return (int32x4x3_t) { ptr[0], ptr[1], ptr[2] }; |
| 73 |
} |
| 74 |
|
| 75 |
/* |
| 76 |
** arg: |
| 77 |
** ... |
| 78 |
** stp d0, d1, \[x0\] |
| 79 |
** ... |
| 80 |
*/ |
| 81 |
void |
| 82 |
arg (int32x2x2_t arg, int32x2_t *ptr) |
| 83 |
{ |
| 84 |
ptr[0] = arg.val[0]; |
| 85 |
ptr[1] = arg.val[1]; |
| 86 |
} |
| 87 |
|
| 88 |
} |