mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
well, that's one way to confuse anybody
fixes the floating point exception
This commit is contained in:
parent
53703ece81
commit
b4e8e0750c
4 changed files with 19 additions and 4 deletions
|
@ -205,12 +205,12 @@ C(D_PolysetCalcGradients):
|
||||||
// (t1*p01_minus_p21 - t0*p11_minus_p21)*
|
// (t1*p01_minus_p21 - t0*p11_minus_p21)*
|
||||||
// xstepdenominv | ystepdenominv |
|
// xstepdenominv | ystepdenominv |
|
||||||
// xstepdenominv | p00_minus_p20 | p11_minus_p21
|
// xstepdenominv | p00_minus_p20 | p11_minus_p21
|
||||||
fldcw ceil_cw
|
fldcw r_ceil_cw
|
||||||
fistpl C(r_lstepy) // r_lstepx | ystepdenominv | xstepdenominv |
|
fistpl C(r_lstepy) // r_lstepx | ystepdenominv | xstepdenominv |
|
||||||
// p00_minus_p20 | p11_minus_p21
|
// p00_minus_p20 | p11_minus_p21
|
||||||
fistpl C(r_lstepx) // ystepdenominv | xstepdenominv | p00_minus_p20 |
|
fistpl C(r_lstepx) // ystepdenominv | xstepdenominv | p00_minus_p20 |
|
||||||
// p11_minus_p21
|
// p11_minus_p21
|
||||||
fldcw single_cw
|
fldcw r_single_cw
|
||||||
|
|
||||||
// t0 = r_p0[2] - r_p2[2];
|
// t0 = r_p0[2] - r_p2[2];
|
||||||
// t1 = r_p1[2] - r_p2[2];
|
// t1 = r_p1[2] - r_p2[2];
|
||||||
|
|
|
@ -153,7 +153,7 @@ Lemit:
|
||||||
//
|
//
|
||||||
// FIXME: do away with by manually extracting integers from floats?
|
// FIXME: do away with by manually extracting integers from floats?
|
||||||
// FIXME: set less often
|
// FIXME: set less often
|
||||||
fldcw ceil_cw
|
fldcw r_ceil_cw
|
||||||
|
|
||||||
// edge_t *edge, *pcheck;
|
// edge_t *edge, *pcheck;
|
||||||
// int u_check;
|
// int u_check;
|
||||||
|
@ -220,7 +220,7 @@ LCalcSecond:
|
||||||
// r_ceilv1 = (int)(r_v1 - 2000) + 2000; // ceil(r_v1);
|
// r_ceilv1 = (int)(r_v1 - 2000) + 2000; // ceil(r_v1);
|
||||||
fistl C(r_ceilv1)
|
fistl C(r_ceilv1)
|
||||||
|
|
||||||
fldcw single_cw // put back normal floating-point state
|
fldcw r_single_cw // put back normal floating-point state
|
||||||
|
|
||||||
fsts C(r_v1)
|
fsts C(r_v1)
|
||||||
fxch %st(4) // lzi0 | lzi1 | u1 | v0 | v1 | u0
|
fxch %st(4) // lzi0 | lzi1 | u1 | v0 | v1 | u0
|
||||||
|
|
|
@ -137,6 +137,7 @@ float se_time1, se_time2, de_time1, de_time2, dv_time1, dv_time2;
|
||||||
void R_MarkLeaves (void);
|
void R_MarkLeaves (void);
|
||||||
|
|
||||||
void R_LoadSky_f (void);
|
void R_LoadSky_f (void);
|
||||||
|
void R_InitVars (void);
|
||||||
|
|
||||||
void
|
void
|
||||||
R_Init (void)
|
R_Init (void)
|
||||||
|
@ -146,6 +147,8 @@ R_Init (void)
|
||||||
// get stack position so we can guess if we are going to overflow
|
// get stack position so we can guess if we are going to overflow
|
||||||
r_stack_start = (byte *) & dummy;
|
r_stack_start = (byte *) & dummy;
|
||||||
|
|
||||||
|
R_InitVars ();
|
||||||
|
|
||||||
R_InitTurb ();
|
R_InitTurb ();
|
||||||
|
|
||||||
Cmd_AddCommand ("timerefresh", R_TimeRefresh_f, "Tests the current "
|
Cmd_AddCommand ("timerefresh", R_TimeRefresh_f, "Tests the current "
|
||||||
|
|
|
@ -65,8 +65,20 @@ FloatZero: .long 0
|
||||||
Float2ToThe31nd: .long 0x4f000000
|
Float2ToThe31nd: .long 0x4f000000
|
||||||
FloatMinus2ToThe31nd: .long 0xcf000000
|
FloatMinus2ToThe31nd: .long 0xcf000000
|
||||||
|
|
||||||
|
.globl r_ceil_cw, r_single_cw
|
||||||
|
r_ceil_cw: .long 0
|
||||||
|
r_single_cw: .long 0
|
||||||
|
|
||||||
.globl C(r_bmodelactive)
|
.globl C(r_bmodelactive)
|
||||||
C(r_bmodelactive): .long 0
|
C(r_bmodelactive): .long 0
|
||||||
|
|
||||||
|
.global C(R_InitVars)
|
||||||
|
C(R_InitVars):
|
||||||
|
movl ceil_cw, %eax
|
||||||
|
movl single_cw, %edx
|
||||||
|
movl %eax, r_ceil_cw
|
||||||
|
movl %edx, r_single_cw
|
||||||
|
ret
|
||||||
|
|
||||||
#endif // USE_INTEL_ASM
|
#endif // USE_INTEL_ASM
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue