From 4315fc9f54d2af3aad9300d285f4fd8b387e9bca Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 18 May 2005 12:14:03 +0000 Subject: [PATCH] [project @ 2005-05-18 12:14:03 by simonmar] We should be using ASSIGN_DBL/PK_DBL for stores/loads respectively of doubles. Hopefully fixes SIGBUS on HPPA, and possible Sparc too. --- ghc/compiler/cmm/PprC.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ghc/compiler/cmm/PprC.hs b/ghc/compiler/cmm/PprC.hs index 1cb5366..f2c607b 100644 --- a/ghc/compiler/cmm/PprC.hs +++ b/ghc/compiler/cmm/PprC.hs @@ -184,6 +184,10 @@ pprStmt stmt = case stmt of -> ptext SLIT("ASSIGN_Word64") <> parens (mkP_ <> pprExpr1 dest <> comma <> pprExpr src) <> semi + | rep == F64 && wordRep /= I64 + -> ptext SLIT("ASSIGN_DBL") <> + parens (mkP_ <> pprExpr1 dest <> comma <> pprExpr src) <> semi + | otherwise -> hsep [ pprExpr (CmmLoad dest rep), equals, pprExpr src <> semi ] where @@ -300,6 +304,9 @@ pprExpr e = case e of CmmLoad e I64 | wordRep /= I64 -> ptext SLIT("PK_Word64") <> parens (mkP_ <> pprExpr1 e) + CmmLoad e F64 | wordRep /= I64 + -> ptext SLIT("PK_DBL") <> parens (mkP_ <> pprExpr1 e) + CmmLoad (CmmReg r) rep | isPtrReg r && rep == wordRep -> char '*' <> pprAsPtrReg r -- 1.7.10.4