tiny optimizations from evilspy
This commit is contained in:
parent
484014e2db
commit
635d18de92
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1409,47 +1409,47 @@ OP_NOP:
|
|||||||
GO_ON
|
GO_ON
|
||||||
|
|
||||||
OP_FLOAT_MUL:
|
OP_FLOAT_MUL:
|
||||||
add esi,4
|
add esi,4
|
||||||
fld dword [edi+ecx+4]
|
fld dword [edi+ecx+4]
|
||||||
fmul dword [edi+ecx+8]
|
fmul dword [edi+ecx+8]
|
||||||
push dword 0
|
sub esp,4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
GO_ON
|
GO_ON
|
||||||
|
|
||||||
OP_FLOAT_DIV:
|
OP_FLOAT_DIV:
|
||||||
add esi,4
|
add esi,4
|
||||||
fld dword [edi+ecx+4]
|
fld dword [edi+ecx+4]
|
||||||
fdiv dword [edi+ecx+8]
|
fdiv dword [edi+ecx+8]
|
||||||
push dword 0
|
sub esp,4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
GO_ON
|
GO_ON
|
||||||
|
|
||||||
OP_FLOAT_ADD:
|
OP_FLOAT_ADD:
|
||||||
add esi,4
|
add esi,4
|
||||||
fld dword [edi+ecx+4]
|
fld dword [edi+ecx+4]
|
||||||
fadd dword [edi+ecx+8]
|
fadd dword [edi+ecx+8]
|
||||||
push dword 0
|
sub esp,4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
GO_ON
|
GO_ON
|
||||||
|
|
||||||
OP_FLOAT_SUB:
|
OP_FLOAT_SUB:
|
||||||
add esi,4
|
add esi,4
|
||||||
fld dword [edi+ecx+4]
|
fld dword [edi+ecx+4]
|
||||||
fsub dword [edi+ecx+8]
|
fsub dword [edi+ecx+8]
|
||||||
push dword 0
|
sub esp, 4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
GO_ON
|
GO_ON
|
||||||
|
|
||||||
OP_FLOAT_TO:
|
OP_FLOAT_TO:
|
||||||
add esi,4
|
add esi,4
|
||||||
fild dword [edi+ecx+4]
|
fild dword [edi+ecx+4]
|
||||||
push 0
|
sub esp,4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
GO_ON
|
GO_ON
|
||||||
|
|
||||||
OP_FLOAT_ROUND:
|
OP_FLOAT_ROUND:
|
||||||
|
@ -1894,50 +1894,50 @@ OP_BREAK:
|
|||||||
OP_FLOAT_MUL:
|
OP_FLOAT_MUL:
|
||||||
GO_ON j_float_mul, OP_FLOAT_DIV
|
GO_ON j_float_mul, OP_FLOAT_DIV
|
||||||
j_float_mul:
|
j_float_mul:
|
||||||
fld dword [esi+4]
|
fld dword [esi+4]
|
||||||
fmul dword [esi+8]
|
fmul dword [esi+8]
|
||||||
push dword 0
|
sub esp, 4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
CHECKCODESIZE j_float_mul
|
CHECKCODESIZE j_float_mul
|
||||||
|
|
||||||
OP_FLOAT_DIV:
|
OP_FLOAT_DIV:
|
||||||
GO_ON j_float_div, OP_FLOAT_ADD
|
GO_ON j_float_div, OP_FLOAT_ADD
|
||||||
j_float_div:
|
j_float_div:
|
||||||
fld dword [esi+4]
|
fld dword [esi+4]
|
||||||
fdiv dword [esi+8]
|
fdiv dword [esi+8]
|
||||||
push dword 0
|
sub esp, 4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
CHECKCODESIZE j_float_div
|
CHECKCODESIZE j_float_div
|
||||||
|
|
||||||
OP_FLOAT_ADD:
|
OP_FLOAT_ADD:
|
||||||
GO_ON j_float_add, OP_FLOAT_SUB
|
GO_ON j_float_add, OP_FLOAT_SUB
|
||||||
j_float_add:
|
j_float_add:
|
||||||
fld dword [esi+4]
|
fld dword [esi+4]
|
||||||
fadd dword [esi+8]
|
fadd dword [esi+8]
|
||||||
push dword 0
|
sub esp, 4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
CHECKCODESIZE j_float_add
|
CHECKCODESIZE j_float_add
|
||||||
|
|
||||||
OP_FLOAT_SUB:
|
OP_FLOAT_SUB:
|
||||||
GO_ON j_float_sub, OP_FLOAT_TO
|
GO_ON j_float_sub, OP_FLOAT_TO
|
||||||
j_float_sub:
|
j_float_sub:
|
||||||
fld dword [esi+4]
|
fld dword [esi+4]
|
||||||
fsub dword [esi+8]
|
fsub dword [esi+8]
|
||||||
push dword 0
|
sub esp, 4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
CHECKCODESIZE j_float_sub
|
CHECKCODESIZE j_float_sub
|
||||||
|
|
||||||
OP_FLOAT_TO:
|
OP_FLOAT_TO:
|
||||||
GO_ON j_float_to, OP_FLOAT_ROUND
|
GO_ON j_float_to, OP_FLOAT_ROUND
|
||||||
j_float_to:
|
j_float_to:
|
||||||
fild dword [esi+4]
|
fild dword [esi+4]
|
||||||
push 0
|
sub esp, 4
|
||||||
fstp dword [esp]
|
fstp dword [esp]
|
||||||
pop eax
|
pop eax
|
||||||
CHECKCODESIZE j_float_to
|
CHECKCODESIZE j_float_to
|
||||||
|
|
||||||
OP_FLOAT_ROUND:
|
OP_FLOAT_ROUND:
|
||||||
@ -1947,7 +1947,7 @@ OP_FLOAT_ROUND:
|
|||||||
push 0
|
push 0
|
||||||
mov ebp,esp
|
mov ebp,esp
|
||||||
fstcw [ebp]
|
fstcw [ebp]
|
||||||
mov eax,[ebp]
|
mov eax,[ebp]
|
||||||
push eax
|
push eax
|
||||||
;clear the top bits
|
;clear the top bits
|
||||||
xor ah,ah
|
xor ah,ah
|
||||||
@ -2241,8 +2241,8 @@ err_divide:
|
|||||||
jmp _return_popstack
|
jmp _return_popstack
|
||||||
|
|
||||||
JIT_OP_SYSREQ:
|
JIT_OP_SYSREQ:
|
||||||
push ecx
|
push ecx
|
||||||
push esi
|
push esi
|
||||||
mov ebp,amx ; get amx into EBP
|
mov ebp,amx ; get amx into EBP
|
||||||
|
|
||||||
sub esi,edi ; correct STK
|
sub esi,edi ; correct STK
|
||||||
@ -2276,8 +2276,8 @@ JIT_OP_SYSREQ:
|
|||||||
|
|
||||||
|
|
||||||
JIT_OP_SYSREQ_D: ; (TR)
|
JIT_OP_SYSREQ_D: ; (TR)
|
||||||
push ecx
|
push ecx
|
||||||
push esi
|
push esi
|
||||||
mov ebp,amx ; get amx into EBP
|
mov ebp,amx ; get amx into EBP
|
||||||
|
|
||||||
sub esi,edi ; correct STK
|
sub esi,edi ; correct STK
|
||||||
@ -2308,8 +2308,8 @@ JIT_OP_SYSREQ_D: ; (TR)
|
|||||||
|
|
||||||
JIT_OP_BREAK:
|
JIT_OP_BREAK:
|
||||||
%ifdef DEBUGSUPPORT
|
%ifdef DEBUGSUPPORT
|
||||||
push ecx
|
push ecx
|
||||||
push esi
|
push esi
|
||||||
mov ebp,amx ; get amx into EBP
|
mov ebp,amx ; get amx into EBP
|
||||||
|
|
||||||
sub esi,edi ; correct STK
|
sub esi,edi ; correct STK
|
||||||
@ -2565,12 +2565,12 @@ _amx_opcodelist_jit:
|
|||||||
DD OP_SYSREQ_D ; TR
|
DD OP_SYSREQ_D ; TR
|
||||||
DD OP_SYMTAG ; TR
|
DD OP_SYMTAG ; TR
|
||||||
DD OP_BREAK ; TR
|
DD OP_BREAK ; TR
|
||||||
DD OP_FLOAT_MUL ; DA
|
DD OP_FLOAT_MUL ; DA
|
||||||
DD OP_FLOAT_DIV ; DA
|
DD OP_FLOAT_DIV ; DA
|
||||||
DD OP_FLOAT_ADD ; DA
|
DD OP_FLOAT_ADD ; DA
|
||||||
DD OP_FLOAT_SUB ; DA
|
DD OP_FLOAT_SUB ; DA
|
||||||
DD OP_FLOAT_TO ; DA
|
DD OP_FLOAT_TO ; DA
|
||||||
DD OP_FLOAT_ROUND ; DA
|
DD OP_FLOAT_ROUND ; DA
|
||||||
DD OP_FLOAT_CMP ; DA
|
DD OP_FLOAT_CMP ; DA
|
||||||
|
|
||||||
END
|
END
|
||||||
|
Loading…
x
Reference in New Issue
Block a user