remove build stuff
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
.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
|
||||
Binary file not shown.
@@ -1,65 +0,0 @@
|
||||
# ========== Builtin functions ==========
|
||||
function l $.cstring_len(l %str) {
|
||||
@start
|
||||
%count =l copy 0
|
||||
@loop
|
||||
%address =l add %str, %count
|
||||
%value =w loadub %address
|
||||
jnz %value, @continue, @end
|
||||
@continue
|
||||
%count =l add %count, 1
|
||||
jmp @loop
|
||||
@end
|
||||
ret %count
|
||||
}
|
||||
|
||||
function $.memcpy(l %source, l %destination, l %length) {
|
||||
@start
|
||||
%count =l copy 0
|
||||
@loop
|
||||
%condition =w cultl %count, %length
|
||||
jnz %condition, @continue, @end
|
||||
@continue
|
||||
%source_address =l add %source, %count
|
||||
%destination_address =l add %destination, %count
|
||||
%value =w loadub %source_address
|
||||
storeb %value, %destination_address
|
||||
%count =l add %count, 1
|
||||
jmp @loop
|
||||
@end
|
||||
ret
|
||||
}
|
||||
|
||||
function $.memset(l %destination, l %value, l %length) {
|
||||
@start
|
||||
%count =l copy 0
|
||||
@loop
|
||||
%condition =w cultl %count, %length
|
||||
jnz %condition, @continue, @end
|
||||
@continue
|
||||
%destination_address =l add %destination, %count
|
||||
storeb %value, %destination_address
|
||||
%count =l add %count, 1
|
||||
jmp @loop
|
||||
@end
|
||||
ret
|
||||
}
|
||||
|
||||
function l $.array_size(l %array) {
|
||||
@start
|
||||
%size =l loadl %array
|
||||
ret %size
|
||||
}
|
||||
|
||||
# ========== Referenced structs ==========
|
||||
|
||||
# ========== Struct definitions ==========
|
||||
# ========== Function definitions ==========
|
||||
export function l $main(l %args) {
|
||||
@start
|
||||
ret 0
|
||||
}
|
||||
|
||||
# ========== cstring literals ==========
|
||||
|
||||
# ========== string literals ==========
|
||||
Binary file not shown.
Reference in New Issue
Block a user