diff options
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/compiler/codeGen/CgPrimOp.hs | 3 | ||||
-rw-r--r-- | ghc/includes/RtsExternal.h | 2 | ||||
-rw-r--r-- | ghc/includes/Storage.h | 2 | ||||
-rw-r--r-- | ghc/rts/PrimOps.cmm | 2 | ||||
-rw-r--r-- | ghc/rts/Storage.c | 5 |
5 files changed, 8 insertions, 6 deletions
diff --git a/ghc/compiler/codeGen/CgPrimOp.hs b/ghc/compiler/codeGen/CgPrimOp.hs index 7de4516af7..c1264be62f 100644 --- a/ghc/compiler/codeGen/CgPrimOp.hs +++ b/ghc/compiler/codeGen/CgPrimOp.hs @@ -134,7 +134,8 @@ emitPrimOp [] WriteMutVarOp [mutv,var] live stmtC (CmmCall (CmmForeignCall (CmmLit (CmmLabel mkDirty_MUT_VAR_Label)) CCallConv) [{-no results-}] - [(mutv,PtrHint)] + [(CmmReg (CmmGlobal BaseReg), PtrHint), + (mutv,PtrHint)] (Just vols)) -- #define sizzeofByteArrayzh(r,a) \ diff --git a/ghc/includes/RtsExternal.h b/ghc/includes/RtsExternal.h index c5f5043e5c..61a920b0ab 100644 --- a/ghc/includes/RtsExternal.h +++ b/ghc/includes/RtsExternal.h @@ -91,6 +91,6 @@ extern void performMajorGC(void); extern void performGCWithRoots(void (*get_roots)(evac_fn)); extern HsInt64 getAllocations( void ); extern void revertCAFs( void ); -extern void dirty_MUT_VAR(StgClosure *); +extern void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p); #endif /* RTSEXTERNAL_H */ diff --git a/ghc/includes/Storage.h b/ghc/includes/Storage.h index c339c4e012..8709f1824b 100644 --- a/ghc/includes/Storage.h +++ b/ghc/includes/Storage.h @@ -269,7 +269,7 @@ extern rtsBool keepCAFs; and is put on the mutable list. -------------------------------------------------------------------------- */ -void dirty_MUT_VAR(StgClosure *p); +void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p); /* ----------------------------------------------------------------------------- DEBUGGING predicates for pointers diff --git a/ghc/rts/PrimOps.cmm b/ghc/rts/PrimOps.cmm index 58948da25a..049e4e25f5 100644 --- a/ghc/rts/PrimOps.cmm +++ b/ghc/rts/PrimOps.cmm @@ -228,7 +228,7 @@ atomicModifyMutVarzh_fast StgThunk_payload(y,0) = z; StgMutVar_var(R1) = y; - foreign "C" dirty_MUT_VAR(R1 "ptr") [R1]; + foreign "C" dirty_MUT_VAR(BaseReg "ptr", R1 "ptr") [R1]; TICK_ALLOC_THUNK_1(); CCCS_ALLOC(THUNK_1_SIZE); diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index 28ccf79f50..58687302ef 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -766,11 +766,12 @@ allocatePinned( nat n ) -------------------------------------------------------------------------- */ void -dirty_MUT_VAR(StgClosure *p) +dirty_MUT_VAR(StgRegTable *reg, StgClosure *p) { + Capability *cap = regTableToCapability(reg); if (p->header.info == &stg_MUT_VAR_CLEAN_info) { p->header.info = &stg_MUT_VAR_DIRTY_info; - recordMutable(p); + recordMutableCap(p,cap,Bdescr(p)->gen_no); } } |