[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / nativeGen / Stix.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface Stix where
3 import AbsCSyn(MagicId)
4 import CLabelInfo(CLabel)
5 import CharSeq(CSeq)
6 import PreludePS(_PackedString)
7 import PreludeRatio(Ratio(..))
8 import PrimKind(PrimKind)
9 import PrimOps(PrimOp)
10 import SplitUniq(SUniqSM(..), SplitUniqSupply)
11 import UniType(UniType)
12 import Unique(Unique)
13 data MagicId    {-# GHC_PRAGMA BaseReg | StkOReg | VanillaReg PrimKind Int# | FloatReg Int# | DoubleReg Int# | TagReg | RetReg | SpA | SuA | SpB | SuB | Hp | HpLim | LivenessReg | ActivityReg | StdUpdRetVecReg | StkStubReg | CurCostCentre | VoidReg #-}
14 data CLabel 
15 data CodeSegment   = DataSegment | TextSegment
16 data PrimKind   {-# GHC_PRAGMA PtrKind | CodePtrKind | DataPtrKind | RetKind | InfoPtrKind | CostCentreKind | CharKind | IntKind | WordKind | AddrKind | FloatKind | DoubleKind | MallocPtrKind | StablePtrKind | ArrayKind | ByteArrayKind | VoidKind #-}
17 data PrimOp
18         {-# GHC_PRAGMA CharGtOp | CharGeOp | CharEqOp | CharNeOp | CharLtOp | CharLeOp | IntGtOp | IntGeOp | IntEqOp | IntNeOp | IntLtOp | IntLeOp | WordGtOp | WordGeOp | WordEqOp | WordNeOp | WordLtOp | WordLeOp | AddrGtOp | AddrGeOp | AddrEqOp | AddrNeOp | AddrLtOp | AddrLeOp | FloatGtOp | FloatGeOp | FloatEqOp | FloatNeOp | FloatLtOp | FloatLeOp | DoubleGtOp | DoubleGeOp | DoubleEqOp | DoubleNeOp | DoubleLtOp | DoubleLeOp | OrdOp | ChrOp | IntAddOp | IntSubOp | IntMulOp | IntQuotOp | IntDivOp | IntRemOp | IntNegOp | IntAbsOp | AndOp | OrOp | NotOp | SllOp | SraOp | SrlOp | ISllOp | ISraOp | ISrlOp | Int2WordOp | Word2IntOp | Int2AddrOp | Addr2IntOp | FloatAddOp | FloatSubOp | FloatMulOp | FloatDivOp | FloatNegOp | Float2IntOp | Int2FloatOp | FloatExpOp | FloatLogOp | FloatSqrtOp | FloatSinOp | FloatCosOp | FloatTanOp | FloatAsinOp | FloatAcosOp | FloatAtanOp | FloatSinhOp | FloatCoshOp | FloatTanhOp | FloatPowerOp | DoubleAddOp | DoubleSubOp | DoubleMulOp | DoubleDivOp | DoubleNegOp | Double2IntOp | Int2DoubleOp | Double2FloatOp | Float2DoubleOp | DoubleExpOp | DoubleLogOp | DoubleSqrtOp | DoubleSinOp | DoubleCosOp | DoubleTanOp | DoubleAsinOp | DoubleAcosOp | DoubleAtanOp | DoubleSinhOp | DoubleCoshOp | DoubleTanhOp | DoublePowerOp | IntegerAddOp | IntegerSubOp | IntegerMulOp | IntegerQuotRemOp | IntegerDivModOp | IntegerNegOp | IntegerCmpOp | Integer2IntOp | Int2IntegerOp | Word2IntegerOp | Addr2IntegerOp | FloatEncodeOp | FloatDecodeOp | DoubleEncodeOp | DoubleDecodeOp | NewArrayOp | NewByteArrayOp PrimKind | SameMutableArrayOp | SameMutableByteArrayOp | ReadArrayOp | WriteArrayOp | IndexArrayOp | ReadByteArrayOp PrimKind | WriteByteArrayOp PrimKind | IndexByteArrayOp PrimKind | IndexOffAddrOp PrimKind | UnsafeFreezeArrayOp | UnsafeFreezeByteArrayOp | NewSynchVarOp | TakeMVarOp | PutMVarOp | ReadIVarOp | WriteIVarOp | MakeStablePtrOp | DeRefStablePtrOp | CCallOp _PackedString Bool Bool [UniType] UniType | ErrorIOPrimOp | ReallyUnsafePtrEqualityOp | SeqOp | ParOp | ForkOp | DelayOp | WaitOp #-}
19 type SUniqSM a = SplitUniqSupply -> a
20 data SplitUniqSupply    {-# GHC_PRAGMA MkSplitUniqSupply Int SplitUniqSupply SplitUniqSupply #-}
21 data StixReg   = StixMagicId MagicId | StixTemp Unique PrimKind
22 data StixTree   = StSegment CodeSegment | StInt Integer | StDouble (Ratio Integer) | StString _PackedString | StLitLbl CSeq | StLitLit _PackedString | StCLbl CLabel | StReg StixReg | StIndex PrimKind StixTree StixTree | StInd PrimKind StixTree | StAssign PrimKind StixTree StixTree | StLabel CLabel | StFunBegin CLabel | StFunEnd CLabel | StJump StixTree | StFallThrough CLabel | StCondJump CLabel StixTree | StData PrimKind [StixTree] | StPrim PrimOp [StixTree] | StCall _PackedString PrimKind [StixTree] | StComment _PackedString
23 type StixTreeList = [StixTree] -> [StixTree]
24 data Unique     {-# GHC_PRAGMA MkUnique Int# #-}
25 getUniqLabelNCG :: SplitUniqSupply -> CLabel
26         {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(ALA)" {_A_ 1 _U_ 1 _N_ _N_ _N_ _N_} _N_ _N_ #-}
27 sStLitLbl :: _PackedString -> StixTree
28         {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _N_ _N_ _N_ #-}
29 stgActivityReg :: StixTree
30         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
31 stgBaseReg :: StixTree
32         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
33 stgHp :: StixTree
34         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
35 stgHpLim :: StixTree
36         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
37 stgLivenessReg :: StixTree
38         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
39 stgNode :: StixTree
40         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
41 stgRetReg :: StixTree
42         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
43 stgSpA :: StixTree
44         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
45 stgSpB :: StixTree
46         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
47 stgStdUpdRetVecReg :: StixTree
48         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
49 stgStkOReg :: StixTree
50         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
51 stgStkStubReg :: StixTree
52         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
53 stgSuA :: StixTree
54         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
55 stgSuB :: StixTree
56         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
57 stgTagReg :: StixTree
58         {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
59 instance Eq CodeSegment
60         {-# GHC_PRAGMA _M_ Stix {-dfun-} _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 3 _!_ _TUP_2 [(CodeSegment -> CodeSegment -> Bool), (CodeSegment -> CodeSegment -> Bool)] [_CONSTM_ Eq (==) (CodeSegment), _CONSTM_ Eq (/=) (CodeSegment)] _N_
61          (==) = _A_ 2 _U_ 11 _N_ _S_ "EE" _N_ _N_,
62          (/=) = _A_ 2 _U_ 11 _N_ _S_ "EE" _N_ _N_ #-}
63