5 /* Test "load rounded" with universally available rounding modes.
6 Rounding mode is provided via FPC.
7 Also test "load lengthened" (which is independent of rounding modes). */
13 rtext(unsigned fpc_round
)
16 case 0: return "[-> near]";
17 case 1: return "[-> zero]";
18 case 2: return "[-> +inf]";
19 case 3: return "[-> -inf]";
25 set_rounding_mode(unsigned mode
)
27 printf("setting FPC rounding mode to %s\n", rtext(mode
));
28 register unsigned r
asm("1") = mode
;
29 __asm__
volatile ( SFPC(1) : : "d"(r
) );
37 printf("load rounded d = %10.3f f = %10.3f\n", d
, f
);
44 printf("load lengthened d = %22.20g f = %22.20g\n", d
, f
);
47 /* Tests for load rounded and load lengthened */
59 printf("======================================\n");
69 printf("======================================\n");
79 printf("======================================\n");