| 1 |
/* PR target/50749: Verify that subsequent pre-decrement addressings |
| 2 |
are generated. */ |
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-O2" } */ |
| 5 |
/* { dg-final { scan-assembler-times "mov.b\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */ |
| 6 |
/* { dg-final { scan-assembler-times "mov.w\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */ |
| 7 |
/* { dg-final { scan-assembler-times "mov.l\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */ |
| 8 |
|
| 9 |
char* |
| 10 |
test_func_00 (char* p, int c) |
| 11 |
{ |
| 12 |
*--p = (char)c; |
| 13 |
*--p = (char)c; |
| 14 |
return p; |
| 15 |
} |
| 16 |
|
| 17 |
char* |
| 18 |
test_func_01 (char* p, int c) |
| 19 |
{ |
| 20 |
*--p = (char)c; |
| 21 |
*--p = (char)c; |
| 22 |
*--p = (char)c; |
| 23 |
return p; |
| 24 |
} |
| 25 |
|
| 26 |
short* |
| 27 |
test_func_02 (short* p, int c) |
| 28 |
{ |
| 29 |
*--p = (short)c; |
| 30 |
*--p = (short)c; |
| 31 |
return p; |
| 32 |
} |
| 33 |
|
| 34 |
short* |
| 35 |
test_func_03 (short* p, int c) |
| 36 |
{ |
| 37 |
*--p = (short)c; |
| 38 |
*--p = (short)c; |
| 39 |
*--p = (short)c; |
| 40 |
return p; |
| 41 |
} |
| 42 |
|
| 43 |
int* |
| 44 |
test_func_04 (int* p, int c) |
| 45 |
{ |
| 46 |
*--p = c; |
| 47 |
*--p = c; |
| 48 |
return p; |
| 49 |
} |
| 50 |
|
| 51 |
int* |
| 52 |
test_func_05 (int* p, int c) |
| 53 |
{ |
| 54 |
*--p = c; |
| 55 |
*--p = c; |
| 56 |
*--p = c; |
| 57 |
return p; |
| 58 |
} |