[GHC] #5824: ARM StgRun register clobber list is broken

GHC cvs-ghc at haskell.org
Mon Jan 30 23:00:24 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 bgamari):

 Sorry for the confusion; I somehow convinced myself that you wrote that
 code.

 Yes, ARM registers have two names: a numeric name (e.g. r12) and an APCS
 (e.g. ip).  Honestly, excluded r7 from the clobber list because the
 compiler complained when I added it,

 {{{
 rts/StgCRun.c: In function ‘StgRun’:
 rts/StgCRun.c:678:1:  error: r7 cannot be used in asm here
 }}}

 It seems that the reason for this is that the compiler uses r7 as the
 frame pointer register when in Thumb mode. Coq experienced the same issue
 (https://bugs.launchpad.net/ubuntu/+source/coq/+bug/636229) but their
 solution seemed to be a bit excessive (http://bazaar.launchpad.net
 /~ubuntu-branches/ubuntu/maverick/coq/maverick/revision/20).

 Concerning r11, I think you are correct. I'm not sure why it wasn't saved
 previously but it seems this omission has the potential to cause some very
 frustrating bugs. Additional patch forthcoming.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5824#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list