Exposed-Modules:
AsmCodeGen
MachCodeGen
- MachInstrs
- Alpha.Instr
- X86.Instr
- PPC.Instr
- SPARC.Instr
- MachRegs
+ Regs
RegsBase
+ Instrs
+ Alpha.Regs
+ Alpha.Instr
X86.Regs
+ X86.Instr
PPC.Regs
+ PPC.Instr
SPARC.Regs
- Alpha.Regs
+ SPARC.Instr
NCGMonad
PositionIndependentCode
PprMach
where
import BlockId
-import MachRegs
+import Regs
import Cmm
import FastString
import CLabel
#include "HsVersions.h"
#include "nativeGen/NCG.h"
-import MachInstrs
-import MachRegs
+import Instrs
+import Regs
import MachCodeGen
import PprMach
import RegAllocInfo
#include "nativeGen/NCG.h"
-module MachInstrs (
+module Instrs (
NatCmm,
NatCmmTop,
NatBasicBlock,
#elif sparc_TARGET_ARCH
module SPARC.Instr
#else
-#error "MachInstrs: not defined for this architecture"
+#error "Instrs: not defined for this architecture"
#endif
)
#include "HsVersions.h"
import BlockId
-import MachRegs
+import Regs
import Cmm
import CLabel ( CLabel, pprCLabel )
import Panic ( panic )
#elif sparc_TARGET_ARCH
import SPARC.Instr
#else
-#error "MachInstrs: not defined for this architecture"
+#error "Instrs: not defined for this architecture"
#endif
#include "MachDeps.h"
-- NCG stuff:
-import MachInstrs
-import MachRegs
+import Instrs
+import Regs
import NCGMonad
import PositionIndependentCode
import RegAllocInfo ( mkBranchInstr, mkRegRegMoveInstr )
-import MachRegs
import PprMach
-- Our intermediate code:
-- We (allegedly) put the first six C-call arguments in registers;
-- where do we start putting the rest of them?
--- Moved from MachInstrs (SDM):
+-- Moved from Instrs (SDM):
#if alpha_TARGET_ARCH || sparc_TARGET_ARCH
eXTRA_STK_ARGS_HERE :: Int
import BlockId
import CLabel ( CLabel, mkAsmTempLabel )
-import MachRegs
+import Regs
import UniqSupply
import Unique ( Unique )
import DynFlags
where
import BlockId
-import MachRegs
+import Regs
import Cmm
import Outputable
import FastString
import CLabel ( mkForeignLabel )
#endif
-import MachRegs
-import MachInstrs
+import Regs
+import Instrs
import NCGMonad ( NatM, getNewRegNat, getNewLabelNat )
import StaticFlags ( opt_PIC, opt_Static )
import BlockId
import Cmm
-import MachRegs -- may differ per-platform
-import MachInstrs
+import Regs -- may differ per-platform
+import Instrs
import CLabel ( CLabel, pprCLabel, externallyVisibleCLabel,
labelDynamic, mkAsmTempLabel, entryLblToInfoLbl )
where
import Cmm
-import MachRegs
+import Regs
import RegLiveness
import RegAllocInfo
import RegAlloc.Graph.SpillClean
import RegAlloc.Graph.SpillCost
import RegAlloc.Graph.Stats
-import MachRegs
-import MachInstrs
+import Regs
+import Instrs
import PprMach
import UniqSupply
import RegLiveness
import RegAllocInfo
-import MachRegs
-import MachInstrs
+import Regs
+import Instrs
import Cmm
import State
import BlockId
import RegLiveness
import RegAllocInfo
-import MachRegs
-import MachInstrs
+import Regs
+import Instrs
import Cmm
import UniqSet
import GraphBase
import RegLiveness
import RegAllocInfo
-import MachInstrs
-import MachRegs
+import Instrs
+import Regs
import BlockId
import Cmm
import RegAllocInfo
import RegAlloc.Graph.Spill
import RegAlloc.Graph.SpillCost
-import MachRegs
-import MachInstrs
+import Regs
+import Instrs
import Cmm
import Outputable
import RegAlloc.Linear.StackMap
import RegLiveness
-import MachRegs
+import Regs
import Outputable
import Unique
import RegAlloc.Linear.FreeRegs
import BlockId
-import MachInstrs
-import MachRegs
+import Instrs
+import Regs
import RegAllocInfo
import RegLiveness
import Cmm hiding (RegSet)
import RegAlloc.Linear.JoinToTargets
import BlockId
-import MachRegs
-import MachInstrs
+import Regs
+import Instrs
import RegAllocInfo
import RegLiveness
import Cmm hiding (RegSet)
module RegAlloc.Linear.PPC.FreeRegs
where
-import MachRegs
+import Regs
import Outputable
module RegAlloc.Linear.SPARC.FreeRegs
where
-import MachRegs
+import Regs
import Outputable
import RegAlloc.Linear.FreeRegs
-import MachInstrs
-import MachRegs
+import Instrs
+import Regs
import RegAllocInfo
import RegLiveness
import RegAlloc.Linear.Base
import RegLiveness
import RegAllocInfo
-import MachInstrs
+import Instrs
import Cmm (GenBasicBlock(..))
import UniqFM
module RegAlloc.Linear.X86.FreeRegs
where
-import MachRegs
+import Regs
import Data.Word
import Data.Bits
import BlockId
import Cmm
import CLabel
-import MachInstrs
-import MachRegs
+import Instrs
+import Regs
import Outputable
import Constants ( rESERVED_C_STACK_BYTES )
import FastBool
) where
import BlockId
-import MachRegs
-import MachInstrs
+import Regs
+import Instrs
import PprMach
import RegAllocInfo
import Cmm hiding (RegSet)
#include "nativeGen/NCG.h"
-module MachRegs (
+module Regs (
--------------------------------
-- Generic things, shared by all architectures.
module RegsBase,
#elif sparc_TARGET_ARCH
import SPARC.Regs
#else
-#error "MachRegs: not defined for this architecture"
+#error "Regs: not defined for this architecture"
#endif
= case cls of
RcInteger -> allocatableRegsInteger
RcDouble -> allocatableRegsDouble
- RcFloat -> panic "MachRegs.allocatableRegsInClass: no match\n"
+ RcFloat -> panic "Regs.allocatableRegsInClass: no match\n"
allocatableRegsInteger :: Int
allocatableRegsInteger
= case regClass r of
RcInteger -> (cd+1, cf)
RcDouble -> (cd, cf+1)
- _ -> panic "MachRegs.trivColorable: reg class not handled"
+ _ -> panic "Regs.trivColorable: reg class not handled"
tmp = foldUniqSet acc (0, 0) conflicts
(countInt, countFloat) = foldUniqSet acc tmp exclusions
-- There is an allocatableRegsInClass :: RegClass -> Int, but doing the unboxing
-- is too slow for us here.
--
--- Compare MachRegs.freeRegs and MachRegs.h to get these numbers.
+-- Compare Regs.freeRegs and MachRegs.h to get these numbers.
--
#if i386_TARGET_ARCH
#define ALLOCATABLE_REGS_INTEGER (_ILIT(3))
where
import BlockId
-import MachRegs
+import Regs
import Cmm
import Outputable
import Constants ( wORD_SIZE )
where
import BlockId
-import MachRegs
+import Regs
import Cmm
import FastString