2021-04-03 01:48:38 +03:00
|
|
|
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
|
2021-04-03 01:48:38 +03:00
|
|
|
mov dword [ecx], edx
|
2021-04-03 16:26:58 +03:00
|
|
|
mov dword [ecx+4], 0
|
2021-12-29 03:14:11 +03:00
|
|
|
.done:
|
2021-04-03 01:48:38 +03:00
|
|
|
xor edx, edx
|
|
|
|
ret
|
|
|
|
|
2021-05-04 14:56:00 +03:00
|
|
|
global __divmoddi4
|
2021-04-03 01:48:38 +03:00
|
|
|
__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
|
2021-04-03 01:48:38 +03:00
|
|
|
mov dword [ecx], edx
|
2021-04-03 16:26:58 +03:00
|
|
|
mov dword [ecx+4], 0
|
2021-12-29 03:14:11 +03:00
|
|
|
.done:
|
2021-04-03 01:48:38 +03:00
|
|
|
xor edx, edx
|
|
|
|
ret
|