Commit 8a9cbe08 authored by Sergei Trofimovich's avatar Sergei Trofimovich Committed by Ben Gamari
Browse files

powerpc32: fix stack allocation code generation

When ghc was built for powerpc32 built failed as:

It's a fallout of commit 3f46cffc

("PPC NCG: Refactor stack allocation code") where
word size used to be
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: default avatarSergei Trofimovich <>
(cherry picked from commit bb2ee86a)
parent 7ed5db87
...@@ -98,7 +98,7 @@ ppc_mkStackAllocInstr' platform amount ...@@ -98,7 +98,7 @@ ppc_mkStackAllocInstr' platform amount
, STU fmt r0 (AddrRegReg sp tmp) , STU fmt r0 (AddrRegReg sp tmp)
] ]
where where
fmt = intFormat $ widthFromBytes ((platformWordSize platform) `quot` 8) fmt = intFormat $ widthFromBytes (platformWordSize platform)
zero = ImmInt 0 zero = ImmInt 0
tmp = tmpReg platform tmp = tmpReg platform
immAmount = ImmInt amount immAmount = ImmInt amount
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment