-- InstructionEncoding.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.InstructionEncoding
  ( InstructionEncoding
  )
where

import           Zydis.Util

data InstructionEncoding
  = InstructionEncodingLegacy
  | InstructionEncoding3Dnow
  | InstructionEncodingXop
  | InstructionEncodingVex
  | InstructionEncodingEvex
  | InstructionEncodingMvex
  deriving stock (Int -> InstructionEncoding -> ShowS
[InstructionEncoding] -> ShowS
InstructionEncoding -> String
(Int -> InstructionEncoding -> ShowS)
-> (InstructionEncoding -> String)
-> ([InstructionEncoding] -> ShowS)
-> Show InstructionEncoding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstructionEncoding] -> ShowS
$cshowList :: [InstructionEncoding] -> ShowS
show :: InstructionEncoding -> String
$cshow :: InstructionEncoding -> String
showsPrec :: Int -> InstructionEncoding -> ShowS
$cshowsPrec :: Int -> InstructionEncoding -> ShowS
Show, InstructionEncoding -> InstructionEncoding -> Bool
(InstructionEncoding -> InstructionEncoding -> Bool)
-> (InstructionEncoding -> InstructionEncoding -> Bool)
-> Eq InstructionEncoding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstructionEncoding -> InstructionEncoding -> Bool
$c/= :: InstructionEncoding -> InstructionEncoding -> Bool
== :: InstructionEncoding -> InstructionEncoding -> Bool
$c== :: InstructionEncoding -> InstructionEncoding -> Bool
Eq, InstructionEncoding
InstructionEncoding
-> InstructionEncoding -> Bounded InstructionEncoding
forall a. a -> a -> Bounded a
maxBound :: InstructionEncoding
$cmaxBound :: InstructionEncoding
minBound :: InstructionEncoding
$cminBound :: InstructionEncoding
Bounded, Int -> InstructionEncoding
InstructionEncoding -> Int
InstructionEncoding -> [InstructionEncoding]
InstructionEncoding -> InstructionEncoding
InstructionEncoding -> InstructionEncoding -> [InstructionEncoding]
InstructionEncoding
-> InstructionEncoding
-> InstructionEncoding
-> [InstructionEncoding]
(InstructionEncoding -> InstructionEncoding)
-> (InstructionEncoding -> InstructionEncoding)
-> (Int -> InstructionEncoding)
-> (InstructionEncoding -> Int)
-> (InstructionEncoding -> [InstructionEncoding])
-> (InstructionEncoding
    -> InstructionEncoding -> [InstructionEncoding])
-> (InstructionEncoding
    -> InstructionEncoding -> [InstructionEncoding])
-> (InstructionEncoding
    -> InstructionEncoding
    -> InstructionEncoding
    -> [InstructionEncoding])
-> Enum InstructionEncoding
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 :: InstructionEncoding
-> InstructionEncoding
-> InstructionEncoding
-> [InstructionEncoding]
$cenumFromThenTo :: InstructionEncoding
-> InstructionEncoding
-> InstructionEncoding
-> [InstructionEncoding]
enumFromTo :: InstructionEncoding -> InstructionEncoding -> [InstructionEncoding]
$cenumFromTo :: InstructionEncoding -> InstructionEncoding -> [InstructionEncoding]
enumFromThen :: InstructionEncoding -> InstructionEncoding -> [InstructionEncoding]
$cenumFromThen :: InstructionEncoding -> InstructionEncoding -> [InstructionEncoding]
enumFrom :: InstructionEncoding -> [InstructionEncoding]
$cenumFrom :: InstructionEncoding -> [InstructionEncoding]
fromEnum :: InstructionEncoding -> Int
$cfromEnum :: InstructionEncoding -> Int
toEnum :: Int -> InstructionEncoding
$ctoEnum :: Int -> InstructionEncoding
pred :: InstructionEncoding -> InstructionEncoding
$cpred :: InstructionEncoding -> InstructionEncoding
succ :: InstructionEncoding -> InstructionEncoding
$csucc :: InstructionEncoding -> InstructionEncoding
Enum)
  deriving Ptr b -> Int -> IO InstructionEncoding
Ptr b -> Int -> InstructionEncoding -> IO ()
Ptr InstructionEncoding -> IO InstructionEncoding
Ptr InstructionEncoding -> Int -> IO InstructionEncoding
Ptr InstructionEncoding -> Int -> InstructionEncoding -> IO ()
Ptr InstructionEncoding -> InstructionEncoding -> IO ()
InstructionEncoding -> Int
(InstructionEncoding -> Int)
-> (InstructionEncoding -> Int)
-> (Ptr InstructionEncoding -> Int -> IO InstructionEncoding)
-> (Ptr InstructionEncoding -> Int -> InstructionEncoding -> IO ())
-> (forall b. Ptr b -> Int -> IO InstructionEncoding)
-> (forall b. Ptr b -> Int -> InstructionEncoding -> IO ())
-> (Ptr InstructionEncoding -> IO InstructionEncoding)
-> (Ptr InstructionEncoding -> InstructionEncoding -> IO ())
-> Storable InstructionEncoding
forall b. Ptr b -> Int -> IO InstructionEncoding
forall b. Ptr b -> Int -> InstructionEncoding -> 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 InstructionEncoding -> InstructionEncoding -> IO ()
$cpoke :: Ptr InstructionEncoding -> InstructionEncoding -> IO ()
peek :: Ptr InstructionEncoding -> IO InstructionEncoding
$cpeek :: Ptr InstructionEncoding -> IO InstructionEncoding
pokeByteOff :: Ptr b -> Int -> InstructionEncoding -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> InstructionEncoding -> IO ()
peekByteOff :: Ptr b -> Int -> IO InstructionEncoding
$cpeekByteOff :: forall b. Ptr b -> Int -> IO InstructionEncoding
pokeElemOff :: Ptr InstructionEncoding -> Int -> InstructionEncoding -> IO ()
$cpokeElemOff :: Ptr InstructionEncoding -> Int -> InstructionEncoding -> IO ()
peekElemOff :: Ptr InstructionEncoding -> Int -> IO InstructionEncoding
$cpeekElemOff :: Ptr InstructionEncoding -> Int -> IO InstructionEncoding
alignment :: InstructionEncoding -> Int
$calignment :: InstructionEncoding -> Int
sizeOf :: InstructionEncoding -> Int
$csizeOf :: InstructionEncoding -> Int
Storable via StorableExt InstructionEncoding