[Pkg-haskell-commits] darcs: ghc: Two new patches (backported by Iulian Udrea) to fix armel build failures. See upstream bug #5824.
Iain Lane
laney at debian.org
Sat Mar 10 16:44:45 UTC 2012
Sat Mar 10 15:57:38 UTC 2012 Iain Lane <laney at debian.org>
* Two new patches (backported by Iulian Udrea) to fix armel build failures. See upstream bug #5824.
Ignore-this: eab15cd9672696203daca53f26b77820
- fix-ARM-s-StgCRun-clobbered-register-list-for-both-A
- fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis
M ./changelog +9
A ./patches/fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis
A ./patches/fix-ARM-s-StgCRun-clobbered-register-list-for-both-A
M ./patches/series +2
Sat Mar 10 15:57:38 UTC 2012 Iain Lane <laney at debian.org>
* Two new patches (backported by Iulian Udrea) to fix armel build failures. See upstream bug #5824.
Ignore-this: eab15cd9672696203daca53f26b77820
- fix-ARM-s-StgCRun-clobbered-register-list-for-both-A
- fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis
diff -rN -u old-ghc//changelog new-ghc//changelog
--- old-ghc//changelog 2012-03-10 16:44:44.719248222 +0000
+++ new-ghc//changelog 2012-03-10 16:44:44.855247391 +0000
@@ -1,3 +1,12 @@
+ghc (7.4.1-2) UNRELEASED; urgency=low
+
+ * Two new patches (backported by Iulian Udrea) to fix armel build
+ failures. See upstream bug #5824.
+ - fix-ARM-s-StgCRun-clobbered-register-list-for-both-A
+ - fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis
+
+ -- Iain Lane <laney at debian.org> Sat, 10 Mar 2012 15:55:03 +0000
+
ghc (7.4.1-1) unstable; urgency=low
* New upstream release.
diff -rN -u old-ghc//patches/fix-ARM-s-StgCRun-clobbered-register-list-for-both-A new-ghc//patches/fix-ARM-s-StgCRun-clobbered-register-list-for-both-A
--- old-ghc//patches/fix-ARM-s-StgCRun-clobbered-register-list-for-both-A 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc//patches/fix-ARM-s-StgCRun-clobbered-register-list-for-both-A 2012-03-10 16:44:44.787248531 +0000
@@ -0,0 +1,34 @@
+From 957f778cb971d63cbbea0c71c727c94474b1b905 Mon Sep 17 00:00:00 2001
+From: Karel Gardas <karel.gardas at centrum.cz>
+Date: Tue, 14 Feb 2012 08:01:47 +0100
+Subject: [PATCH 1/2] fix ARM's StgCRun clobbered register list for both ARM and Thumb modes
+
+---
+ rts/StgCRun.c | 16 +++++++++++++++-
+ 1 files changed, 15 insertions(+), 1 deletions(-)
+
+--- a/rts/StgCRun.c
++++ b/rts/StgCRun.c
+@@ -672,7 +672,21 @@
+ "ldmfd sp!, {r4-r11, fp, ip, lr}\n\t"
+ : "=r" (r)
+ : "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES)
+- : "%r4", "%r5", "%r6", "%r8", "%r9", "%r10", "%r11", "%fp", "%ip", "%lr"
++#if !defined(__thumb__)
++ /* In ARM mode, r11/fp is frame-pointer and so we cannot mark
++ it as clobbered. If we do so, GCC complains with error. */
++ : "%r4", "%r5", "%r6", "%r7", "%r8", "%r9", "%r10", "%ip", "%lr"
++#else
++ /* In Thumb mode r7 is frame-pointer and so we cannot mark it
++ as clobbered. On the other hand we mark as clobbered also
++ those regs not used in Thumb mode. Hard to judge if this is
++ needed, but certainly Haskell code is using them for
++ placing GHC's virtual registers there. See
++ includes/stg/MachRegs.h Please note that Haskell code is
++ compiled by GHC/LLVM into ARM code (not Thumb!), at least
++ as of February 2012 */
++ : "%r4", "%r5", "%r6", "%r8", "%r9", "%r10", "%fp", "%ip", "%lr"
++#endif
+ );
+ return r;
+ }
diff -rN -u old-ghc//patches/fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis new-ghc//patches/fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis
--- old-ghc//patches/fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc//patches/fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis 2012-03-10 16:44:44.787248531 +0000
@@ -0,0 +1,29 @@
+From 1cbf3bcae87dd102942d85ce71ea17d42d4b5f5a Mon Sep 17 00:00:00 2001
+From: Karel Gardas <karel.gardas at centrum.cz>
+Date: Tue, 14 Feb 2012 08:03:07 +0100
+Subject: [PATCH 2/2] fix ARM StgCRun to not save and restore r11/fp register twice
+
+---
+ rts/StgCRun.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/rts/StgCRun.c
++++ b/rts/StgCRun.c
+@@ -632,7 +632,7 @@
+ /*
+ * save callee-saves registers on behalf of the STG code.
+ */
+- "stmfd sp!, {r4-r11, fp, ip, lr}\n\t"
++ "stmfd sp!, {r4-r10, fp, ip, lr}\n\t"
+ #if !defined(arm_HOST_ARCH_PRE_ARMv6)
+ "vstmdb sp!, {d8-d11}\n\t"
+ #endif
+@@ -669,7 +669,7 @@
+ #if !defined(arm_HOST_ARCH_PRE_ARMv6)
+ "vldmia sp!, {d8-d11}\n\t"
+ #endif
+- "ldmfd sp!, {r4-r11, fp, ip, lr}\n\t"
++ "ldmfd sp!, {r4-r10, fp, ip, lr}\n\t"
+ : "=r" (r)
+ : "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES)
+ #if !defined(__thumb__)
diff -rN -u old-ghc//patches/series new-ghc//patches/series
--- old-ghc//patches/series 2012-03-10 16:44:44.715248098 +0000
+++ new-ghc//patches/series 2012-03-10 16:44:44.799248993 +0000
@@ -1,3 +1,5 @@
+fix-ARM-s-StgCRun-clobbered-register-list-for-both-A
+fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis
system-libffi
haddock-hardcode-ghc-paths
use-debian-gen_contents_index
More information about the Pkg-haskell-commits
mailing list