module LLVM.Extra.ExtensionCheck.X86 (
   sse1, sse2, sse3, ssse3, sse41, sse42, avx, avx2, avx512,
   fma, amd3dnow, amd3dnowa, aes, sse4a,
   ) where

import qualified LLVM.Extra.Extension as Ext

subtarget :: String -> Bool -> Ext.Subtarget
subtarget name q =
   Ext.Subtarget "x86" name (return q)


-- * target specific extensions

sse1 :: Ext.Subtarget
sse1 = subtarget "sse" False

sse2 :: Ext.Subtarget
sse2 = subtarget "sse2" False

sse3 :: Ext.Subtarget
sse3 = subtarget "sse3" False

ssse3 :: Ext.Subtarget
ssse3 = subtarget "ssse3" False

sse41 :: Ext.Subtarget
sse41 = subtarget "sse41" False

sse42 :: Ext.Subtarget
sse42 = subtarget "sse42" False

avx :: Ext.Subtarget
avx = subtarget "avx" False

avx2 :: Ext.Subtarget
avx2 = subtarget "avx2" False

avx512 :: Ext.Subtarget
avx512 = subtarget "avx512" False

fma :: Ext.Subtarget
fma = subtarget "fma" False

amd3dnow :: Ext.Subtarget
amd3dnow = subtarget "3dnow" False

amd3dnowa :: Ext.Subtarget
amd3dnowa = subtarget "3dnowa" False

aes :: Ext.Subtarget
aes = subtarget "aesni" False

sse4a :: Ext.Subtarget
sse4a = subtarget "sse4a" False
