diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-11-02 06:26:22 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-11-02 06:26:22 +1100 |
commit | 19ce8a53e8074a7e56fd462e43750386e67edcd4 (patch) | |
tree | b5b5bb088009736e55421fe0fdc63ad89bf3174c /compiler/cmm/PprC.hs | |
parent | 0b70ec0c3b72a7f87776743e64b47b65ef0ca4a5 (diff) | |
download | haskell-19ce8a53e8074a7e56fd462e43750386e67edcd4.tar.gz |
Sparc*: Prevent GHC from doing unaligned accesses
This is specifically for the C backend on Sparc64 (which has
no native backend) but is also required for Sparc when building
un-registerised.
Bug reported via Debian (patch included):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842780
Test Plan: validate
Reviewers: hvr, Phyx, bgamari, austin, simonmar
Reviewed By: Phyx
Subscribers: jrtc27, thomie
Differential Revision: https://phabricator.haskell.org/D2661
GHC Trac Issues: #12793
Diffstat (limited to 'compiler/cmm/PprC.hs')
-rw-r--r-- | compiler/cmm/PprC.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index 331dd67603..6380451cc9 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -1110,6 +1110,8 @@ cLoad expr rep bewareLoadStoreAlignment ArchMipsel = True bewareLoadStoreAlignment (ArchARM {}) = True bewareLoadStoreAlignment ArchARM64 = True + bewareLoadStoreAlignment ArchSPARC = True + bewareLoadStoreAlignment ArchSPARC64 = True -- Pessimistically assume that they will also cause problems -- on unknown arches bewareLoadStoreAlignment ArchUnknown = True |