From: Simon Marlow Date: Tue, 14 Mar 2006 11:41:53 +0000 (+0000) Subject: ENTER(): avoid re-reading the info pointer of the closure when entering it X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=63ca0a1e77711bae4f8543d14e5e6bd1f35487bd ENTER(): avoid re-reading the info pointer of the closure when entering it This fixes another instance of a subtle SMP bug (see patch "really nasty bug in SMP"). --- diff --git a/ghc/includes/Cmm.h b/ghc/includes/Cmm.h index ea760a8..783b0e4 100644 --- a/ghc/includes/Cmm.h +++ b/ghc/includes/Cmm.h @@ -232,9 +232,11 @@ #define ENTER() \ again: \ + W_ info; \ + info = %INFO_PTR(R1); \ switch [INVALID_OBJECT .. N_CLOSURE_TYPES] \ - (TO_W_( %INFO_TYPE(%GET_STD_INFO(R1)) )) { \ - case \ + (TO_W_( %INFO_TYPE(%STD_INFO(info)) )) { \ + case \ IND, \ IND_OLDGEN, \ IND_PERM, \ @@ -244,7 +246,7 @@ R1 = StgInd_indirectee(R1); \ goto again; \ } \ - case \ + case \ BCO, \ FUN, \ FUN_1_0, \ @@ -259,7 +261,7 @@ } \ default: \ { \ - jump %GET_ENTRY(R1); \ + jump %ENTRY_CODE(info); \ } \ }