diff options
| author | Ben.Lippmeier@anu.edu.au <unknown> | 2009-04-20 03:21:20 +0000 |
|---|---|---|
| committer | Ben.Lippmeier@anu.edu.au <unknown> | 2009-04-20 03:21:20 +0000 |
| commit | fd2bd22ed4483f949e989b827013fcda695c803a (patch) | |
| tree | b0c29fe71b2df7651f82a6931726b2ccd9475c10 | |
| parent | 25ea332f16464c3f9b0f45bd37cfd418dde5fe92 (diff) | |
| download | haskell-fd2bd22ed4483f949e989b827013fcda695c803a.tar.gz | |
SPARC NCG: validate fixes
| -rw-r--r-- | compiler/nativeGen/SPARC/RegPlate.hs | 14 | ||||
| -rw-r--r-- | compiler/nativeGen/SPARC/Regs.hs | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/compiler/nativeGen/SPARC/RegPlate.hs b/compiler/nativeGen/SPARC/RegPlate.hs index 38852c507c..ab589864dc 100644 --- a/compiler/nativeGen/SPARC/RegPlate.hs +++ b/compiler/nativeGen/SPARC/RegPlate.hs @@ -19,6 +19,7 @@ import FastBool -- These names are the same as the ones in Regs.hs, but those have -- type Reg and not RegNo. -- +#ifdef sparc_TARGET_ARCH #define g0 0 #define g1 1 @@ -96,7 +97,6 @@ import FastBool freeReg :: RegNo -> FastBool -#ifdef sparc_REGS -- SPARC regs used by the OS / ABI -- %g0(r0) is always zero freeReg g0 = fastBool False @@ -135,8 +135,6 @@ freeReg regNo , regNo `mod` 2 /= 0 = fastBool False -------------------------------------- -#endif - #ifdef REG_Base @@ -285,3 +283,13 @@ globalRegMaybe CurrentTSO = Just (RealReg REG_CurrentTSO) globalRegMaybe CurrentNursery = Just (RealReg REG_CurrentNursery) #endif globalRegMaybe _ = Nothing + + +#else +freeReg :: RegNo -> FastBool +freeReg = error "SPARC.RegPlate.freeReg: not defined" + +globalRegMaybe :: GlobalReg -> Maybe Reg +globalRegMaybe = error "SPARC.RegPlate.globalRegMaybe: not defined" + +#endif diff --git a/compiler/nativeGen/SPARC/Regs.hs b/compiler/nativeGen/SPARC/Regs.hs index 630d5a67c6..e610d5d6d4 100644 --- a/compiler/nativeGen/SPARC/Regs.hs +++ b/compiler/nativeGen/SPARC/Regs.hs @@ -39,7 +39,7 @@ import RegClass import Size import Cmm -import PprCmm +import PprCmm () import CgUtils ( get_GlobalReg_addr ) import Unique |
