| 1 |
/* PR target/50749: Verify that pre-decrement addressing is generated. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
/* { dg-final { scan-assembler-times "mov.b\tr\[0-9]\+,@-r\[0-9]\+" 1 { xfail *-*-*} } } */ |
| 5 |
/* { dg-final { scan-assembler-times "mov.w\tr\[0-9]\+,@-r\[0-9]\+" 1 { xfail *-*-*} } } */ |
| 6 |
/* { dg-final { scan-assembler-times "mov.l\tr\[0-9]\+,@-r\[0-9]\+" 1 { xfail *-*-*} } } */ |
| 7 |
|
| 8 |
char* |
| 9 |
test_func_00 (char* p, int c) |
| 10 |
{ |
| 11 |
*--p = (char)c; |
| 12 |
return p; |
| 13 |
} |
| 14 |
|
| 15 |
short* |
| 16 |
test_func_01 (short* p, int c) |
| 17 |
{ |
| 18 |
*--p = (short)c; |
| 19 |
return p; |
| 20 |
} |
| 21 |
|
| 22 |
int* |
| 23 |
test_func_02 (int* p, int c) |
| 24 |
{ |
| 25 |
*--p = c; |
| 26 |
return p; |
| 27 |
} |
| 28 |
|