diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-03-20 22:46:33 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-05-31 01:57:31 -0400 |
commit | bb2ee86a4cf47eb56d4b8b4a552537449d492f88 (patch) | |
tree | 939c78eddac3380c5bcd88a0b0f3d8ffc0fec09f | |
parent | 973077ac63c79988f2d5f25d13b60dce82f9e8dd (diff) | |
download | haskell-bb2ee86a4cf47eb56d4b8b4a552537449d492f88.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>
-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 79cc7aeefb..3bf19f2dc6 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 |