Simpler write barrier, upate PowerPC write barrier
parent
2148c5eb6c
commit
793c58f7a2
|
@ -56,14 +56,25 @@ IN: cpu.ppc.intrinsics
|
|||
: load-cards-offset ( dest -- )
|
||||
"cards_offset" f pick %load-dlsym dup 0 LWZ ;
|
||||
|
||||
: load-decks-offset ( dest -- )
|
||||
"decks_offset" f pick %load-dlsym dup 0 LWZ ;
|
||||
|
||||
: %write-barrier ( -- )
|
||||
"val" get operand-immediate? "obj" get fresh-object? or [
|
||||
! Mark the card
|
||||
"obj" operand "scratch" operand card-bits SRWI
|
||||
"val" operand load-cards-offset
|
||||
"scratch" operand dup "val" operand ADD
|
||||
"val" operand "scratch" operand 0 LBZ
|
||||
"val" operand dup card-mark ORI
|
||||
"val" operand "scratch" operand 0 STB
|
||||
|
||||
! Mark the card deck
|
||||
"obj" operand "scratch" operand deck-bits SRWI
|
||||
"val" operand load-decks-offset
|
||||
"scratch" operand dup "val" operand ADD
|
||||
card-mark "val" operand LI
|
||||
"val" operand "scratch" operand 0 STB
|
||||
] unless ;
|
||||
|
||||
\ set-slot {
|
||||
|
|
|
@ -71,7 +71,7 @@ IN: cpu.x86.intrinsics
|
|||
! Mark the card deck
|
||||
"obj" operand deck-bits card-bits - SHR
|
||||
"decks_offset" f temp-reg v>operand %alien-global
|
||||
temp-reg v>operand "obj" operand [+] card-mark OR
|
||||
temp-reg v>operand "obj" operand [+] card-mark MOV
|
||||
] unless ;
|
||||
|
||||
\ set-slot {
|
||||
|
|
Loading…
Reference in New Issue