unify stuffs
This commit is contained in:
parent
27a869869a
commit
2e1dfe4b29
|
@ -7,7 +7,7 @@ _data_s_file:
|
|||
CON_evacuate1:
|
||||
retq # TODO
|
||||
CON_scavenge1:
|
||||
add $0x10, %rsi
|
||||
add $020, %rsi
|
||||
retq
|
||||
|
||||
# Format of the info tables:
|
||||
|
@ -31,7 +31,7 @@ LIST_evacuate:
|
|||
# [] | a : b
|
||||
retq #TODO
|
||||
LIST_scavenge:
|
||||
mov 0x8(%rbp), %rax
|
||||
mov 010(%rbp), %rax
|
||||
shl $1, %rax
|
||||
add $2, %rax
|
||||
shl $3, %rax
|
||||
|
@ -49,7 +49,7 @@ LIST_code:
|
|||
FUN_evacuate:
|
||||
retq #TODO
|
||||
FUN_scavenge:
|
||||
mov 0x10(%rbp), %rax
|
||||
mov 020(%rbp), %rax
|
||||
add $3, %rax
|
||||
shl $3, %rax
|
||||
add %rax, %rsi
|
||||
|
@ -98,14 +98,14 @@ FUN4_code:
|
|||
IND_evacuate:
|
||||
retq #TODO
|
||||
IND_scavenge:
|
||||
add $0x10,%rsi
|
||||
add $020,%rsi
|
||||
retq
|
||||
IND_info:
|
||||
cell IND_evacuate
|
||||
cell IND_scavenge
|
||||
cell 0
|
||||
IND_code:
|
||||
enter 0x8(%rbp)
|
||||
enter 010(%rbp)
|
||||
|
||||
# THU objects (gc implementation only, actual THUs are defined by functions)
|
||||
# | ptr | args | arg[0] | arg[1] | ... | arg[args] |
|
||||
|
@ -113,7 +113,7 @@ IND_code:
|
|||
THU_evacuate:
|
||||
retq #TODO
|
||||
THU_scavenge:
|
||||
mov 0x8(%rbp), %rax
|
||||
mov 010(%rbp), %rax
|
||||
add $2,%rax
|
||||
shl $3,%rax
|
||||
add %rax,%rsi
|
||||
|
|
|
@ -15,14 +15,14 @@ _io_s_file:
|
|||
mov %rsp, %r15
|
||||
sub $1, %r15
|
||||
movb $0x0a, (%r15)
|
||||
print_fini_next:
|
||||
print_fini_loop:
|
||||
mov %al, %bl
|
||||
and $1, %bl
|
||||
add $0x30, %bl
|
||||
sub $1, %r15
|
||||
movb %bl, (%r15)
|
||||
shr $1, %rax
|
||||
jnz print_fini_next
|
||||
jnz print_fini_loop
|
||||
|
||||
mov $0, %rdi #stdin
|
||||
mov %rsp, %rdx
|
||||
|
|
|
@ -20,10 +20,10 @@ _memory_state:
|
|||
_uskel_alloc_basic_mem:
|
||||
mov $0x100000, %r15 # desired size
|
||||
|
||||
mov $0x9, %rax # mmap
|
||||
mov $9, %rax # mmap
|
||||
mov $0, %rdi # addr = NULL
|
||||
mov %r15, %rsi # len = %rcx
|
||||
mov $0x3, %rdx # prot = PROT_READ 0x1 | PROT_WRITE 0x2
|
||||
mov $0b11, %rdx # prot = PROT_READ 0b1 | PROT_WRITE 0b10
|
||||
mov $0x22, %r10 # flags = MAP_PRIVATE 0x2 | MAP_ANONYMOUS 0x20
|
||||
mov $-1, %r8 # fd = -1
|
||||
mov $0, %r9 # off = 0
|
||||
|
|
Loading…
Reference in a new issue