assembly code got messed up

This commit is contained in:
Bryce Hutchings 2002-06-16 20:51:10 +00:00
parent 6dc007dea1
commit 1caa63369f

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.9 2002/06/16 20:51:10 niceass
// assembly code got messed up
//
// Revision 1.8 2002/06/16 20:06:14 jbravo // Revision 1.8 2002/06/16 20:06:14 jbravo
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap" // Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
// //
@ -995,9 +998,11 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
__asm { __asm {
push ebx push ebx
cmp bops_initialized, 1 cmp bops_initialized, 1
je initialized je initialized
mov bops_initialized, 1 mov bops_initialized, 1
mov Ljmptab[0*4], offset Lcase0 mov Ljmptab[0*4], offset Lcase0
mov Ljmptab[1*4], offset Lcase1 mov Ljmptab[1*4], offset Lcase1
mov Ljmptab[2*4], offset Lcase2 mov Ljmptab[2*4], offset Lcase2
@ -1005,13 +1010,22 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
mov Ljmptab[4*4], offset Lcase4 mov Ljmptab[4*4], offset Lcase4
mov Ljmptab[5*4], offset Lcase5 mov Ljmptab[5*4], offset Lcase5
mov Ljmptab[6*4], offset Lcase6 mov Ljmptab[6*4], offset Lcase6
mov Ljmptab[7 * 4], offset Lcase7 initialized:mov edx, dword ptr[4 + 12 + esp] mov Ljmptab[7*4], offset Lcase7
initialized:
mov edx,dword ptr[4+12+esp]
mov ecx,dword ptr[4+4+esp] mov ecx,dword ptr[4+4+esp]
xor eax, eax mov ebx, dword ptr[4 + 8 + esp] xor eax,eax
mov ebx,dword ptr[4+8+esp]
mov al,byte ptr[17+edx] mov al,byte ptr[17+edx]
cmp al, 8 jge Lerror fld dword ptr[0 + edx] cmp al,8
jge Lerror
fld dword ptr[0+edx]
fld st(0) fld st(0)
jmp dword ptr[Ljmptab + eax * 4] Lcase0:fmul dword ptr[ebx] jmp dword ptr[Ljmptab+eax*4]
Lcase0:
fmul dword ptr[ebx]
fld dword ptr[0+4+edx] fld dword ptr[0+4+edx]
fxch st(2) fxch st(2)
fmul dword ptr[ecx] fmul dword ptr[ecx]
@ -1031,7 +1045,9 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
faddp st(3),st(0) faddp st(3),st(0)
fxch st(3) fxch st(3)
faddp st(2),st(0) faddp st(2),st(0)
jmp LSetSides Lcase1:fmul dword ptr[ecx] jmp LSetSides
Lcase1:
fmul dword ptr[ecx]
fld dword ptr[0+4+edx] fld dword ptr[0+4+edx]
fxch st(2) fxch st(2)
fmul dword ptr[ebx] fmul dword ptr[ebx]
@ -1051,7 +1067,9 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
faddp st(3),st(0) faddp st(3),st(0)
fxch st(3) fxch st(3)
faddp st(2),st(0) faddp st(2),st(0)
jmp LSetSides Lcase2:fmul dword ptr[ebx] jmp LSetSides
Lcase2:
fmul dword ptr[ebx]
fld dword ptr[0+4+edx] fld dword ptr[0+4+edx]
fxch st(2) fxch st(2)
fmul dword ptr[ecx] fmul dword ptr[ecx]
@ -1071,7 +1089,9 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
faddp st(3),st(0) faddp st(3),st(0)
fxch st(3) fxch st(3)
faddp st(2),st(0) faddp st(2),st(0)
jmp LSetSides Lcase3:fmul dword ptr[ecx] jmp LSetSides
Lcase3:
fmul dword ptr[ecx]
fld dword ptr[0+4+edx] fld dword ptr[0+4+edx]
fxch st(2) fxch st(2)
fmul dword ptr[ebx] fmul dword ptr[ebx]
@ -1091,7 +1111,9 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
faddp st(3),st(0) faddp st(3),st(0)
fxch st(3) fxch st(3)
faddp st(2),st(0) faddp st(2),st(0)
jmp LSetSides Lcase4:fmul dword ptr[ebx] jmp LSetSides
Lcase4:
fmul dword ptr[ebx]
fld dword ptr[0+4+edx] fld dword ptr[0+4+edx]
fxch st(2) fxch st(2)
fmul dword ptr[ecx] fmul dword ptr[ecx]
@ -1111,7 +1133,9 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
faddp st(3),st(0) faddp st(3),st(0)
fxch st(3) fxch st(3)
faddp st(2),st(0) faddp st(2),st(0)
jmp LSetSides Lcase5:fmul dword ptr[ecx] jmp LSetSides
Lcase5:
fmul dword ptr[ecx]
fld dword ptr[0+4+edx] fld dword ptr[0+4+edx]
fxch st(2) fxch st(2)
fmul dword ptr[ebx] fmul dword ptr[ebx]
@ -1131,7 +1155,9 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
faddp st(3),st(0) faddp st(3),st(0)
fxch st(3) fxch st(3)
faddp st(2),st(0) faddp st(2),st(0)
jmp LSetSides Lcase6:fmul dword ptr[ebx] jmp LSetSides
Lcase6:
fmul dword ptr[ebx]
fld dword ptr[0+4+edx] fld dword ptr[0+4+edx]
fxch st(2) fxch st(2)
fmul dword ptr[ecx] fmul dword ptr[ecx]
@ -1151,7 +1177,9 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
faddp st(3),st(0) faddp st(3),st(0)
fxch st(3) fxch st(3)
faddp st(2),st(0) faddp st(2),st(0)
jmp LSetSides Lcase7:fmul dword ptr[ecx] jmp LSetSides
Lcase7:
fmul dword ptr[ecx]
fld dword ptr[0+4+edx] fld dword ptr[0+4+edx]
fxch st(2) fxch st(2)
fmul dword ptr[ebx] fmul dword ptr[ebx]
@ -1170,12 +1198,27 @@ int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
fxch st(1) fxch st(1)
faddp st(3),st(0) faddp st(3),st(0)
fxch st(3) fxch st(3)
faddp st(2), st(0) LSetSides:faddp st(2), st(0) faddp st(2),st(0)
LSetSides:
faddp st(2),st(0)
fcomp dword ptr[12+edx]
xor ecx,ecx
fnstsw ax
fcomp dword ptr[12+edx] fcomp dword ptr[12+edx]
xor ecx, ecx fnstsw ax fcomp dword ptr[12 + edx]
and ah,1 and ah,1
xor ah,1 xor ah,1
add cl, ah fnstsw ax and ah, 1 add ah, ah add cl, ah pop ebx mov eax, ecx ret Lerror:int 3}} add cl,ah
fnstsw ax
and ah,1
add ah,ah
add cl,ah
pop ebx
mov eax,ecx
ret
Lerror:
int 3
}
}
#pragma warning( default: 4035 ) #pragma warning( default: 4035 )
#endif #endif
#endif #endif