From 61fe034e3ef9361adff884d8401ef72e506ab3f7 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 31 Jul 2009 23:47:07 -0500 Subject: [PATCH] cpu.ppc: put spill slots and GC roots in stack frame where subroutine calls can't clobber them --- basis/cpu/ppc/ppc.factor | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/basis/cpu/ppc/ppc.factor b/basis/cpu/ppc/ppc.factor index 294de707fb..14d271c31c 100644 --- a/basis/cpu/ppc/ppc.factor +++ b/basis/cpu/ppc/ppc.factor @@ -90,14 +90,14 @@ HOOK: reserved-area-size os ( -- n ) reserved-area-size param-save-size + + ; inline : spill-integer@ ( n -- offset ) - spill-integer-offset param@ ; + spill-integer-offset local@ ; : spill-float@ ( n -- offset ) - spill-float-offset param@ ; + spill-float-offset local@ ; ! Some FP intrinsics need a temporary scratch area in the stack ! frame, 8 bytes in size. This is in the param-save area so it -! should not overlap with spill slots. +! does not overlap with spill slots. : scratch@ ( n -- offset ) stack-frame get total-size>> factor-area-size - @@ -106,7 +106,7 @@ HOOK: reserved-area-size os ( -- n ) ! GC root area : gc-root@ ( n -- offset ) - gc-root-offset param@ ; + gc-root-offset local@ ; ! Finally we have the linkage area HOOK: lr-save os ( -- n ) @@ -415,7 +415,7 @@ M:: ppc %load-gc-root ( gc-root register -- ) M:: ppc %call-gc ( gc-root-count -- ) %prepare-alien-invoke - 3 1 gc-root-base param@ ADDI + 3 1 gc-root-base local@ ADDI gc-root-count 4 LI "inline_gc" f %alien-invoke ;