diff options
author | Keith Whitwell <[email protected]> | 2008-05-22 20:21:49 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-05-23 09:16:58 +0100 |
commit | 43df4642f1d2f3d2673a1d5e4f5126f5175fb899 (patch) | |
tree | 0aaa35bc03bd0defe38c36a375d7aa518c9225b5 /src/gallium/auxiliary/draw | |
parent | 260001430bbd28ea17201f1980ab1ebed93b246f (diff) |
draw: tweak x87_emit_ex2 to avoid changing x87 fpu settings
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_aos.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c index 039e233fe81..93bb4f9bc07 100644 --- a/src/gallium/auxiliary/draw/draw_vs_aos.c +++ b/src/gallium/auxiliary/draw/draw_vs_aos.c @@ -735,16 +735,17 @@ static void x87_emit_ex2( struct aos_compilation *cp ) struct x86_reg st1 = x86_make_reg(file_x87, 1); int stack = cp->func->x87_stack; - set_fpu_round_neg_inf( cp ); +// set_fpu_round_neg_inf( cp ); x87_fld(cp->func, st0); /* a a */ - x87_fld(cp->func, st0); /* a a a */ - x87_fprndint( cp->func ); /* flr(a) a a*/ - x87_fsubp(cp->func, st1); /* frac(a) a */ - x87_f2xm1(cp->func); /* (2^frac(a))-1 a */ - x87_fld1(cp->func); /* 1 (2^frac(a))-1 a */ - x87_faddp(cp->func, st1); /* 2^frac(a) a */ - x87_fscale(cp->func); /* 2^a a */ + x87_fprndint( cp->func ); /* int(a) a*/ + x87_fsubr(cp->func, st1, st0); /* int(a) frc(a) */ + x87_fxch(cp->func, st1); /* frc(a) int(a) */ + x87_f2xm1(cp->func); /* (2^frc(a))-1 int(a) */ + x87_fld1(cp->func); /* 1 (2^frc(a))-1 int(a) */ + x87_faddp(cp->func, st1); /* 2^frac(a) int(a) */ + x87_fscale(cp->func); /* (2^frac(a)*2^int(int(a))) int(a) */ + /* 2^a int(a) */ x87_fstp(cp->func, st1); /* 2^a */ assert( stack == cp->func->x87_stack); |