This repository has been archived on 2025-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nub-lang-archive-2/examples/array/.build/out.asm
nub31 ed72afe335 ..
2025-10-02 14:26:42 +02:00

80 lines
1.1 KiB
NASM

.text
.cstring_len:
pushq %rbp
movq %rsp, %rbp
movl $0, %eax
.Lbb2:
movzbl (%rdi, %rax, 1), %ecx
cmpl $0, %ecx
jz .Lbb4
addq $1, %rax
jmp .Lbb2
.Lbb4:
leave
ret
.type .cstring_len, @function
.size .cstring_len, .-.cstring_len
/* end function .cstring_len */
.text
.memcpy:
pushq %rbp
movq %rsp, %rbp
movl $0, %eax
.Lbb7:
cmpq %rdx, %rax
jae .Lbb9
movzbl (%rdi, %rax, 1), %ecx
movb %cl, (%rsi, %rax, 1)
addq $1, %rax
jmp .Lbb7
.Lbb9:
leave
ret
.type .memcpy, @function
.size .memcpy, .-.memcpy
/* end function .memcpy */
.text
.memset:
pushq %rbp
movq %rsp, %rbp
movl $0, %eax
.Lbb12:
cmpq %rdx, %rax
jae .Lbb14
movb %sil, (%rdi, %rax, 1)
addq $1, %rax
jmp .Lbb12
.Lbb14:
leave
ret
.type .memset, @function
.size .memset, .-.memset
/* end function .memset */
.text
.array_size:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
leave
ret
.type .array_size, @function
.size .array_size, .-.array_size
/* end function .array_size */
.text
.globl main
main:
pushq %rbp
movq %rsp, %rbp
movl $0, %eax
leave
ret
.type main, @function
.size main, .-main
/* end function main */
.section .note.GNU-stack,"",@progbits