[GHC] #5824: ARM StgRun register clobber list is broken
GHC
cvs-ghc at haskell.org
Sun Feb 12 23:04:20 CET 2012
#5824: ARM StgRun register clobber list is broken
-------------------------------+--------------------------------------------
Reporter: bgamari | Owner: simonmar
Type: bug | Status: patch
Priority: high | Milestone: 7.4.2
Component: Runtime System | Version: 7.4.1-rc2
Keywords: | Os: Unknown/Multiple
Architecture: arm | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
-------------------------------+--------------------------------------------
Comment(by nomeata):
I hope you don’t mind using the ticket also as a experiment record. Maybe
it helps some.
So this is the gcc call that ghc is using to compile the c file and which
fails:
{{{
/usr/bin/gcc -fno-stack-protector -Wl,--hash-size=31 -Wl,--reduce-memory-
overheads -x c rts/StgCRun.c -o rts/StgCRun.s -S -Wimplicit -O
-D__GLASGOW_HASKELL__=704 -DTABLES_NEXT_TO_CODE -Wall -Wextra -Wstrict-
prototypes -Wmissing-prototypes -Wmissing-declarations -Winline
-Waggregate-return -Wpointer-arith -Wmissing-noreturn -Wnested-externs
-Wredundant-decls -Iincludes -Irts -Irts/dist/build -DCOMPILING_RTS
-DUSE_LIBFFI_FOR_ADJUSTORS -fno-strict-aliasing -fno-common -g -O0
-DRtsWay="rts_debug" -w -DDEBUG -mlong-calls -I includes -I rts -I
rts/dist/build -I rts/dist/build -I rts/dist/build/autogen -I
/home/nomeata/ghc-7.4.1/libraries/base/include -I
/home/nomeata/ghc-7.4.1/rts/dist/build -I /home/nomeata/ghc-7.4.1/includes
-I /home/nomeata/ghc-7.4.1/includes/dist-ghcconstants/header -I
/home/nomeata/ghc-7.4.1/includes/dist-derivedconstants/header
}}}
Just reverting [5a984f4388ef85d5c3af973b21a12c12b36c1ed4] does not help.
What does help is to remove both r11 and fp:
{{{
--- rts/StgCRun.c.orig 2012-02-12 22:02:56.000000000 +0000
+++ rts/StgCRun.c 2012-02-12 22:02:59.000000000 +0000
@@ -672,7 +672,7 @@
"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"
+ : "%r4", "%r5", "%r6", "%r8", "%r9", "%r10", "%ip", "%lr"
);
return r;
}
}}}
But someone who actually knows what that means should tell me if it is a
sensible thing to do.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5824#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list