| 1 |
/* We do not have hardware instructions which do a direct conversion |
| 2 |
between the 32 and 128 bit DFP types. But we can easily do it in |
| 3 |
two steps. Older libdfp implementations require this not to call |
| 4 |
into a lib in order to prevent an endless loop. */ |
| 5 |
|
| 6 |
/* { dg-do compile } */ |
| 7 |
/* { dg-options "-O3 -march=z10 -mzarch" } */ |
| 8 |
|
| 9 |
_Decimal32 |
| 10 |
foo (_Decimal128 a) |
| 11 |
{ |
| 12 |
return (_Decimal32)a; |
| 13 |
} |
| 14 |
|
| 15 |
_Decimal128 |
| 16 |
bar (_Decimal32 a) |
| 17 |
{ |
| 18 |
return (_Decimal128)a; |
| 19 |
} |
| 20 |
|
| 21 |
/* Make sure no library call is emitted. */ |
| 22 |
/* { dg-final { scan-assembler-not "brasl" } } */ |