uskel/macros.s
2023-08-02 21:29:26 +02:00

34 lines
402 B
ArmAsm

.macro enter x
mov \x, %rbp
jmp *(%rbp)
.endm
.macro cell x
.quad \x
.endm
.macro continue
mov %rsi, %rax
mov %rbp, %rsi
enter %rax
.endm
.macro thunkenv arg, dest
mov (8*(\arg+2))(%rbp), \dest
.endm
.macro enter_thunkenv arg
mov (8*(\arg+2))(%rbp), %rbp
jmp *(%rbp)
.endm
.macro .makethunk name
.align 8
\name\()_info:
cell THU_evacuate
cell THU_scavenge
cell 0
\name:
.endm