| 1 |
/* Check that on SH2A the 4 byte mov.b displacement insn is generated to |
| 2 |
handle larger displacements. If it is generated correctly, there should |
| 3 |
be no base address adjustments outside the mov.b insns. */ |
| 4 |
/* { dg-do compile { target { sh2a } } } */ |
| 5 |
/* { dg-options "-O1" } */ |
| 6 |
/* { dg-final { scan-assembler-not "add|sub" } } */ |
| 7 |
|
| 8 |
void |
| 9 |
testfunc_00 (const char* ap, char* bp) |
| 10 |
{ |
| 11 |
bp[100] = ap[15]; |
| 12 |
bp[200] = ap[50]; |
| 13 |
bp[900] = ap[71]; |
| 14 |
bp[0] = ap[25]; |
| 15 |
} |
| 16 |
|
| 17 |
void |
| 18 |
testfunc_01 (volatile const char* ap, volatile char* bp) |
| 19 |
{ |
| 20 |
bp[100] = ap[15]; |
| 21 |
bp[200] = ap[50]; |
| 22 |
bp[900] = ap[71]; |
| 23 |
bp[0] = ap[25]; |
| 24 |
} |
| 25 |
|