X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FCmm.h;h=c0b2fe991a4ba20f73c552647ef1baa81ff05a51;hb=eb0e20bd2c73df8c6e2eb05f6545ced2e9b91b75;hp=d47e6fdaa64bcf9d9b5e434958d7c81e81edd13e;hpb=68ed90d8b2f31f9bcae7b869413819eb8fa0aa40;p=ghc-hetmet.git diff --git a/includes/Cmm.h b/includes/Cmm.h index d47e6fd..c0b2fe9 100644 --- a/includes/Cmm.h +++ b/includes/Cmm.h @@ -25,7 +25,7 @@ * - Hp += n ==> Hp_adj(n) * - R1.i ==> R1 (similarly for R1.w, R1.cl etc.) * - You need to explicitly dereference variables; eg. - * context_switch ==> CInt[context_switch] + * alloc_blocks ==> CInt[alloc_blocks] * - convert all word offsets into byte offsets: * - e ==> WDS(e) * - sizeofW(StgFoo) ==> SIZEOF_StgFoo @@ -102,18 +102,8 @@ #endif /* - * The RTS must UNTAG a pointer before dereferencing it. - * The use of UNTAG follows the following rules of thumb: - * - * - Any pointer might be tagged. - * - Except the pointers that are passed in R1 to RTS functions. - * - R1 is also untagged when entering constructor code. - * - * TODO: - * - * - Remove redundancies of tagging and untagging in code generation. - * - Optimize getTag or dataToTag# ? - * + * The RTS must sometimes UNTAG a pointer before dereferencing it. + * See the wiki page Commentary/Rts/HaskellExecution/PointerTagging */ #define TAG_MASK ((1 << TAG_BITS) - 1) #define UNTAG(p) (p & ~TAG_MASK) @@ -311,7 +301,7 @@ #include "ClosureTypes.h" #include "StgFun.h" #include "OSThreads.h" -#include "SMP.h" +#include "SMPClosureOps.h" /* * Need MachRegs, because some of the RTS code is conditionally @@ -554,9 +544,6 @@ #define END_TSO_QUEUE stg_END_TSO_QUEUE_closure #define END_INVARIANT_CHECK_QUEUE stg_END_INVARIANT_CHECK_QUEUE_closure -#define dirtyTSO(tso) \ - StgTSO_flags(tso) = StgTSO_flags(tso) | TSO_DIRTY::I32; - #define recordMutableCap(p, gen, regs) \ W_ __bd; \ W_ mut_list; \