22 lines
244 B
ArmAsm
22 lines
244 B
ArmAsm
bits 64
|
|
|
|
%include "defines.inc"
|
|
|
|
section .text
|
|
global ft_calloc
|
|
; rdi = nitems, rsi = size
|
|
ft_calloc:
|
|
push rbx
|
|
mov rbx, rdi
|
|
|
|
mov rdi, rbx
|
|
call malloc wrt ..plt
|
|
|
|
mov rdi, rax
|
|
mov rsi, rbx
|
|
call bzero wrt ..plt
|
|
|
|
pop rbx
|
|
ret
|
|
|