2 * Written by J.T. Conklin, Apr 10, 1995
10 static const int map[] = {
11 1, /* round to nearest */
12 3, /* round to zero */
13 2, /* round to negative infinity */
14 0 /* round to positive infinity */
22 /* Assume that the x87 and the SSE unit agree on the rounding mode. */
23 __asm("fnstcw %0" : "=m" (x));
24 return (map[(x >> 10) & 0x03]);