| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2" } */ |
| 3 |
|
| 4 |
int test_ok_pos() |
| 5 |
{ |
| 6 |
int x = 100; |
| 7 |
return __builtin_bfin_shl_fr1x32(x,24); |
| 8 |
} |
| 9 |
|
| 10 |
int test_ok_neg() |
| 11 |
{ |
| 12 |
int x = -100; |
| 13 |
return __builtin_bfin_shl_fr1x32(x,24); |
| 14 |
} |
| 15 |
|
| 16 |
int test_sat_max() |
| 17 |
{ |
| 18 |
int x = 10000; |
| 19 |
return __builtin_bfin_shl_fr1x32(x,24); |
| 20 |
} |
| 21 |
|
| 22 |
int test_sat_min() |
| 23 |
{ |
| 24 |
int x = -10000; |
| 25 |
return __builtin_bfin_shl_fr1x32(x,24); |
| 26 |
} |
| 27 |
|
| 28 |
short stest_ok_pos() |
| 29 |
{ |
| 30 |
short x = 100; |
| 31 |
return __builtin_bfin_shl_fr1x16(x,8); |
| 32 |
} |
| 33 |
|
| 34 |
short stest_ok_neg() |
| 35 |
{ |
| 36 |
short x = -100; |
| 37 |
return __builtin_bfin_shl_fr1x16(x,8); |
| 38 |
} |
| 39 |
|
| 40 |
short stest_sat_max() |
| 41 |
{ |
| 42 |
short x = 10000; |
| 43 |
return __builtin_bfin_shl_fr1x16(x,8); |
| 44 |
} |
| 45 |
|
| 46 |
short stest_sat_min() |
| 47 |
{ |
| 48 |
short x = -10000; |
| 49 |
return __builtin_bfin_shl_fr1x16(x,8); |
| 50 |
} |
| 51 |
/* { dg-final { scan-assembler-not "\\(S\\)" } } */ |
| 52 |
/* { dg-final { scan-assembler-not "\\(V,S\\)" } } */ |