diff options
author | Geoffrey Mainland <gmainlan@microsoft.com> | 2011-11-04 17:44:39 +0000 |
---|---|---|
committer | Geoffrey Mainland <gmainlan@microsoft.com> | 2013-02-01 22:00:24 +0000 |
commit | 6480a35c15717025c169980b1cc763a7e6f36056 (patch) | |
tree | a4c5c6584018cd5c584414953435a6c076e02181 /compiler/llvmGen | |
parent | 4906460ad21ca2e90c0e2d9d50368fdc13c71bf2 (diff) | |
download | haskell-6480a35c15717025c169980b1cc763a7e6f36056.tar.gz |
Always pass vector values on the stack.
Vector values are now always passed on the stack. This isn't particularly
efficient, but it will have to do for now.
Diffstat (limited to 'compiler/llvmGen')
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index 28933831f4..b7e085116d 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -1260,6 +1260,17 @@ genLit opt env (CmmInt i w) genLit _ env (CmmFloat r w) = return (env, LMLitVar $ LMFloatLit (fromRational r) (widthToLlvmFloat w), nilOL, []) + +genLit opt env (CmmVec ls) + = do llvmLits <- mapM toLlvmLit ls + return (env, LMLitVar $ LMVectorLit llvmLits, nilOL, []) + where + toLlvmLit :: CmmLit -> UniqSM LlvmLit + toLlvmLit lit = do + (_, llvmLitVar, _, _) <- genLit opt env lit + case llvmLitVar of + LMLitVar llvmLit -> return llvmLit + _ -> panic "genLit" genLit _ env cmm@(CmmLabel l) = let dflags = getDflags env |