| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O2 --save-temps" } */ |
| 3 |
|
| 4 |
extern void abort (void); |
| 5 |
|
| 6 |
typedef unsigned int u32int; |
| 7 |
typedef unsigned long long u64int; |
| 8 |
|
| 9 |
u32int |
| 10 |
test_si (u32int w1, u32int w2, u32int w3, u32int w4) |
| 11 |
{ |
| 12 |
u32int w0; |
| 13 |
/* { dg-final { scan-assembler "sbc\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+\n" } } */ |
| 14 |
w0 = w1 - w2 - (w3 < w4); |
| 15 |
return w0; |
| 16 |
} |
| 17 |
|
| 18 |
u64int |
| 19 |
test_di (u64int x1, u64int x2, u64int x3, u64int x4) |
| 20 |
{ |
| 21 |
u64int x0; |
| 22 |
/* { dg-final { scan-assembler "sbc\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+\n" } } */ |
| 23 |
x0 = x1 - x2 - (x3 < x4); |
| 24 |
return x0; |
| 25 |
} |
| 26 |
|
| 27 |
int |
| 28 |
main () |
| 29 |
{ |
| 30 |
u32int x; |
| 31 |
u64int y; |
| 32 |
x = test_si (7, 8, 12, 15); |
| 33 |
if (x != -2) |
| 34 |
abort(); |
| 35 |
y = test_di (0x987654321ll, 0x123456789ll, 0x345345345ll, 0x123123123ll); |
| 36 |
if (y != 0x8641fdb98ll) |
| 37 |
abort(); |
| 38 |
return 0; |
| 39 |
} |
| 40 |
|