[project @ 1998-11-26 09:17:22 by sof]
[ghc-hetmet.git] / ghc / runtime / main / StgThreads.lhc
index 0bff4de..ffd0286 100644 (file)
@@ -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}