Safe Haskell | None |
---|
Some special operations on X86 processors.
If you want to use them in algorithms
you will always have to prepare an alternative implementation
in terms of plain LLVM instructions.
You will then run them with run
and this driver function then selects the most advanced of both implementations.
Functions that are written this way can be found in LLVM.Extra.Vector.
Availability of extensions is checked with the CPUID
instruction.
However this does only work if you compile code for the host machine,
that is cross compilation will fail!
For cross compilation we would need access to the SubTarget detection of LLVM
that is only available in the C++ interface in version 2.6.
- maxss :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)
- minss :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)
- maxps :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)
- minps :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)
- maxsd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)
- minsd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)
- maxpd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)
- minpd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)
- cmpss :: T (FPPredicate -> V4Float -> V4Float -> CodeGenFunction r V4Int32)
- cmpps :: T (FPPredicate -> V4Float -> V4Float -> CodeGenFunction r V4Int32)
- cmpsd :: T (FPPredicate -> V2Double -> V2Double -> CodeGenFunction r V2Int64)
- cmppd :: T (FPPredicate -> V2Double -> V2Double -> CodeGenFunction r V2Int64)
- cmpps256 :: T (FPPredicate -> V8Float -> V8Float -> CodeGenFunction r V8Int32)
- cmppd256 :: T (FPPredicate -> V4Double -> V4Double -> CodeGenFunction r V4Int64)
- pcmpgtb :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)
- pcmpgtw :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)
- pcmpgtd :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)
- pcmpgtq :: T (V2Int64 -> V2Int64 -> CodeGenFunction r V2Int64)
- pcmpugtb :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)
- pcmpugtw :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)
- pcmpugtd :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V4Word32)
- pcmpugtq :: T (V2Word64 -> V2Word64 -> CodeGenFunction r V2Word64)
- pminsb :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)
- pminsw :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)
- pminsd :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)
- pmaxsb :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)
- pmaxsw :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)
- pmaxsd :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)
- pminub :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)
- pminuw :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)
- pminud :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V4Word32)
- pmaxub :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)
- pmaxuw :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)
- pmaxud :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V4Word32)
- pabsb :: T (V16Int8 -> CodeGenFunction r V16Int8)
- pabsw :: T (V8Int16 -> CodeGenFunction r V8Int16)
- pabsd :: T (V4Int32 -> CodeGenFunction r V4Int32)
- pmuludq :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V2Word64)
- pmuldq :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V2Int64)
- pmulld :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V4Word32)
- cvtps2dq :: T (V4Float -> CodeGenFunction r V4Int32)
- cvtpd2dq :: T (V2Double -> CodeGenFunction r V4Int32)
- cvtdq2ps :: T (V4Int32 -> CodeGenFunction r V4Float)
- cvtdq2pd :: T (V4Int32 -> CodeGenFunction r V2Double)
- ldmxcsr :: T (Value (Ptr Word32) -> CodeGenFunction r ())
- stmxcsr :: T (Value (Ptr Word32) -> CodeGenFunction r ())
- withMXCSR :: Word32 -> T (CodeGenFunction r a -> CodeGenFunction r a)
- haddps :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)
- haddpd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)
- dpps :: T (V4Float -> V4Float -> Value Int8 -> CodeGenFunction r V4Float)
- dppd :: T (V2Double -> V2Double -> Value Int8 -> CodeGenFunction r V2Double)
- roundss :: T (V4Float -> Value Word32 -> CodeGenFunction r V4Float)
- roundps :: T (V4Float -> Value Word32 -> CodeGenFunction r V4Float)
- roundsd :: T (V2Double -> Value Word32 -> CodeGenFunction r V2Double)
- roundpd :: T (V2Double -> Value Word32 -> CodeGenFunction r V2Double)
- absss :: T (V4Float -> CodeGenFunction r V4Float)
- abssd :: T (V2Double -> CodeGenFunction r V2Double)
- absps :: Positive n => T (Value (Vector n Float) -> CodeGenFunction r (Value (Vector n Float)))
- abspd :: Positive n => T (Value (Vector n Double) -> CodeGenFunction r (Value (Vector n Double)))
- psllw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)
- pslld128 :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)
- psllq128 :: T (V2Int64 -> V2Int64 -> CodeGenFunction r V2Int64)
- psrlw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)
- psrld128 :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)
- psrlq128 :: T (V2Int64 -> V2Int64 -> CodeGenFunction r V2Int64)
- psraw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)
- psrad128 :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)
- paddsb128 :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)
- paddsw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)
- paddusb128 :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)
- paddusw128 :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)
- psubsb128 :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)
- psubsw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)
- psubusb128 :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)
- psubusw128 :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)
Documentation
maxss :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)Source
minss :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)Source
maxps :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)Source
minps :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)Source
maxsd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)Source
minsd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)Source
maxpd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)Source
minpd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)Source
cmpss :: T (FPPredicate -> V4Float -> V4Float -> CodeGenFunction r V4Int32)Source
cmpps :: T (FPPredicate -> V4Float -> V4Float -> CodeGenFunction r V4Int32)Source
cmpsd :: T (FPPredicate -> V2Double -> V2Double -> CodeGenFunction r V2Int64)Source
cmppd :: T (FPPredicate -> V2Double -> V2Double -> CodeGenFunction r V2Int64)Source
cmpps256 :: T (FPPredicate -> V8Float -> V8Float -> CodeGenFunction r V8Int32)Source
cmppd256 :: T (FPPredicate -> V4Double -> V4Double -> CodeGenFunction r V4Int64)Source
pcmpgtb :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)Source
pcmpgtw :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)Source
pcmpgtd :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)Source
pcmpgtq :: T (V2Int64 -> V2Int64 -> CodeGenFunction r V2Int64)Source
pcmpugtb :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)Source
pcmpugtw :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)Source
pcmpugtd :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V4Word32)Source
pcmpugtq :: T (V2Word64 -> V2Word64 -> CodeGenFunction r V2Word64)Source
pminsb :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)Source
pminsw :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)Source
pminsd :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)Source
pmaxsb :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)Source
pmaxsw :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)Source
pmaxsd :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)Source
pminub :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)Source
pminuw :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)Source
pminud :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V4Word32)Source
pmaxub :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)Source
pmaxuw :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)Source
pmaxud :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V4Word32)Source
pabsb :: T (V16Int8 -> CodeGenFunction r V16Int8)Source
pabsw :: T (V8Int16 -> CodeGenFunction r V8Int16)Source
pabsd :: T (V4Int32 -> CodeGenFunction r V4Int32)Source
pmuludq :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V2Word64)Source
pmuldq :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V2Int64)Source
pmulld :: T (V4Word32 -> V4Word32 -> CodeGenFunction r V4Word32)Source
cvtps2dq :: T (V4Float -> CodeGenFunction r V4Int32)Source
cvtpd2dq :: T (V2Double -> CodeGenFunction r V4Int32)Source
the upper two integers are set to zero, there is no instruction that converts to Int64
cvtdq2ps :: T (V4Int32 -> CodeGenFunction r V4Float)Source
cvtdq2pd :: T (V4Int32 -> CodeGenFunction r V2Double)Source
the upper two integers are ignored, there is no instruction that converts from Int64
ldmxcsr :: T (Value (Ptr Word32) -> CodeGenFunction r ())Source
MXCSR is not really supported by LLVM-2.6. LLVM does not know about the dependency of all floating point operations on this status register.
withMXCSR :: Word32 -> T (CodeGenFunction r a -> CodeGenFunction r a)Source
haddps :: T (V4Float -> V4Float -> CodeGenFunction r V4Float)Source
haddpd :: T (V2Double -> V2Double -> CodeGenFunction r V2Double)Source
absss :: T (V4Float -> CodeGenFunction r V4Float)Source
abssd :: T (V2Double -> CodeGenFunction r V2Double)Source
absps :: Positive n => T (Value (Vector n Float) -> CodeGenFunction r (Value (Vector n Float)))Source
abspd :: Positive n => T (Value (Vector n Double) -> CodeGenFunction r (Value (Vector n Double)))Source
psllw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)Source
pslld128 :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)Source
psllq128 :: T (V2Int64 -> V2Int64 -> CodeGenFunction r V2Int64)Source
psrlw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)Source
psrld128 :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)Source
psrlq128 :: T (V2Int64 -> V2Int64 -> CodeGenFunction r V2Int64)Source
psraw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)Source
psrad128 :: T (V4Int32 -> V4Int32 -> CodeGenFunction r V4Int32)Source
paddsb128 :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)Source
paddsw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)Source
paddusb128 :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)Source
paddusw128 :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)Source
psubsb128 :: T (V16Int8 -> V16Int8 -> CodeGenFunction r V16Int8)Source
psubsw128 :: T (V8Int16 -> V8Int16 -> CodeGenFunction r V8Int16)Source
psubusb128 :: T (V16Word8 -> V16Word8 -> CodeGenFunction r V16Word8)Source
psubusw128 :: T (V8Word16 -> V8Word16 -> CodeGenFunction r V8Word16)Source