[GHC] #5210: Add primops for copying/cloning byte arrays

GHC cvs-ghc at haskell.org
Thu Jun 16 09:39:07 CEST 2011


#5210: Add primops for copying/cloning byte arrays
---------------------------------+------------------------------------------
    Reporter:  tibbe             |        Owner:  dterei      
        Type:  feature request   |       Status:  patch       
    Priority:  high              |    Milestone:  7.2.1       
   Component:  Compiler          |      Version:  7.0.3       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by tibbe):

 The issue is that `src`, etc might refer to callee-save registers that get
 trashed by the call to `memcpy`. The code generator can't figure out that
 it needs to push/pop these registers before calling the C function so it
 has to be done manually (this is what the `live` variable is about). There
 is a way to have the code generator do it for you, by assigning `src`, etc
 to temporary registers, which is what we do. The new code generator will
 eventually make this unnecessary.

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



More information about the Glasgow-haskell-bugs mailing list