curly-system-0.3.3: System-specific code generation libraries for the Curly compiler

Safe HaskellNone
LanguageHaskell2010

Curly.System.X86.Common

Contents

Documentation

data X86 Source #

Constructors

X86 
X86_64 

if32 :: (?x86 :: X86) => a -> a -> a Source #

encodeWord :: (?x86 :: X86) => Word32 -> BinaryCode Source #

x86_wordSize :: (?x86 :: X86, Num n) => n Source #

archOffset :: (?x86 :: X86, Num n, Semiring n) => Offset -> n Source #

data R Source #

Instances

Enum R Source # 

Methods

succ :: R -> R #

pred :: R -> R #

toEnum :: Int -> R #

fromEnum :: R -> Int #

enumFrom :: R -> [R] #

enumFromThen :: R -> R -> [R] #

enumFromTo :: R -> R -> [R] #

enumFromThenTo :: R -> R -> R -> [R] #

Show R Source # 

Methods

showsPrec :: Int -> R -> ShowS #

show :: R -> String #

showList :: [R] -> ShowS #

IsValue R Source # 

Methods

toValue :: R -> Value Source #

IsLocus R Source # 

Methods

toLocus :: R -> Locus Source #

rm_ind :: Num t => RM -> t Source #

rm0_ind :: Num t => RM0 -> t Source #

data SIB Source #

Constructors

SIB Scale Index Base 

en :: Enum n => n -> Word8 Source #

fi :: (Num n, Integral m) => m -> n Source #

toRM :: (?x86 :: X86) -> RegID -> OffsetStride -> RM Source #

toR :: Enum a => RegID -> a Source #

x86_prefix :: (?x86 :: X86) => Set Prefix Source #

immN :: (?x86 :: X86) -> Integer -> Immediate Source #

rsrc :: (?x86 :: X86) -> RegID Source #

rdst :: (?x86 :: X86) -> RegID Source #

x86_cp :: (?x86 :: X86, MonadWriter BinaryCode m) => Locus -> Value -> m () Source #

x86_unary :: (MonadWriter BinaryCode m, ?x86 :: X86) => (Word8, Int) -> Word8 -> Word8 -> Locus -> Value -> m () Source #

x86_add :: (?x86 :: X86, MonadWriter BinaryCode m) => Locus -> Value -> m () Source #

x86_sub :: (?x86 :: X86, MonadWriter BinaryCode m) => Locus -> Value -> m () Source #

x86_push :: (?x86 :: X86, MonadWriter BinaryCode m) => Value -> m () Source #

x86_pop :: (Semiring a, Integral a, MonadWriter BinaryCode m, ?x86 :: X86) => Either a Locus -> m () Source #

reg :: Enum a => a -> RegID Source #

x86_cmp :: (?x86 :: X86, MonadWriter BinaryCode m) => Locus -> Value -> m () Source #

x86_load :: (?x86 :: X86, MonadWriter BinaryCode m) => Locus -> BinAddress -> m () Source #

x86_store :: (?x86 :: X86, MonadWriter BinaryCode m) => BinAddress -> Value -> m () Source #

x86_ccall :: (?x86 :: X86, MonadASM m s) => Maybe Locus -> BinAddress -> [m Value] -> m () Source #

x86_sys Source #

Arguments

:: (?x86 :: X86) 
=> String

The system's name

-> Standalone

A wrapper for standalone programs

-> ((?sysHooks :: SystemHooks) => VonNeumannMachine)

A machine description

-> ((?sysHooks :: SystemHooks) => BUILTIN_INSTR)

Additional per-system builtins

-> SystemHooks

Standalone hooks

-> System 

Orphan instances