rulimine/common/lib/libgcc.s2.asm32

64 lines
1.1 KiB
Plaintext
Raw Normal View History

section .text
global __udivdi3
__udivdi3:
mov eax, dword [esp+4]
mov edx, dword [esp+8]
div dword [esp+12]
xor edx, edx
ret
global __divdi3
__divdi3:
mov eax, dword [esp+4]
mov edx, dword [esp+8]
idiv dword [esp+12]
xor edx, edx
ret
global __umoddi3
__umoddi3:
mov eax, dword [esp+4]
mov edx, dword [esp+8]
div dword [esp+12]
mov eax, edx
xor edx, edx
ret
global __moddi3
__moddi3:
mov eax, dword [esp+4]
mov edx, dword [esp+8]
idiv dword [esp+12]
mov eax, edx
xor edx, edx
ret
global __udivmoddi4
__udivmoddi4:
mov eax, dword [esp+4]
mov edx, dword [esp+8]
div dword [esp+12]
mov ecx, dword [esp+20]
2021-12-29 03:14:11 +03:00
test ecx, ecx
jz .done
mov dword [ecx], edx
mov dword [ecx+4], 0
2021-12-29 03:14:11 +03:00
.done:
xor edx, edx
ret
2021-05-04 14:56:00 +03:00
global __divmoddi4
__divmoddi4:
mov eax, dword [esp+4]
mov edx, dword [esp+8]
idiv dword [esp+12]
mov ecx, dword [esp+20]
2021-12-29 03:14:11 +03:00
test ecx, ecx
jz .done
mov dword [ecx], edx
mov dword [ecx+4], 0
2021-12-29 03:14:11 +03:00
.done:
xor edx, edx
ret