cpu.x86.(32,64).bootstrap: get rid of PUSH malarky
In the function prologue, move the stack pointer once after the stack frame is set up instead of PUSHing the stack frame piece by piece.db4
parent
1a673e30f5
commit
68518e741e
|
@ -34,12 +34,12 @@ IN: bootstrap.x86
|
|||
0 CALL f rc-relative rel-dlsym ;
|
||||
|
||||
[
|
||||
! save stack frame size
|
||||
stack-frame-size PUSH
|
||||
! push entry point
|
||||
0 PUSH rc-absolute-cell rel-this
|
||||
! store entry point
|
||||
ESP bootstrap-cell 2 * neg [+] 0 MOV rc-absolute-cell rel-this
|
||||
! store stack frame size
|
||||
ESP bootstrap-cell neg [+] stack-frame-size MOV
|
||||
! alignment
|
||||
ESP stack-frame-size 3 bootstrap-cells - SUB
|
||||
ESP stack-frame-size bootstrap-cell - SUB
|
||||
] jit-prolog jit-define
|
||||
|
||||
[
|
||||
|
|
|
@ -36,12 +36,12 @@ IN: bootstrap.x86
|
|||
[
|
||||
! load entry point
|
||||
RAX 0 MOV rc-absolute-cell rel-this
|
||||
! save stack frame size
|
||||
stack-frame-size PUSH
|
||||
! push entry point
|
||||
RAX PUSH
|
||||
! store entry point
|
||||
RSP bootstrap-cell 2 * neg [+] RAX MOV
|
||||
! store stack frame size
|
||||
RSP bootstrap-cell neg [+] stack-frame-size MOV
|
||||
! alignment
|
||||
RSP stack-frame-size 3 bootstrap-cells - SUB
|
||||
RSP stack-frame-size bootstrap-cell - SUB
|
||||
] jit-prolog jit-define
|
||||
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue