diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-03-14 11:41:53 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-03-14 11:41:53 +0000 |
commit | 63ca0a1e77711bae4f8543d14e5e6bd1f35487bd (patch) | |
tree | 879df7f30f71ee285b6b98769ef9ff31f89f8d77 /ghc/includes | |
parent | c56641e7752db313effe332b81f9e56275342fbd (diff) | |
download | haskell-63ca0a1e77711bae4f8543d14e5e6bd1f35487bd.tar.gz |
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").
Diffstat (limited to 'ghc/includes')
-rw-r--r-- | ghc/includes/Cmm.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ghc/includes/Cmm.h b/ghc/includes/Cmm.h index ea760a860f..783b0e41bb 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); \ } \ } |