8 __asm__ volatile ( "lghi 8," #b "\n\t" \
14 /* Like srnmt above, except it uses r0 as a base register */
17 __asm__ volatile ( SRNMT(0,d) \
21 #define get_dfp_rounding_mode() \
24 __asm__ volatile ("stfpc %0" : "=Q"(fpc)); \
31 printf("initial rounding mode = %u\n", get_dfp_rounding_mode());
33 /* Set basic rounding modes in various ways */
34 srnmt(1,002); // 1 + 2 = 3
35 printf("rounding mode = %u\n", get_dfp_rounding_mode());
38 printf("rounding mode = %u\n", get_dfp_rounding_mode());
41 printf("rounding mode = %u\n", get_dfp_rounding_mode());
44 printf("rounding mode = %u\n", get_dfp_rounding_mode());
47 printf("rounding mode = %u\n", get_dfp_rounding_mode());
50 printf("rounding mode = %u\n", get_dfp_rounding_mode());
53 printf("rounding mode = %u\n", get_dfp_rounding_mode());
56 printf("rounding mode = %u\n", get_dfp_rounding_mode());