[DHG_packages] 01/01: Actually add patch

Joachim Breitner nomeata at moszumanska.debian.org
Mon Nov 9 19:44:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch experimental
in repository DHG_packages.

commit a589e82387c636343c9381c8ac3a041a51e38079
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Mon Nov 9 20:43:51 2015 +0100

    Actually add patch
---
 p/ghc/debian/patches/ppc-bit-shift.patch | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/p/ghc/debian/patches/ppc-bit-shift.patch b/p/ghc/debian/patches/ppc-bit-shift.patch
new file mode 100644
index 0000000..d3c9e03
--- /dev/null
+++ b/p/ghc/debian/patches/ppc-bit-shift.patch
@@ -0,0 +1,32 @@
+From e429f5af8845275a584eb683b2fe6cdca8a7501b Mon Sep 17 00:00:00 2001
+From: Peter Trommler <ptrommler at acm.org>
+Date: Mon, 9 Nov 2015 15:59:36 +0100
+Subject: [PATCH 1/1] PPC nativeGen: fix shift right arithmetic > 31 bit
+
+Arithmetic shift right of more than 31 bits yields
+zero for positive Int and -1 for negative Int. On
+PowerPC immediates greater than 31 are not allowed,
+so replace with a shift by 31 bits which gives the
+correct result.
+
+Fixes #10870
+---
+ compiler/nativeGen/PPC/Ppr.hs | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
+index 4ae32c9..876b11b 100644
+--- a/compiler/nativeGen/PPC/Ppr.hs
++++ b/compiler/nativeGen/PPC/Ppr.hs
+@@ -637,6 +637,8 @@ pprInstr (SLW reg1 reg2 (RIImm (ImmInt i))) | i < 0  || i > 31 =
+     -- Fixes ticket http://ghc.haskell.org/trac/ghc/ticket/10870
+     pprInstr (XOR reg1 reg2 (RIReg reg2))
+ 
++pprInstr (SRAW reg1 reg2 (RIImm (ImmInt i))) | i > 31 =
++    pprInstr (SRAW reg1 reg2 (RIImm (ImmInt 31)))
+ 
+ pprInstr (SLW reg1 reg2 ri) = pprLogic (sLit "slw") reg1 reg2 (limitShiftRI ri)
+ 
+-- 
+2.1.4
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git



More information about the Pkg-haskell-commits mailing list