[commit: ghc] master: Use 'r11' rather than 'fp' on Arm; part of #7707 (0606e6e)

Ian Lynagh igloo at earth.li
Sat Mar 2 15:43:40 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0606e6e73b30fb9307fa11dc417f2988c7b9aa48

>---------------------------------------------------------------

commit 0606e6e73b30fb9307fa11dc417f2988c7b9aa48
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sat Mar 2 13:05:05 2013 +0000

    Use 'r11' rather than 'fp' on Arm; part of #7707
    
    They're both the same register, and Linux seems happy with both,
    but ios only accepts r11.

>---------------------------------------------------------------

 rts/StgCRun.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index 127fab6..e16de75 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -665,7 +665,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
         /*
          * save callee-saves registers on behalf of the STG code.
          */
-        "stmfd sp!, {r4-r10, fp, ip, lr}\n\t"
+        "stmfd sp!, {r4-r11, ip, lr}\n\t"
 #if !defined(arm_HOST_ARCH_PRE_ARMv6)
         "vstmdb sp!, {d8-d11}\n\t"
 #endif
@@ -702,7 +702,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
 #if !defined(arm_HOST_ARCH_PRE_ARMv6)
         "vldmia sp!, {d8-d11}\n\t"
 #endif
-        "ldmfd sp!, {r4-r10, fp, ip, lr}\n\t"
+        "ldmfd sp!, {r4-r11, ip, lr}\n\t"
       : "=r" (r)
       : "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES)
 #if !defined(__thumb__)
@@ -718,7 +718,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
            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"
+      : "%r4", "%r5", "%r6", "%r8", "%r9", "%r10", "%11", "%ip", "%lr"
 #endif
     );
     return r;





More information about the ghc-commits mailing list