Commit be6405f1 authored by John Paul Adrian Glaubitz's avatar John Paul Adrian Glaubitz
Browse files

ghc: backport upstream patch to fix 64-bit comparision on powerpc

parent a5119303
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
ghc (8.6.5+dfsg1-4) UNRELEASED; urgency=medium

  [ John Paul Adrian Glaubitz ]
  * debian/patches/powerpc-fix-64-bit-comparision.patch
    - backport upstream patch to fix 64-bit comparision on powerpc

 -- John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>  Fri, 09 Aug 2019 13:21:37 +0200

ghc (8.6.5+dfsg1-3) unstable; urgency=medium

  [ Gianfranco Costamagna ]
+29 −0
Original line number Diff line number Diff line
Description: powerpc32: fix 64-bit comparison
 On powerpc32 64-bit comparison code generated dangling
 target labels. This caused ghc build failure as:

    $ ./configure --target=powerpc-unknown-linux-gnu && make
    ...
    SCCs aren't in reverse dependent order
    bad blockId n3U

 This happened because condIntCode' in PPC codegen generated
 label name but did not place the label into `cmp_lo` code block.

 The change adds the `cmp_lo` label into the case of negative
 comparison.
 Signed-off-by: 's avatarSergei Trofimovich <slyfox@gentoo.org>
 .
Origin: https://gitlab.haskell.org/ghc/ghc/commit/25dce3fc05e4788240ac6d192919063a9f548f7f
Last-Update: 2019-08-09

--- ghc-8.6.5+dfsg1.orig/compiler/nativeGen/PPC/CodeGen.hs
+++ ghc-8.6.5+dfsg1/compiler/nativeGen/PPC/CodeGen.hs
@@ -923,6 +923,7 @@ condIntCode' True cond W64 x y
                  , BCC LE cmp_lo Nothing
                  , CMPL II32 x_lo (RIReg y_lo)
                  , BCC ALWAYS end_lbl Nothing
+		 , NEWBLOCK cmp_lo
                  , CMPL II32 y_lo (RIReg x_lo)
                  , BCC ALWAYS end_lbl Nothing
 
+1 −0
Original line number Diff line number Diff line
@@ -13,3 +13,4 @@ local-mathjax
fix-build-using-unregisterized-v8.4
risc-support.patch
PprC-Add-support-for-adjacent-floats
powerpc-fix-64-bit-comparision.patch