X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FHeapStackCheck.cmm;h=a4fb5c0a16729402bb9c36d20280426360091c12;hb=0b9530245a33b8206ca38b9de6dfb01e056fd8dc;hp=f40fbf5519743893f8a4fd6c74ce8a56a252eb5a;hpb=0598a001b9d852a044a49f8fb6ab1a6b02a77d9e;p=ghc-hetmet.git diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm index f40fbf5..a4fb5c0 100644 --- a/rts/HeapStackCheck.cmm +++ b/rts/HeapStackCheck.cmm @@ -12,6 +12,10 @@ #include "Cmm.h" +#ifdef __PIC__ +import pthread_mutex_unlock; +#endif + /* Stack/Heap Check Failure * ------------------------ * @@ -568,7 +572,7 @@ __stg_gc_fun W_ info; W_ type; - info = %GET_FUN_INFO(R1); + info = %GET_FUN_INFO(UNTAG(R1)); // cache the size type = TO_W_(StgFunInfoExtra_fun_type(info)); @@ -579,7 +583,7 @@ __stg_gc_fun #ifdef TABLES_NEXT_TO_CODE // bitmap field holds an offset size = StgLargeBitmap_size( StgFunInfoExtra_bitmap(info) - + %GET_ENTRY(R1) /* ### */ ); + + %GET_ENTRY(UNTAG(R1)) /* ### */ ); #else size = StgLargeBitmap_size( StgFunInfoExtra_bitmap(info) ); #endif @@ -629,12 +633,12 @@ INFO_TABLE_RET( stg_gc_fun, RET_FUN ) #ifdef NO_ARG_REGS // Minor optimisation: there are no argument registers to load up, // so we can just jump straight to the function's entry point. - jump %GET_ENTRY(R1); + jump %GET_ENTRY(UNTAG(R1)); #else W_ info; W_ type; - info = %GET_FUN_INFO(R1); + info = %GET_FUN_INFO(UNTAG(R1)); type = TO_W_(StgFunInfoExtra_fun_type(info)); if (type == ARG_GEN || type == ARG_GEN_BIG) { jump StgFunInfoExtra_slow_apply(info);