1 /* test data class tests for float, double, long double: TCEB, TCDB, TCXB */
5 static int tcxb(long double f, long long num)
9 asm volatile(" tcxb %1,0(%2)\n"
18 static int tcdb(double f, long long num)
22 asm volatile(" tcdb %1,0(%2)\n"
31 static int tceb(float f, long long num)
35 asm volatile(" tceb %1,0(%2)\n"
48 for (i = 0; i < 64; i++) {
49 if (sizeof (long double) == 16) {
50 /* long double 128 bit */
51 printf("%d", tcxb(+0.0l, 1UL<<i));
52 printf("%d", tcxb(-0.0l, 1UL<<i));
53 printf("%d", tcxb(+2.2l, 1UL<<i));
54 printf("%d", tcxb(-2.2l, 1UL<<i));
55 printf("%d", tcxb(+INFINITY, 1UL<<i));
56 printf("%d", tcxb(-INFINITY, 1UL<<i));
57 printf("%d", tcxb(+NAN, 1UL<<i));
58 printf("%d", tcxb(-NAN, 1UL<<i));
60 /* long double 64 bit */
61 printf("%d", tcdb(+0.0l, 1UL<<i));
62 printf("%d", tcdb(-0.0l, 1UL<<i));
63 printf("%d", tcdb(+2.2l, 1UL<<i));
64 printf("%d", tcdb(-2.2l, 1UL<<i));
65 printf("%d", tcdb(+INFINITY, 1UL<<i));
66 printf("%d", tcdb(-INFINITY, 1UL<<i));
67 printf("%d", tcdb(+NAN, 1UL<<i));
68 printf("%d", tcdb(-NAN, 1UL<<i));
71 printf("%d", tcdb(+0.0, 1UL<<i));
72 printf("%d", tcdb(-0.0, 1UL<<i));
73 printf("%d", tcdb(+2.2, 1UL<<i));
74 printf("%d", tcdb(-2.2, 1UL<<i));
75 printf("%d", tcdb(+INFINITY, 1UL<<i));
76 printf("%d", tcdb(-INFINITY, 1UL<<i));
77 printf("%d", tcdb(+NAN, 1UL<<i));
78 printf("%d", tcdb(-NAN, 1UL<<i));
82 printf("%d", tceb(+0.0f, 1UL<<i));
83 printf("%d", tceb(-0.0f, 1UL<<i));
84 printf("%d", tceb(+2.2f, 1UL<<i));
85 printf("%d", tceb(-2.2f, 1UL<<i));
86 printf("%d", tceb(+INFINITY, 1UL<<i));
87 printf("%d", tceb(-INFINITY, 1UL<<i));
88 printf("%d", tceb(+NAN, 1UL<<i));
89 printf("%d", tceb(-NAN, 1UL<<i));