Fix PowerPC write barrier for real

db4
Slava Pestov 2008-05-09 18:24:41 -05:00
parent c035f86ca2
commit f42719aa98
1 changed files with 5 additions and 5 deletions

View File

@ -61,17 +61,17 @@ IN: cpu.ppc.intrinsics
: %write-barrier ( -- ) : %write-barrier ( -- )
"val" get operand-immediate? "obj" get fresh-object? or [ "val" get operand-immediate? "obj" get fresh-object? or [
"scratch1" operand card-mark LI card-mark "scratch1" operand LI
! Mark the card ! Mark the card
"val" operand load-cards-offset "val" operand load-cards-offset
"obj" operand "scratch2" operand card-bits SRWI "obj" operand "scratch2" operand card-bits SRWI
"scratch1" operand "scratch2" operand "val" operand STBX "scratch2" operand "scratch1" operand "val" operand STBX
! Mark the card deck ! Mark the card deck
"val" operand load-decks-offset "val" operand load-decks-offset
"obj" operand "scratch2" operand deck-bits SRWI "obj" operand "scratch2" operand deck-bits SRWI
"scratch1" operand "scratch2" operand "val" operand STBX "scratch2" operand "scratch1" operand "val" operand STBX
] unless ; ] unless ;
\ set-slot { \ set-slot {
@ -87,7 +87,7 @@ IN: cpu.ppc.intrinsics
{ {
[ %slot-literal-any-tag STW %write-barrier ] H{ [ %slot-literal-any-tag STW %write-barrier ] H{
{ +input+ { { f "val" } { f "obj" } { [ small-slot? ] "n" } } } { +input+ { { f "val" } { f "obj" } { [ small-slot? ] "n" } } }
{ +scratch+ { { f "scratch" } } } { +scratch+ { { f "scratch1" } { f "scratch2" } } }
{ +clobber+ { "val" } } { +clobber+ { "val" } }
} }
} }
@ -95,7 +95,7 @@ IN: cpu.ppc.intrinsics
{ {
[ %slot-any STWX %write-barrier ] H{ [ %slot-any STWX %write-barrier ] H{
{ +input+ { { f "val" } { f "obj" } { f "n" } } } { +input+ { { f "val" } { f "obj" } { f "n" } } }
{ +scratch+ { { f "scratch" } { f "offset" } } } { +scratch+ { { f "scratch1" } { f "scratch2" } { f "offset" } } }
{ +clobber+ { "val" } } { +clobber+ { "val" } }
} }
} }