X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FSPARC%2FRegPlate.hs;h=1da728aaad3dbef696ab9eaaabcfd5934b369bf4;hb=74e1368d4688ee16f6decdf2cd3ebe27506b26ba;hp=38852c507c604170a6f701f2202544adeb82d27d;hpb=25ea332f16464c3f9b0f45bd37cfd418dde5fe92;p=ghc-hetmet.git diff --git a/compiler/nativeGen/SPARC/RegPlate.hs b/compiler/nativeGen/SPARC/RegPlate.hs index 38852c5..1da728a 100644 --- a/compiler/nativeGen/SPARC/RegPlate.hs +++ b/compiler/nativeGen/SPARC/RegPlate.hs @@ -11,6 +11,8 @@ module SPARC.RegPlate ( where +#include "HsVersions.h" + import Reg import CmmExpr import FastBool @@ -19,6 +21,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 +99,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 +137,6 @@ freeReg regNo , regNo `mod` 2 /= 0 = fastBool False -------------------------------------- -#endif - #ifdef REG_Base @@ -285,3 +285,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