X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fcmm%2FCmm.hs;h=13961c15d3557899cb627123f7234599d6666e3f;hb=9d7da331989abcd1844e9d03b8d1e4163796fa85;hp=9fcc96ed01985c2258d7eccf4f6749ea26ece946;hpb=0e6454e68c2b0278b6cc3655303ab44f8d40c42d;p=ghc-hetmet.git diff --git a/ghc/compiler/cmm/Cmm.hs b/ghc/compiler/cmm/Cmm.hs index 9fcc96e..13961c1 100644 --- a/ghc/compiler/cmm/Cmm.hs +++ b/ghc/compiler/cmm/Cmm.hs @@ -30,6 +30,7 @@ import CLabel ( CLabel ) import ForeignCall ( CCallConv ) import Unique ( Unique, Uniquable(..) ) import FastString ( FastString ) +import DATA_WORD ( Word8 ) ----------------------------------------------------------------------------- -- Cmm, CmmTop, CmmBasicBlock @@ -162,7 +163,6 @@ data CmmExpr -- ** is shorthand only, meaning ** -- CmmMachOp (MO_S_Add rep (CmmReg reg) (CmmLit (CmmInt i rep))) -- where rep = cmmRegRep reg - | CmmPicBaseReg -- Base Register for PIC calculations cmmExprRep :: CmmExpr -> MachRep cmmExprRep (CmmLit lit) = cmmLitRep lit @@ -170,7 +170,6 @@ cmmExprRep (CmmLoad _ rep) = rep cmmExprRep (CmmReg reg) = cmmRegRep reg cmmExprRep (CmmMachOp op _) = resultRepOfMachOp op cmmExprRep (CmmRegOff reg _) = cmmRegRep reg -cmmExprRep CmmPicBaseReg = wordRep data CmmReg = CmmLocal LocalReg @@ -239,7 +238,9 @@ data Section = Text | Data | ReadOnlyData + | RelocatableReadOnlyData | UninitialisedData + | ReadOnlyData16 -- .rodata.cst16 on x86_64, 16-byte aligned | OtherSection String data CmmStatic @@ -251,9 +252,8 @@ data CmmStatic -- align to next N-byte boundary (N must be a power of 2). | CmmDataLabel CLabel -- label the current position in this section. - | CmmString String + | CmmString [Word8] -- string of 8-bit values only, not zero terminated. - -- ToDo: might be more honest to use [Word8] here? ----------------------------------------------------------------------------- -- Global STG registers @@ -294,6 +294,11 @@ data GlobalReg -- (where necessary) in the native code generator. | BaseReg + -- Base Register for PIC (position-independent code) calculations + -- Only used inside the native code generator. It's exact meaning differs + -- from platform to platform (see module PositionIndependentCode). + | PicBaseReg + deriving( Eq #ifdef DEBUG , Show