line break consistency fix: FixedPoint.asm.cpp (MORE POINTLESS ASM!)
This commit is contained in:
parent
dbf981697e
commit
3bf2ac641b
|
@ -39,45 +39,45 @@
|
|||
extern "C" int __declspec(naked) imul16(int x, int y)
|
||||
{
|
||||
_asm {
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax, [x]
|
||||
mov edx, [y]
|
||||
imul edx
|
||||
shrd eax,edx,16
|
||||
leave
|
||||
ret
|
||||
}
|
||||
}
|
||||
leave
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
//(x * y) >> 14
|
||||
extern "C" int __declspec(naked) imul14(int x, int y)
|
||||
{
|
||||
_asm {
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax, [x]
|
||||
mov edx, [y]
|
||||
imul edx
|
||||
shrd eax,edx,14
|
||||
leave
|
||||
ret
|
||||
}
|
||||
}
|
||||
leave
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
//(x << 16) / y
|
||||
extern "C" int __declspec(naked) idiv16(int x, int y)
|
||||
{
|
||||
_asm {
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax, [x]
|
||||
mov ebx, [y]
|
||||
mov edx,eax
|
||||
sar edx,16
|
||||
shl eax,16
|
||||
idiv ebx
|
||||
leave
|
||||
ret
|
||||
}
|
||||
leave
|
||||
ret
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue