1 /* Functional tests for the "target" attribute and pragma. */
3 /* { dg-do compile { target { lp64 } } } */
4 /* { dg-require-effective-target dfp } */
5 /* { dg-require-effective-target target_attribute } */
6 /* { dg-options "-march=z13 -std=gnu99 -mno-hard-dfp" } */
8 #pragma GCC target("hard-dfp")
9 _Decimal64
p1(_Decimal64 f
, _Decimal64 g
)
12 /* { dg-final { scan-assembler-times "\tmdtr\t" 1 } } */
14 #pragma GCC reset_options
16 #pragma GCC target("no-hard-dfp")
17 _Decimal64
p0(_Decimal64 f
, _Decimal64 g
)
20 /* { dg-final { scan-assembler-not "\tddtr\t" } } */
22 #pragma GCC reset_options
24 __attribute__ ((target("hard-dfp")))
25 _Decimal64
a1(_Decimal64 f
, _Decimal64 g
)
27 /* { dg-final { scan-assembler-times "\tadtr\t" 1 } } */
31 __attribute__ ((target("no-hard-dfp")))
32 _Decimal64
a0(_Decimal64 f
, _Decimal64 g
)
35 /* { dg-final { scan-assembler-not "\tsdtr\t" } } */
38 _Decimal64
d(_Decimal64 f
, _Decimal64 g
)
41 /* { dg-final { scan-assembler-not "\tsdtr\t" } } */