diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-03-20 22:46:33 +0000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-06-24 18:35:12 -0400 |
commit | 8a9cbe08246712b7e81f0117d0b238af0a32448f (patch) | |
tree | 9f5e68dca9d684ae96f81abe06b4cf4c2e75ef3d | |
parent | 7ed5db876fd9f6a4a4ba5411128fbf56888a1b62 (diff) | |
download | haskell-8a9cbe08246712b7e81f0117d0b238af0a32448f.tar.gz |
powerpc32: fix stack allocation code generation
When ghc was built for powerpc32 built failed as:
It's a fallout of commit 3f46cffcc2850e68405a1
("PPC NCG: Refactor stack allocation code") where
word size used to be
II32/II64
and changed to
II8/panic "no width for given number of bytes"
widthFromBytes ((platformWordSize platform) `quot` 8)
The change restores initial behaviour by removing extra division.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
(cherry picked from commit bb2ee86a4cf47eb56d4b8b4a552537449d492f88)
-rw-r--r-- | compiler/nativeGen/PPC/Instr.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs index e618e189b8..c0c5548ae3 100644 --- a/compiler/nativeGen/PPC/Instr.hs +++ b/compiler/nativeGen/PPC/Instr.hs @@ -98,7 +98,7 @@ ppc_mkStackAllocInstr' platform amount , STU fmt r0 (AddrRegReg sp tmp) ] where - fmt = intFormat $ widthFromBytes ((platformWordSize platform) `quot` 8) + fmt = intFormat $ widthFromBytes (platformWordSize platform) zero = ImmInt 0 tmp = tmpReg platform immAmount = ImmInt amount |