[project @ 2005-07-11 20:33:45 by panne]
authorpanne <unknown>
Mon, 11 Jul 2005 20:33:45 +0000 (20:33 +0000)
committerpanne <unknown>
Mon, 11 Jul 2005 20:33:45 +0000 (20:33 +0000)
After some experiments, it seems like we're stealing too many registers from
newer GCCs on SPARC, leading to

   "unable to find a register to spill in class `GENERAL_REGS'"

errors. The fix is to leave l6 and l7 to GCC. Tested with a full 2-stage
bootstrap (including OpenGL/GLUT packages) on SPARC Solaris 8 with GCC 3.4.4.

A test case for this (which I'm too lazy/tired to commit) is:

   module Blah ( foo ) where
   import Foreign.Ptr ( FunPtr )
   type Bar = Int -> Double -> Double -> Double -> IO ()
   foreign import ccall unsafe "dynamic" foo :: FunPtr Bar -> Bar

SimonM: MERGE TO STABLE (if nobody yells)

ghc/includes/MachRegs.h

index 9a18812..77efee1 100644 (file)
 #define REG_R3         l3
 #define REG_R4         l4
 #define REG_R5         l5
-#define REG_R6         l6
-#define REG_R7         l7
-#define REG_R8         i5
+#define REG_R6         i5
 
 #define REG_F1         f22
 #define REG_F2         f23