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

import           Zydis.Util

data BroadcastMode
  = BroadcastModeInvalid
  | BroadcastMode1To2
  | BroadcastMode1To4
  | BroadcastMode1To8
  | BroadcastMode1To16
  | BroadcastMode1To32
  | BroadcastMode1To64
  | BroadcastMode2To4
  | BroadcastMode2To8
  | BroadcastMode2To16
  | BroadcastMode4To8
  | BroadcastMode4To16
  | BroadcastMode8To16
  deriving stock (Int -> BroadcastMode -> ShowS
[BroadcastMode] -> ShowS
BroadcastMode -> String
(Int -> BroadcastMode -> ShowS)
-> (BroadcastMode -> String)
-> ([BroadcastMode] -> ShowS)
-> Show BroadcastMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BroadcastMode] -> ShowS
$cshowList :: [BroadcastMode] -> ShowS
show :: BroadcastMode -> String
$cshow :: BroadcastMode -> String
showsPrec :: Int -> BroadcastMode -> ShowS
$cshowsPrec :: Int -> BroadcastMode -> ShowS
Show, BroadcastMode -> BroadcastMode -> Bool
(BroadcastMode -> BroadcastMode -> Bool)
-> (BroadcastMode -> BroadcastMode -> Bool) -> Eq BroadcastMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BroadcastMode -> BroadcastMode -> Bool
$c/= :: BroadcastMode -> BroadcastMode -> Bool
== :: BroadcastMode -> BroadcastMode -> Bool
$c== :: BroadcastMode -> BroadcastMode -> Bool
Eq, BroadcastMode
BroadcastMode -> BroadcastMode -> Bounded BroadcastMode
forall a. a -> a -> Bounded a
maxBound :: BroadcastMode
$cmaxBound :: BroadcastMode
minBound :: BroadcastMode
$cminBound :: BroadcastMode
Bounded, Int -> BroadcastMode
BroadcastMode -> Int
BroadcastMode -> [BroadcastMode]
BroadcastMode -> BroadcastMode
BroadcastMode -> BroadcastMode -> [BroadcastMode]
BroadcastMode -> BroadcastMode -> BroadcastMode -> [BroadcastMode]
(BroadcastMode -> BroadcastMode)
-> (BroadcastMode -> BroadcastMode)
-> (Int -> BroadcastMode)
-> (BroadcastMode -> Int)
-> (BroadcastMode -> [BroadcastMode])
-> (BroadcastMode -> BroadcastMode -> [BroadcastMode])
-> (BroadcastMode -> BroadcastMode -> [BroadcastMode])
-> (BroadcastMode
    -> BroadcastMode -> BroadcastMode -> [BroadcastMode])
-> Enum BroadcastMode
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 :: BroadcastMode -> BroadcastMode -> BroadcastMode -> [BroadcastMode]
$cenumFromThenTo :: BroadcastMode -> BroadcastMode -> BroadcastMode -> [BroadcastMode]
enumFromTo :: BroadcastMode -> BroadcastMode -> [BroadcastMode]
$cenumFromTo :: BroadcastMode -> BroadcastMode -> [BroadcastMode]
enumFromThen :: BroadcastMode -> BroadcastMode -> [BroadcastMode]
$cenumFromThen :: BroadcastMode -> BroadcastMode -> [BroadcastMode]
enumFrom :: BroadcastMode -> [BroadcastMode]
$cenumFrom :: BroadcastMode -> [BroadcastMode]
fromEnum :: BroadcastMode -> Int
$cfromEnum :: BroadcastMode -> Int
toEnum :: Int -> BroadcastMode
$ctoEnum :: Int -> BroadcastMode
pred :: BroadcastMode -> BroadcastMode
$cpred :: BroadcastMode -> BroadcastMode
succ :: BroadcastMode -> BroadcastMode
$csucc :: BroadcastMode -> BroadcastMode
Enum)
  deriving Ptr b -> Int -> IO BroadcastMode
Ptr b -> Int -> BroadcastMode -> IO ()
Ptr BroadcastMode -> IO BroadcastMode
Ptr BroadcastMode -> Int -> IO BroadcastMode
Ptr BroadcastMode -> Int -> BroadcastMode -> IO ()
Ptr BroadcastMode -> BroadcastMode -> IO ()
BroadcastMode -> Int
(BroadcastMode -> Int)
-> (BroadcastMode -> Int)
-> (Ptr BroadcastMode -> Int -> IO BroadcastMode)
-> (Ptr BroadcastMode -> Int -> BroadcastMode -> IO ())
-> (forall b. Ptr b -> Int -> IO BroadcastMode)
-> (forall b. Ptr b -> Int -> BroadcastMode -> IO ())
-> (Ptr BroadcastMode -> IO BroadcastMode)
-> (Ptr BroadcastMode -> BroadcastMode -> IO ())
-> Storable BroadcastMode
forall b. Ptr b -> Int -> IO BroadcastMode
forall b. Ptr b -> Int -> BroadcastMode -> 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 BroadcastMode -> BroadcastMode -> IO ()
$cpoke :: Ptr BroadcastMode -> BroadcastMode -> IO ()
peek :: Ptr BroadcastMode -> IO BroadcastMode
$cpeek :: Ptr BroadcastMode -> IO BroadcastMode
pokeByteOff :: Ptr b -> Int -> BroadcastMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> BroadcastMode -> IO ()
peekByteOff :: Ptr b -> Int -> IO BroadcastMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BroadcastMode
pokeElemOff :: Ptr BroadcastMode -> Int -> BroadcastMode -> IO ()
$cpokeElemOff :: Ptr BroadcastMode -> Int -> BroadcastMode -> IO ()
peekElemOff :: Ptr BroadcastMode -> Int -> IO BroadcastMode
$cpeekElemOff :: Ptr BroadcastMode -> Int -> IO BroadcastMode
alignment :: BroadcastMode -> Int
$calignment :: BroadcastMode -> Int
sizeOf :: BroadcastMode -> Int
$csizeOf :: BroadcastMode -> Int
Storable via StorableExt BroadcastMode