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 ;
|
0 CALL f rc-relative rel-dlsym ;
|
||||||
|
|
||||||
[
|
[
|
||||||
! save stack frame size
|
! store entry point
|
||||||
stack-frame-size PUSH
|
ESP bootstrap-cell 2 * neg [+] 0 MOV rc-absolute-cell rel-this
|
||||||
! push entry point
|
! store stack frame size
|
||||||
0 PUSH rc-absolute-cell rel-this
|
ESP bootstrap-cell neg [+] stack-frame-size MOV
|
||||||
! alignment
|
! alignment
|
||||||
ESP stack-frame-size 3 bootstrap-cells - SUB
|
ESP stack-frame-size bootstrap-cell - SUB
|
||||||
] jit-prolog jit-define
|
] jit-prolog jit-define
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
@ -36,12 +36,12 @@ IN: bootstrap.x86
|
||||||
[
|
[
|
||||||
! load entry point
|
! load entry point
|
||||||
RAX 0 MOV rc-absolute-cell rel-this
|
RAX 0 MOV rc-absolute-cell rel-this
|
||||||
! save stack frame size
|
! store entry point
|
||||||
stack-frame-size PUSH
|
RSP bootstrap-cell 2 * neg [+] RAX MOV
|
||||||
! push entry point
|
! store stack frame size
|
||||||
RAX PUSH
|
RSP bootstrap-cell neg [+] stack-frame-size MOV
|
||||||
! alignment
|
! alignment
|
||||||
RSP stack-frame-size 3 bootstrap-cells - SUB
|
RSP stack-frame-size bootstrap-cell - SUB
|
||||||
] jit-prolog jit-define
|
] jit-prolog jit-define
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue