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