1 /* Check that loads/stores from/to volatile mems utilize displacement
2 addressing modes and do not result in redundant sign/zero extensions. */
3 /* { dg-do compile } */
4 /* { dg-options "-O1" } */
5 /* { dg-final { scan-assembler-times "@\\(5," 4 } } */
6 /* { dg-final { scan-assembler-times "@\\(10," 4 } } */
7 /* { dg-final { scan-assembler-times "@\\(20," 4 } } */
8 /* { dg-final { scan-assembler-times "@\\(40," 4 } } */
9 /* { dg-final { scan-assembler-times "@\\(44," 4 } } */
10 /* { dg-final { scan-assembler-not "exts" } } */
11 /* { dg-final { scan-assembler-times "extu|movu" 2 } } */
14 test_00 (volatile char* x
)
20 test_100 (volatile char* x
, char y
)
26 test_01 (volatile short* x
)
32 test_101 (volatile short* x
, short y
)
38 test_02 (volatile int* x
)
44 test_102 (volatile int* x
, int y
)
50 test_03 (volatile long long* x
)
56 test_103 (volatile long long* x
, long long y
)
62 test_04 (volatile unsigned char* x
)
64 // expected 1x extu.b or movu.b
69 test_104 (volatile unsigned char* x
, unsigned char y
)
75 test_05 (volatile unsigned short* x
)
77 // expected 1x extu.w or movu.w
82 test_105 (volatile unsigned short* x
, unsigned short y
)
88 test_06 (volatile unsigned int* x
)
94 test_106 (volatile unsigned int* x
, unsigned int y
)
100 test_07 (volatile unsigned long long* x
)
106 test_107 (volatile unsigned long long* x
, unsigned long long y
)