X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fruntime%2Fmain%2FStgThreads.lhc;h=ffd0286eb3ef1c3375d30737ea55fa1ade7e3f61;hb=967cc47f37cb93a5e2b6df7822c9a646f0428247;hp=0bff4de676d0e529630e0dfe92ab8d539cfaf1c8;hpb=9736b6072412fa3498ce8a89d58aaafd07bc2358;p=ghc-hetmet.git diff --git a/ghc/runtime/main/StgThreads.lhc b/ghc/runtime/main/StgThreads.lhc index 0bff4de..ffd0286 100644 --- a/ghc/runtime/main/StgThreads.lhc +++ b/ghc/runtime/main/StgThreads.lhc @@ -161,7 +161,11 @@ STGFUN(RBH_entry) STGCALL3(void,(),GranSimBlock,CurrentTSO,CurrentProc,Node); # endif - switch (INFO_TYPE(InfoPtr)) { + /* In GranSim and GUM on 2.04 the InfoPtr seems to be invalid when entering + this routine (exact reason is unknown). This change does the safe + thing instead. -- HWL */ + + switch (INFO_TYPE(INFO_PTR(Node))) { /* HWL orig: INFO_TYPE(InfoPtr) */ case INFO_SPEC_RBH_TYPE: TSO_LINK(CurrentTSO) = (P_) SPEC_RBH_BQ(Node); SPEC_RBH_BQ(Node) = (W_) CurrentTSO; @@ -505,38 +509,5 @@ vtbl_Underflow[] = { (W_) UnderflowVect7 }; -\end{code} - -\begin{code} - -IFN_(seqDirectReturn) { - void *cont; - - FB_ - RetReg = (StgRetAddr) SpB[BREL(0)]; - cont = (void *) SpB[BREL(1)]; - /* SpB += BREL(2); */ - JMP_(cont); - FE_ -} - -/* - NB: For direct returns to work properly, the name of the routine must be - the same as the name of the vector table with vtbl_ removed and DirectReturn - appended. This is all the mangler understands. - */ - -const W_ -vtbl_seq[] = { - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn -}; - #endif /* CONCURRENT */ \end{code}