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

import           Zydis.Util

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