X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FnativeGen%2FMachRegs.lhs;h=ec28f70075d3cec0e2c1176682d407b75190b475;hb=b4d045ae655e5eae25b88917cfe75d7dc7689c21;hp=e94086db494693a03ef6c71403ad9e424b3c340b;hpb=a558bffdbf9288a5c6620b9553ec4839c8b904e4;p=ghc-hetmet.git diff --git a/ghc/compiler/nativeGen/MachRegs.lhs b/ghc/compiler/nativeGen/MachRegs.lhs index e94086d..ec28f70 100644 --- a/ghc/compiler/nativeGen/MachRegs.lhs +++ b/ghc/compiler/nativeGen/MachRegs.lhs @@ -107,6 +107,8 @@ data Imm | ImmIndex CLabel Int | ImmFloat Rational | ImmDouble Rational + | ImmConstantSum Imm Imm + | ImmConstantDiff Imm Imm #if sparc_TARGET_ARCH | LO Imm {- Possible restrictions... -} | HI Imm @@ -115,10 +117,6 @@ data Imm | LO Imm | HI Imm | HA Imm {- high halfword adjusted -} -#if darwin_TARGET_OS - -- special dyld (dynamic linker) things - | ImmDyldNonLazyPtr CLabel -- Llabel$non_lazy_ptr -#endif #endif strImmLit s = ImmLit (text s) @@ -128,6 +126,10 @@ litToImm (CmmFloat f F32) = ImmFloat f litToImm (CmmFloat f F64) = ImmDouble f litToImm (CmmLabel l) = ImmCLbl l litToImm (CmmLabelOff l off) = ImmIndex l off +litToImm (CmmLabelDiffOff l1 l2 off) + = ImmConstantSum + (ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2)) + (ImmInt off) -- ----------------------------------------------------------------------------- -- Addressing modes