From 6f0e4c4d40697af1e63d0feb01b6a1accd128ef8 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 12 Jun 2000 11:04:12 +0000 Subject: [PATCH] [project @ 2000-06-12 11:04:12 by simonmar] Fix a nasty bug: the 'c' component of StgUnion was declared as type StgChar, which sounds reasonable, but meant that when assigning a char to R1 gcc would correctly arrange to only overwrite the low byte rather than zero-extending the value. We assume elsewhere that when R1 contains a char that the upper 24 bits are zero, so this was wrong. This bug must have been around for a *long* time, strange that it only just showed up. --- ghc/includes/StgTypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/includes/StgTypes.h b/ghc/includes/StgTypes.h index 4b367ac..e6b87f9 100644 --- a/ghc/includes/StgTypes.h +++ b/ghc/includes/StgTypes.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgTypes.h,v 1.11 2000/04/13 15:37:11 panne Exp $ + * $Id: StgTypes.h,v 1.12 2000/06/12 11:04:12 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -160,7 +160,7 @@ typedef StgFunPtr StgFun(void); typedef union { StgWord w; StgAddr a; - StgChar c; + StgWord c; StgFloat f; StgInt i; StgPtr p; -- 1.7.10.4