1 /* Check that on SH2A the 4 byte movu.b and movu.w displacement insns are
2 generated. This has to be checked with -O2 because some of the patterns
4 /* { dg-do compile { target { sh2a } } } */
5 /* { dg-options "-O2" } */
6 /* { dg-final { scan-assembler-times "movu.b" 4 } } */
7 /* { dg-final { scan-assembler-times "movu.w" 3 } } */
10 test_00 (unsigned char* x
)
17 test_01 (unsigned short* x
)
24 test_02 (unsigned char* x
)
31 test_03 (unsigned char* x
)
38 test_04 (unsigned char* x
)
45 test_05 (unsigned short* x
)
52 test_06 (unsigned char* x
, int i
)
54 /* No movu.b expected here. Should use mov.b (r0,r4) + extu.b instead. */
59 test_07 (unsigned short* x
, int i
)
61 /* No movu.w expected here. Should use mov.w (r0,r4) + extu.w instead. */
66 test_08 (unsigned char* x
, int c
)
68 /* No movu.b expected here. Should use post-inc addressing instead. */
71 for (i
= 0; i
< c
; ++i
)
77 test_09 (unsigned char* x
, unsigned char* y
)
79 /* No movu.b expected here, since the zero-extension is irrelevant. */
85 test_10 (unsigned char* x
, unsigned short* y
)
87 /* No movu.w expected here, since the zero-extension is irrelevant. */
93 test_11 (unsigned char* x
, unsigned short* y
)