Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runCFI :: (ALU m ll element, Show element) => CFInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
- popAddress :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
- dynamicCall :: (ALU m ll element, Show element) => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
- dynamicJump :: (ALU m ll element, Show element) => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
- dynamicBranch :: (ALU m ll element, Show element) => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
- findAddressForDynamicLabel :: (MonadSafe m, Integral n, Show n) => n -> InstructionVector -> m InstructionAddress
- staticCall :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
- staticJump :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
- staticBranch :: ALU m ll element => Label -> BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
- findAddressForStaticLabel :: MonadSafe m => Label -> InstructionVector -> m InstructionAddress
- newCU :: InstructionList -> ControlUnit
- currentInstruction :: MonadSafe m => ControlUnit -> m Instruction
- incrementPC :: ControlUnit -> ControlUnit
- data CentralProcessingUnit al = CPU {
- controlUnit :: ControlUnit
- alu :: al
- data ControlUnit = CU {}
- newtype InstructionStack = IS [InstructionAddress]
- type InstructionCounter = InstructionAddress
- type InstructionAddress = Int
Documentation
runCFI :: (ALU m ll element, Show element) => CFInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll #
popAddress :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll #
dynamicCall :: (ALU m ll element, Show element) => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll #
dynamicJump :: (ALU m ll element, Show element) => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll #
dynamicBranch :: (ALU m ll element, Show element) => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll #
findAddressForDynamicLabel :: (MonadSafe m, Integral n, Show n) => n -> InstructionVector -> m InstructionAddress #
staticCall :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll #
staticJump :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll #
staticBranch :: ALU m ll element => Label -> BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll #
findAddressForStaticLabel :: MonadSafe m => Label -> InstructionVector -> m InstructionAddress #
newCU :: InstructionList -> ControlUnit #
ControlUnit methods
currentInstruction :: MonadSafe m => ControlUnit -> m Instruction #
incrementPC :: ControlUnit -> ControlUnit #
data CentralProcessingUnit al #
Types
CPU | |
|
Instances
Show al => Show (CentralProcessingUnit al) # | |
Defined in HelVM.HelMA.Automaton.Combiner.CPU showsPrec :: Int -> CentralProcessingUnit al -> ShowS # show :: CentralProcessingUnit al -> String # showList :: [CentralProcessingUnit al] -> ShowS # |
data ControlUnit #
Instances
Show ControlUnit # | |
Defined in HelVM.HelMA.Automaton.Combiner.CPU showsPrec :: Int -> ControlUnit -> ShowS # show :: ControlUnit -> String # showList :: [ControlUnit] -> ShowS # |
newtype InstructionStack #
Instances
Show InstructionStack # | |
Defined in HelVM.HelMA.Automaton.Combiner.CPU showsPrec :: Int -> InstructionStack -> ShowS # show :: InstructionStack -> String # showList :: [InstructionStack] -> ShowS # |
type InstructionAddress = Int #