Skip to content
Snippets Groups Projects
Commit bb2ee86a authored by Sergei Trofimovich's avatar Sergei Trofimovich Committed by Marge Bot
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
    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: default avatarSergei Trofimovich <slyfox@gentoo.org>
parent 973077ac
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment