[commit: ghc] wip/aarch64-regd: rts: Fix clobbered regs list for aarch64 StgRun (5d0dbab)

git at git.haskell.org git at git.haskell.org
Mon Jan 11 21:04:55 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/aarch64-regd
Link       : http://ghc.haskell.org/trac/ghc/changeset/5d0dbab2b35c61817461e1997d5b08398e834667/ghc

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

commit 5d0dbab2b35c61817461e1997d5b08398e834667
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Wed Jun 3 05:54:23 2015 +0000

    rts: Fix clobbered regs list for aarch64 StgRun


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

5d0dbab2b35c61817461e1997d5b08398e834667
 rts/StgCRun.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index 0a010d4..9e80d02 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -829,8 +829,17 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
 
       : "=r" (r)
       : "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES)
-        : "%x19", "%x20", "%x21", "%x22", "%x23", "%x24", "%x25", "%x26", "%x27", "%x28",
-          "%x16", "%x17", "%x30"
+
+      : "%x16", "%x17", /* Exclude %r18 (platform/temporary register) */
+        "%x19", "%x20", "%x21", "%x22", "%x23", "%x24", "%x25",
+        "%x26", "%x27", "%x28", /* Exclude %x29 (frame pointer) */
+        "%x30",
+        "%d8", "%d9", "%d10", "%d11", "%d12", "%d13", "%d14", "%d15"
+        /* Since all these registers listed as clobbered are being explicitly
+         * saved and restored, they should probably not be listed as
+         * clobbered. Leaving them as is for now while I debug other
+         * issues.
+         */
     );
     return r;
 }



More information about the ghc-commits mailing list