aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-08-15 11:19:56 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2023-08-15 11:19:56 +0200
commit2e1dfe4b2943fa4339081b8bb1ce03ed9470169d (patch)
tree9de676545f81fd74675b813186400cd1b5fddfde /include
parent27a869869a20047bc1798a16bf87b3b4970c5f2d (diff)
downloaduskel-2e1dfe4b2943fa4339081b8bb1ce03ed9470169d.tar.gz
uskel-2e1dfe4b2943fa4339081b8bb1ce03ed9470169d.tar.bz2
unify stuffs
Diffstat (limited to 'include')
-rw-r--r--include/data.s12
-rw-r--r--include/io.s4
-rw-r--r--include/uskel.s4
3 files changed, 10 insertions, 10 deletions
diff --git a/include/data.s b/include/data.s
index 51f31dc..2c512d4 100644
--- a/include/data.s
+++ b/include/data.s
@@ -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
diff --git a/include/io.s b/include/io.s
index 7e78c1b..205f144 100644
--- a/include/io.s
+++ b/include/io.s
@@ -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
diff --git a/include/uskel.s b/include/uskel.s
index 136b382..34ee63a 100644
--- a/include/uskel.s
+++ b/include/uskel.s
@@ -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