[commit: ghc] master: Pessimistically assume that unknown arches can't do unaligned loads (b85a849)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b85a849bce3f7db858a7debebbaff04cdfec6b1d

>---------------------------------------------------------------

commit b85a849bce3f7db858a7debebbaff04cdfec6b1d
Author: Ian Lynagh <[email protected]>
Date:   Fri Dec 7 16:15:24 2012 +0000

    Pessimistically assume that unknown arches can't do unaligned loads

>---------------------------------------------------------------

 compiler/cmm/PprC.hs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index f323097..927f7eb 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -1001,6 +1001,9 @@ cLoad expr rep
           bewareLoadStoreAlignment ArchMipseb   = True
           bewareLoadStoreAlignment ArchMipsel   = True
           bewareLoadStoreAlignment (ArchARM {}) = True
+          -- Pessimistically assume that they will also cause problems
+          -- on unknown arches
+          bewareLoadStoreAlignment ArchUnknown  = True
           bewareLoadStoreAlignment _            = False
 
 isCmmWordType :: DynFlags -> CmmType -> Bool
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.