NCG: Rename MachRegs, MachInstrs -> Regs, Instrs to reflect arch specific naming

parent 9de520b7
...@@ -455,17 +455,17 @@ Library ...@@ -455,17 +455,17 @@ Library
Exposed-Modules: Exposed-Modules:
AsmCodeGen AsmCodeGen
MachCodeGen MachCodeGen
MachInstrs Regs
Alpha.Instr
X86.Instr
PPC.Instr
SPARC.Instr
MachRegs
RegsBase RegsBase
Instrs
Alpha.Regs
Alpha.Instr
X86.Regs X86.Regs
X86.Instr
PPC.Regs PPC.Regs
PPC.Instr
SPARC.Regs SPARC.Regs
Alpha.Regs SPARC.Instr
NCGMonad NCGMonad
PositionIndependentCode PositionIndependentCode
PprMach PprMach
......
...@@ -18,7 +18,7 @@ module Alpha.Instr ( ...@@ -18,7 +18,7 @@ module Alpha.Instr (
where where
import BlockId import BlockId
import MachRegs import Regs
import Cmm import Cmm
import FastString import FastString
import CLabel import CLabel
......
...@@ -19,8 +19,8 @@ module AsmCodeGen ( nativeCodeGen ) where ...@@ -19,8 +19,8 @@ module AsmCodeGen ( nativeCodeGen ) where
#include "HsVersions.h" #include "HsVersions.h"
#include "nativeGen/NCG.h" #include "nativeGen/NCG.h"
import MachInstrs import Instrs
import MachRegs import Regs
import MachCodeGen import MachCodeGen
import PprMach import PprMach
import RegAllocInfo import RegAllocInfo
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "nativeGen/NCG.h" #include "nativeGen/NCG.h"
module MachInstrs ( module Instrs (
NatCmm, NatCmm,
NatCmmTop, NatCmmTop,
NatBasicBlock, NatBasicBlock,
...@@ -33,7 +33,7 @@ module MachInstrs ( ...@@ -33,7 +33,7 @@ module MachInstrs (
#elif sparc_TARGET_ARCH #elif sparc_TARGET_ARCH
module SPARC.Instr module SPARC.Instr
#else #else
#error "MachInstrs: not defined for this architecture" #error "Instrs: not defined for this architecture"
#endif #endif
) )
...@@ -42,7 +42,7 @@ where ...@@ -42,7 +42,7 @@ where
#include "HsVersions.h" #include "HsVersions.h"
import BlockId import BlockId
import MachRegs import Regs
import Cmm import Cmm
import CLabel ( CLabel, pprCLabel ) import CLabel ( CLabel, pprCLabel )
import Panic ( panic ) import Panic ( panic )
...@@ -61,7 +61,7 @@ import X86.Instr ...@@ -61,7 +61,7 @@ import X86.Instr
#elif sparc_TARGET_ARCH #elif sparc_TARGET_ARCH
import SPARC.Instr import SPARC.Instr
#else #else
#error "MachInstrs: not defined for this architecture" #error "Instrs: not defined for this architecture"
#endif #endif
......
...@@ -25,12 +25,11 @@ module MachCodeGen ( cmmTopCodeGen, InstrBlock ) where ...@@ -25,12 +25,11 @@ module MachCodeGen ( cmmTopCodeGen, InstrBlock ) where
#include "MachDeps.h" #include "MachDeps.h"
-- NCG stuff: -- NCG stuff:
import MachInstrs import Instrs
import MachRegs import Regs
import NCGMonad import NCGMonad
import PositionIndependentCode import PositionIndependentCode
import RegAllocInfo ( mkBranchInstr, mkRegRegMoveInstr ) import RegAllocInfo ( mkBranchInstr, mkRegRegMoveInstr )
import MachRegs
import PprMach import PprMach
-- Our intermediate code: -- Our intermediate code:
...@@ -5190,7 +5189,7 @@ coerceFP2Int fromRep toRep x = do ...@@ -5190,7 +5189,7 @@ coerceFP2Int fromRep toRep x = do
-- We (allegedly) put the first six C-call arguments in registers; -- We (allegedly) put the first six C-call arguments in registers;
-- where do we start putting the rest of them? -- where do we start putting the rest of them?
-- Moved from MachInstrs (SDM): -- Moved from Instrs (SDM):
#if alpha_TARGET_ARCH || sparc_TARGET_ARCH #if alpha_TARGET_ARCH || sparc_TARGET_ARCH
eXTRA_STK_ARGS_HERE :: Int eXTRA_STK_ARGS_HERE :: Int
......
...@@ -20,7 +20,7 @@ module NCGMonad ( ...@@ -20,7 +20,7 @@ module NCGMonad (
import BlockId import BlockId
import CLabel ( CLabel, mkAsmTempLabel ) import CLabel ( CLabel, mkAsmTempLabel )
import MachRegs import Regs
import UniqSupply import UniqSupply
import Unique ( Unique ) import Unique ( Unique )
import DynFlags import DynFlags
......
...@@ -19,7 +19,7 @@ module PPC.Instr ( ...@@ -19,7 +19,7 @@ module PPC.Instr (
where where
import BlockId import BlockId
import MachRegs import Regs
import Cmm import Cmm
import Outputable import Outputable
import FastString import FastString
......
...@@ -65,8 +65,8 @@ import CLabel ( CLabel, pprCLabel, ...@@ -65,8 +65,8 @@ import CLabel ( CLabel, pprCLabel,
import CLabel ( mkForeignLabel ) import CLabel ( mkForeignLabel )
#endif #endif
import MachRegs import Regs
import MachInstrs import Instrs
import NCGMonad ( NatM, getNewRegNat, getNewLabelNat ) import NCGMonad ( NatM, getNewRegNat, getNewLabelNat )
import StaticFlags ( opt_PIC, opt_Static ) import StaticFlags ( opt_PIC, opt_Static )
......
...@@ -28,8 +28,8 @@ module PprMach ( ...@@ -28,8 +28,8 @@ module PprMach (
import BlockId import BlockId
import Cmm import Cmm
import MachRegs -- may differ per-platform import Regs -- may differ per-platform
import MachInstrs import Instrs
import CLabel ( CLabel, pprCLabel, externallyVisibleCLabel, import CLabel ( CLabel, pprCLabel, externallyVisibleCLabel,
labelDynamic, mkAsmTempLabel, entryLblToInfoLbl ) labelDynamic, mkAsmTempLabel, entryLblToInfoLbl )
......
...@@ -9,7 +9,7 @@ module RegAlloc.Graph.Coalesce ( ...@@ -9,7 +9,7 @@ module RegAlloc.Graph.Coalesce (
where where
import Cmm import Cmm
import MachRegs import Regs
import RegLiveness import RegLiveness
import RegAllocInfo import RegAllocInfo
......
...@@ -17,8 +17,8 @@ import RegAlloc.Graph.Spill ...@@ -17,8 +17,8 @@ import RegAlloc.Graph.Spill
import RegAlloc.Graph.SpillClean import RegAlloc.Graph.SpillClean
import RegAlloc.Graph.SpillCost import RegAlloc.Graph.SpillCost
import RegAlloc.Graph.Stats import RegAlloc.Graph.Stats
import MachRegs import Regs
import MachInstrs import Instrs
import PprMach import PprMach
import UniqSupply import UniqSupply
......
...@@ -11,8 +11,8 @@ where ...@@ -11,8 +11,8 @@ where
import RegLiveness import RegLiveness
import RegAllocInfo import RegAllocInfo
import MachRegs import Regs
import MachInstrs import Instrs
import Cmm import Cmm
import State import State
......
...@@ -32,8 +32,8 @@ where ...@@ -32,8 +32,8 @@ where
import BlockId import BlockId
import RegLiveness import RegLiveness
import RegAllocInfo import RegAllocInfo
import MachRegs import Regs
import MachInstrs import Instrs
import Cmm import Cmm
import UniqSet import UniqSet
......
...@@ -19,8 +19,8 @@ where ...@@ -19,8 +19,8 @@ where
import GraphBase import GraphBase
import RegLiveness import RegLiveness
import RegAllocInfo import RegAllocInfo
import MachInstrs import Instrs
import MachRegs import Regs
import BlockId import BlockId
import Cmm import Cmm
......
...@@ -25,8 +25,8 @@ import RegLiveness ...@@ -25,8 +25,8 @@ import RegLiveness
import RegAllocInfo import RegAllocInfo
import RegAlloc.Graph.Spill import RegAlloc.Graph.Spill
import RegAlloc.Graph.SpillCost import RegAlloc.Graph.SpillCost
import MachRegs import Regs
import MachInstrs import Instrs
import Cmm import Cmm
import Outputable import Outputable
......
...@@ -22,7 +22,7 @@ import RegAlloc.Linear.FreeRegs ...@@ -22,7 +22,7 @@ import RegAlloc.Linear.FreeRegs
import RegAlloc.Linear.StackMap import RegAlloc.Linear.StackMap
import RegLiveness import RegLiveness
import MachRegs import Regs
import Outputable import Outputable
import Unique import Unique
......
...@@ -20,8 +20,8 @@ import RegAlloc.Linear.Base ...@@ -20,8 +20,8 @@ import RegAlloc.Linear.Base
import RegAlloc.Linear.FreeRegs import RegAlloc.Linear.FreeRegs
import BlockId import BlockId
import MachInstrs import Instrs
import MachRegs import Regs
import RegAllocInfo import RegAllocInfo
import RegLiveness import RegLiveness
import Cmm hiding (RegSet) import Cmm hiding (RegSet)
......
...@@ -98,8 +98,8 @@ import RegAlloc.Linear.Stats ...@@ -98,8 +98,8 @@ import RegAlloc.Linear.Stats
import RegAlloc.Linear.JoinToTargets import RegAlloc.Linear.JoinToTargets
import BlockId import BlockId
import MachRegs import Regs
import MachInstrs import Instrs
import RegAllocInfo import RegAllocInfo
import RegLiveness import RegLiveness
import Cmm hiding (RegSet) import Cmm hiding (RegSet)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module RegAlloc.Linear.PPC.FreeRegs module RegAlloc.Linear.PPC.FreeRegs
where where
import MachRegs import Regs
import Outputable import Outputable
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module RegAlloc.Linear.SPARC.FreeRegs module RegAlloc.Linear.SPARC.FreeRegs
where where
import MachRegs import Regs
import Outputable import Outputable
......
...@@ -35,8 +35,8 @@ import RegAlloc.Linear.Base ...@@ -35,8 +35,8 @@ import RegAlloc.Linear.Base
import RegAlloc.Linear.FreeRegs import RegAlloc.Linear.FreeRegs
import MachInstrs import Instrs
import MachRegs import Regs
import RegAllocInfo import RegAllocInfo
import RegLiveness import RegLiveness
......
...@@ -9,7 +9,7 @@ where ...@@ -9,7 +9,7 @@ where
import RegAlloc.Linear.Base import RegAlloc.Linear.Base
import RegLiveness import RegLiveness
import RegAllocInfo import RegAllocInfo
import MachInstrs import Instrs
import Cmm (GenBasicBlock(..)) import Cmm (GenBasicBlock(..))
import UniqFM import UniqFM
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module RegAlloc.Linear.X86.FreeRegs module RegAlloc.Linear.X86.FreeRegs
where where
import MachRegs import Regs
import Data.Word import Data.Word
import Data.Bits import Data.Bits
......
...@@ -39,8 +39,8 @@ module RegAllocInfo ( ...@@ -39,8 +39,8 @@ module RegAllocInfo (
import BlockId import BlockId
import Cmm import Cmm
import CLabel import CLabel
import MachInstrs import Instrs
import MachRegs import Regs
import Outputable import Outputable
import Constants ( rESERVED_C_STACK_BYTES ) import Constants ( rESERVED_C_STACK_BYTES )
import FastBool import FastBool
......
...@@ -31,8 +31,8 @@ module RegLiveness ( ...@@ -31,8 +31,8 @@ module RegLiveness (
) where ) where
import BlockId import BlockId
import MachRegs import Regs
import MachInstrs import Instrs
import PprMach import PprMach
import RegAllocInfo import RegAllocInfo
import Cmm hiding (RegSet) import Cmm hiding (RegSet)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "nativeGen/NCG.h" #include "nativeGen/NCG.h"
module MachRegs ( module Regs (
-------------------------------- --------------------------------
-- Generic things, shared by all architectures. -- Generic things, shared by all architectures.
module RegsBase, module RegsBase,
...@@ -121,7 +121,7 @@ import X86.Regs ...@@ -121,7 +121,7 @@ import X86.Regs
#elif sparc_TARGET_ARCH #elif sparc_TARGET_ARCH
import SPARC.Regs import SPARC.Regs
#else #else
#error "MachRegs: not defined for this architecture" #error "Regs: not defined for this architecture"
#endif #endif
...@@ -181,7 +181,7 @@ allocatableRegsInClass cls ...@@ -181,7 +181,7 @@ allocatableRegsInClass cls
= case cls of = case cls of
RcInteger -> allocatableRegsInteger RcInteger -> allocatableRegsInteger
RcDouble -> allocatableRegsDouble RcDouble -> allocatableRegsDouble
RcFloat -> panic "MachRegs.allocatableRegsInClass: no match\n" RcFloat -> panic "Regs.allocatableRegsInClass: no match\n"
allocatableRegsInteger :: Int allocatableRegsInteger :: Int
allocatableRegsInteger allocatableRegsInteger
...@@ -218,7 +218,7 @@ trivColorable classN conflicts exclusions ...@@ -218,7 +218,7 @@ trivColorable classN conflicts exclusions
= case regClass r of = case regClass r of
RcInteger -> (cd+1, cf) RcInteger -> (cd+1, cf)
RcDouble -> (cd, cf+1) RcDouble -> (cd, cf+1)
_ -> panic "MachRegs.trivColorable: reg class not handled" _ -> panic "Regs.trivColorable: reg class not handled"
tmp = foldUniqSet acc (0, 0) conflicts tmp = foldUniqSet acc (0, 0) conflicts
(countInt, countFloat) = foldUniqSet acc tmp exclusions (countInt, countFloat) = foldUniqSet acc tmp exclusions
...@@ -256,7 +256,7 @@ worst n classN classC ...@@ -256,7 +256,7 @@ worst n classN classC
-- There is an allocatableRegsInClass :: RegClass -> Int, but doing the unboxing -- There is an allocatableRegsInClass :: RegClass -> Int, but doing the unboxing
-- is too slow for us here. -- 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 #if i386_TARGET_ARCH
#define ALLOCATABLE_REGS_INTEGER (_ILIT(3)) #define ALLOCATABLE_REGS_INTEGER (_ILIT(3))
......
...@@ -22,7 +22,7 @@ module SPARC.Instr ( ...@@ -22,7 +22,7 @@ module SPARC.Instr (
where where
import BlockId import BlockId
import MachRegs import Regs
import Cmm import Cmm
import Outputable import Outputable
import Constants ( wORD_SIZE ) import Constants ( wORD_SIZE )
......
...@@ -13,7 +13,7 @@ module X86.Instr ...@@ -13,7 +13,7 @@ module X86.Instr
where where
import BlockId import BlockId
import MachRegs import Regs
import Cmm import Cmm
import FastString import FastString
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment