From: panne Date: Sun, 6 Aug 2000 12:22:32 +0000 (+0000) Subject: [project @ 2000-08-06 12:22:32 by panne] X-Git-Tag: Approximately_9120_patches~3912 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=803030e7b6d014fc739d9dfcf6769af23fc868f3;p=ghc-hetmet.git [project @ 2000-08-06 12:22:32 by panne] Fixed conversion of MachWord to MachInt for large literals. Although completely untested, I believe this fixes bug #111021. --- diff --git a/ghc/compiler/basicTypes/Literal.lhs b/ghc/compiler/basicTypes/Literal.lhs index 3d53165..b8f495e 100644 --- a/ghc/compiler/basicTypes/Literal.lhs +++ b/ghc/compiler/basicTypes/Literal.lhs @@ -152,7 +152,7 @@ word2IntLit, int2WordLit, char2IntLit, int2CharLit, addr2IntLit, int2AddrLit, float2DoubleLit, double2FloatLit :: Literal -> Literal word2IntLit (MachWord w) - | w > tARGET_MAX_INT = MachInt ((-1) + tARGET_MAX_WORD - w) + | w > tARGET_MAX_INT = MachInt (w - tARGET_MAX_WORD - 1) | otherwise = MachInt w int2WordLit (MachInt i)