From 68518e741e9b9112e7acbc49506bd954c36ecd30 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 21 Oct 2011 10:53:44 -0700 Subject: [PATCH] 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. --- basis/cpu/x86/32/bootstrap.factor | 10 +++++----- basis/cpu/x86/64/bootstrap.factor | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/basis/cpu/x86/32/bootstrap.factor b/basis/cpu/x86/32/bootstrap.factor index 184c0e6b33..5e0561bfca 100755 --- a/basis/cpu/x86/32/bootstrap.factor +++ b/basis/cpu/x86/32/bootstrap.factor @@ -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 [ diff --git a/basis/cpu/x86/64/bootstrap.factor b/basis/cpu/x86/64/bootstrap.factor index 5191f3993c..cc209746ea 100755 --- a/basis/cpu/x86/64/bootstrap.factor +++ b/basis/cpu/x86/64/bootstrap.factor @@ -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 [