import ForeignCall ( CCallConv )
import Unique ( Unique, Uniquable(..) )
import FastString ( FastString )
+import DATA_WORD ( Word8 )
-----------------------------------------------------------------------------
-- Cmm, CmmTop, CmmBasicBlock
-- ** 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
cmmExprRep (CmmReg reg) = cmmRegRep reg
cmmExprRep (CmmMachOp op _) = resultRepOfMachOp op
cmmExprRep (CmmRegOff reg _) = cmmRegRep reg
-cmmExprRep CmmPicBaseReg = wordRep
data CmmReg
= CmmLocal LocalReg
= Text
| Data
| ReadOnlyData
+ | RelocatableReadOnlyData
| UninitialisedData
+ | ReadOnlyData16 -- .rodata.cst16 on x86_64, 16-byte aligned
| OtherSection String
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
-- (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