1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=armv7-a" } */
3 /* { dg-require-effective-target arm_neon_ok } */
4 /* { dg-add-options arm_neon } */
5 
6 #include "addr-modes.h"
7 
8 typedef long long ll;
9 
10 /* no special function attribute required */
11 #define ATTR /* */
12 
13 PRE_STORE(char, ATTR)
14 /* { dg-final { scan-assembler "strb.*#1]!" } } */
15 PRE_STORE(short, ATTR)
16 /* { dg-final { scan-assembler "strh.*#2]!" } } */
17 PRE_STORE(int, ATTR)
18 /* { dg-final { scan-assembler "str.*#4]!" } } */
19 PRE_STORE(ll, ATTR)
20 /* { dg-final { scan-assembler "strd.*#8]!" } } */
21 
22 POST_STORE(char, ATTR)
23 /* { dg-final { scan-assembler "strb.*], #1" } } */
24 POST_STORE(short, ATTR)
25 /* { dg-final { scan-assembler "strh.*], #2" } } */
26 POST_STORE(int, ATTR)
27 /* { dg-final { scan-assembler "str.*], #4" } } */
28 POST_STORE(ll, ATTR)
29 /* { dg-final { scan-assembler "strd.*], #8" } } */
30 
31 PRE_LOAD(char, ATTR)
32 /* { dg-final { scan-assembler "ldrb.*#1]!" } } */
33 PRE_LOAD(short, ATTR)
34 /* { dg-final { scan-assembler "ldrsh.*#2]!" } } */
35 PRE_LOAD(int, ATTR)
36 /* { dg-final { scan-assembler "ldr.*#4]!" } } */
37 PRE_LOAD(ll, ATTR)
38 /* { dg-final { scan-assembler "ldrd.*#8]!" } } */
39 
40 POST_LOAD(char, ATTR)
41 /* { dg-final { scan-assembler "ldrb.*], #1" } } */
42 POST_LOAD(short, ATTR)
43 /* { dg-final { scan-assembler "ldrsh.*], #2" } } */
44 POST_LOAD(int, ATTR)
45 /* { dg-final { scan-assembler "ldr.*], #4" } } */
46 POST_LOAD(ll, ATTR)
47 /* { dg-final { scan-assembler "ldrd.*], #8" } } */
48 
49 /* { dg-final { scan-assembler-not "\tadd" } } */
50