X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStgRegs.lh;h=10f447e3dd9e9bc4db24c15e5ab98875231cfcf8;hb=967cc47f37cb93a5e2b6df7822c9a646f0428247;hp=ddeebf375f2979f56dcf7b4b57231de76a1895f3;hpb=606ec8dcf1dcdfbe7c9cfca131fdb2c95808bc13;p=ghc-hetmet.git diff --git a/ghc/includes/StgRegs.lh b/ghc/includes/StgRegs.lh index ddeebf3..10f447e 100644 --- a/ghc/includes/StgRegs.lh +++ b/ghc/includes/StgRegs.lh @@ -45,6 +45,20 @@ void SaveAllStgRegs(STG_NO_ARGS) /* CurrentRegTable = BaseReg; */ # endif #endif +/* Hack!!! slam the current C stack pointer into the reg. table + in the event that we need to copy a chunk of the C stack + before entering Haskell via a stable pointer (contact + for (gruesome) details!) + + Only save this once. + + ToDo: support this across platforms. +*/ +#if 0 && defined(CONCURRENT) && defined(i386_TARGET_ARCH) + if (CurrentTSO != CurrentTSOinC) { + __asm__ volatile (" mov %%esp,%0" : "m=" (CurrentRegTable->rCstkptr)); + } +#endif #ifdef REG_R1 SAVE_R1 = R1; @@ -102,6 +116,14 @@ void SaveAllStgRegs(STG_NO_ARGS) SAVE_Dbl2 = DblReg2; #endif +#ifdef REG_Lng1 + SAVE_Lng1 = LngReg1; +#endif + +#ifdef REG_Lng2 + SAVE_Lng2 = LngReg2; +#endif + #ifdef REG_Tag SAVE_Tag = TagReg; #endif @@ -240,6 +262,14 @@ RestoreAllStgRegs (STG_NO_ARGS) DblReg2 = SAVE_Dbl2; #endif +#ifdef REG_Lng1 + LngReg1 = SAVE_Lng1; +#endif + +#ifdef REG_Lng2 + LngReg2 = SAVE_Lng2; +#endif + #ifdef REG_Tag TagReg = SAVE_Tag; #endif