-- MachineMode.hs ---

-- Copyright (C) 2020 Nerd Ed

-- Author: Nerd Ed <nerded.nerded@gmail.com>

-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 3
-- of the License, or (at your option) any later version.

-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.

-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.

{-# LANGUAGE DerivingVia              #-}

module Zydis.MachineMode
  ( MachineMode(..)
  )
where

import           Zydis.Util

data MachineMode
  = MachineModeLong64
  | MachineModeLongCompat32
  | MachineModeLongCompat16
  | MachineModeLegacy32
  | MachineModeLegacy16
  | MachineModeReal16
  deriving stock (Int -> MachineMode -> ShowS
[MachineMode] -> ShowS
MachineMode -> String
(Int -> MachineMode -> ShowS)
-> (MachineMode -> String)
-> ([MachineMode] -> ShowS)
-> Show MachineMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MachineMode] -> ShowS
$cshowList :: [MachineMode] -> ShowS
show :: MachineMode -> String
$cshow :: MachineMode -> String
showsPrec :: Int -> MachineMode -> ShowS
$cshowsPrec :: Int -> MachineMode -> ShowS
Show, MachineMode -> MachineMode -> Bool
(MachineMode -> MachineMode -> Bool)
-> (MachineMode -> MachineMode -> Bool) -> Eq MachineMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MachineMode -> MachineMode -> Bool
$c/= :: MachineMode -> MachineMode -> Bool
== :: MachineMode -> MachineMode -> Bool
$c== :: MachineMode -> MachineMode -> Bool
Eq, MachineMode
MachineMode -> MachineMode -> Bounded MachineMode
forall a. a -> a -> Bounded a
maxBound :: MachineMode
$cmaxBound :: MachineMode
minBound :: MachineMode
$cminBound :: MachineMode
Bounded, Int -> MachineMode
MachineMode -> Int
MachineMode -> [MachineMode]
MachineMode -> MachineMode
MachineMode -> MachineMode -> [MachineMode]
MachineMode -> MachineMode -> MachineMode -> [MachineMode]
(MachineMode -> MachineMode)
-> (MachineMode -> MachineMode)
-> (Int -> MachineMode)
-> (MachineMode -> Int)
-> (MachineMode -> [MachineMode])
-> (MachineMode -> MachineMode -> [MachineMode])
-> (MachineMode -> MachineMode -> [MachineMode])
-> (MachineMode -> MachineMode -> MachineMode -> [MachineMode])
-> Enum MachineMode
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: MachineMode -> MachineMode -> MachineMode -> [MachineMode]
$cenumFromThenTo :: MachineMode -> MachineMode -> MachineMode -> [MachineMode]
enumFromTo :: MachineMode -> MachineMode -> [MachineMode]
$cenumFromTo :: MachineMode -> MachineMode -> [MachineMode]
enumFromThen :: MachineMode -> MachineMode -> [MachineMode]
$cenumFromThen :: MachineMode -> MachineMode -> [MachineMode]
enumFrom :: MachineMode -> [MachineMode]
$cenumFrom :: MachineMode -> [MachineMode]
fromEnum :: MachineMode -> Int
$cfromEnum :: MachineMode -> Int
toEnum :: Int -> MachineMode
$ctoEnum :: Int -> MachineMode
pred :: MachineMode -> MachineMode
$cpred :: MachineMode -> MachineMode
succ :: MachineMode -> MachineMode
$csucc :: MachineMode -> MachineMode
Enum)
  deriving Ptr b -> Int -> IO MachineMode
Ptr b -> Int -> MachineMode -> IO ()
Ptr MachineMode -> IO MachineMode
Ptr MachineMode -> Int -> IO MachineMode
Ptr MachineMode -> Int -> MachineMode -> IO ()
Ptr MachineMode -> MachineMode -> IO ()
MachineMode -> Int
(MachineMode -> Int)
-> (MachineMode -> Int)
-> (Ptr MachineMode -> Int -> IO MachineMode)
-> (Ptr MachineMode -> Int -> MachineMode -> IO ())
-> (forall b. Ptr b -> Int -> IO MachineMode)
-> (forall b. Ptr b -> Int -> MachineMode -> IO ())
-> (Ptr MachineMode -> IO MachineMode)
-> (Ptr MachineMode -> MachineMode -> IO ())
-> Storable MachineMode
forall b. Ptr b -> Int -> IO MachineMode
forall b. Ptr b -> Int -> MachineMode -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr MachineMode -> MachineMode -> IO ()
$cpoke :: Ptr MachineMode -> MachineMode -> IO ()
peek :: Ptr MachineMode -> IO MachineMode
$cpeek :: Ptr MachineMode -> IO MachineMode
pokeByteOff :: Ptr b -> Int -> MachineMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> MachineMode -> IO ()
peekByteOff :: Ptr b -> Int -> IO MachineMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO MachineMode
pokeElemOff :: Ptr MachineMode -> Int -> MachineMode -> IO ()
$cpokeElemOff :: Ptr MachineMode -> Int -> MachineMode -> IO ()
peekElemOff :: Ptr MachineMode -> Int -> IO MachineMode
$cpeekElemOff :: Ptr MachineMode -> Int -> IO MachineMode
alignment :: MachineMode -> Int
$calignment :: MachineMode -> Int
sizeOf :: MachineMode -> Int
$csizeOf :: MachineMode -> Int
Storable via StorableExt MachineMode