diff options
author | David Terei <davidterei@gmail.com> | 2010-07-07 12:03:20 +0000 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2010-07-07 12:03:20 +0000 |
commit | d7b861369fa96494659b41b31d8935d65fdeaaae (patch) | |
tree | 3fed7f134944e5c98e2073996bf7070b75766178 | |
parent | b017f34bebf1588e5e579d7c653413e2a4c2d170 (diff) | |
download | haskell-d7b861369fa96494659b41b31d8935d65fdeaaae.tar.gz |
LLVM: Use packed structure type instead of structure type
The regular structure type adds padding to conform to the platform ABI,
which causes problems with structures storing doubles under windows since
we don't conform to the platform ABI there. So we use packed structures
instead now that don't do any padding.
-rw-r--r-- | compiler/llvmGen/Llvm/Types.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs index 0d66dd3282..0a39d38eb5 100644 --- a/compiler/llvmGen/Llvm/Types.hs +++ b/compiler/llvmGen/Llvm/Types.hs @@ -55,7 +55,7 @@ instance Show LlvmType where show (LMArray nr tp ) = "[" ++ show nr ++ " x " ++ show tp ++ "]" show (LMLabel ) = "label" show (LMVoid ) = "void" - show (LMStruct tys ) = "{" ++ (commaCat tys) ++ "}" + show (LMStruct tys ) = "<{" ++ (commaCat tys) ++ "}>" show (LMFunction (LlvmFunctionDecl _ _ _ r varg p _)) = let args = ((drop 1).concat) $ -- use drop since it can handle empty lists @@ -144,9 +144,9 @@ instance Show LlvmStatic where show (LMStaticStruc d t) = let struc = case d of - [] -> "{}" - ts -> "{" ++ show (head ts) ++ - concat (map (\x -> "," ++ show x) (tail ts)) ++ "}" + [] -> "<{}>" + ts -> "<{" ++ show (head ts) ++ + concat (map (\x -> "," ++ show x) (tail ts)) ++ "}>" in show t ++ " " ++ struc show (LMStaticPointer v) = show v |