diff options
author | Paul Monday <paul.monday@parsci.com> | 2011-11-03 15:35:37 -0600 |
---|---|---|
committer | Geoffrey Mainland <gmainlan@microsoft.com> | 2013-02-01 22:00:24 +0000 |
commit | 3984b912854a2261f5bf35e25bf929c15490e71a (patch) | |
tree | 318403ba7b6550e878b9f09574741dea759f1f58 /compiler/llvmGen/LlvmCodeGen/CodeGen.hs | |
parent | 4af62075bbe9e96a3678fc90288496e0c4c7c17d (diff) | |
download | haskell-3984b912854a2261f5bf35e25bf929c15490e71a.tar.gz |
Add the Int32X4# primitive type and associated primops.
Diffstat (limited to 'compiler/llvmGen/LlvmCodeGen/CodeGen.hs')
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index cd864ca1a2..efa7e9a706 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -879,6 +879,13 @@ genMachOp env _ op [x] = case op of MO_FF_Conv from to -> sameConv from (widthToLlvmFloat to) LM_Fptrunc LM_Fpext + MO_VS_Neg len w -> + let ty = widthToLlvmInt w + vecty = LMVector len ty + all0 = LMIntLit (-0) ty + all0s = LMLitVar $ LMVectorLit (replicate len all0) + in negate vecty all0s LM_MO_Sub + MO_VF_Neg len w -> let ty = widthToLlvmFloat w vecty = LMVector len ty @@ -929,6 +936,13 @@ genMachOp env _ op [x] = case op of MO_V_Insert _ _ -> panicOp MO_V_Extract _ _ -> panicOp + + MO_V_Add _ _ -> panicOp + MO_V_Sub _ _ -> panicOp + MO_V_Mul _ _ -> panicOp + + MO_VS_Quot _ _ -> panicOp + MO_VS_Rem _ _ -> panicOp MO_VF_Add _ _ -> panicOp MO_VF_Sub _ _ -> panicOp @@ -1065,6 +1079,13 @@ genMachOp_slow env opt op [x, y] = case op of MO_Shl _ -> genBinMach LM_MO_Shl MO_U_Shr _ -> genBinMach LM_MO_LShr MO_S_Shr _ -> genBinMach LM_MO_AShr + + MO_V_Add _ _ -> genBinMach LM_MO_Add + MO_V_Sub _ _ -> genBinMach LM_MO_Sub + MO_V_Mul _ _ -> genBinMach LM_MO_Mul + + MO_VS_Quot _ _ -> genBinMach LM_MO_SDiv + MO_VS_Rem _ _ -> genBinMach LM_MO_SRem MO_VF_Add _ _ -> genBinMach LM_MO_FAdd MO_VF_Sub _ _ -> genBinMach LM_MO_FSub @@ -1084,6 +1105,8 @@ genMachOp_slow env opt op [x, y] = case op of MO_V_Insert {} -> panicOp MO_V_Extract {} -> panicOp + MO_VS_Neg {} -> panicOp + MO_VF_Neg {} -> panicOp where |