diff options
Diffstat (limited to 'compiler/llvmGen')
-rw-r--r-- | compiler/llvmGen/Llvm/Types.hs | 14 | ||||
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 1 |
2 files changed, 5 insertions, 10 deletions
diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs index 6e349d813f..f477aa64ed 100644 --- a/compiler/llvmGen/Llvm/Types.hs +++ b/compiler/llvmGen/Llvm/Types.hs @@ -843,8 +843,10 @@ ppDouble d [x,y] -> [x,y] _ -> error "dToStr: too many hex digits for float" - str = map toUpper $ concat $ fixEndian $ map hex bs - in text "0x" <> text str + in sdocWithDynFlags (\dflags -> + let fixEndian = if wORDS_BIGENDIAN dflags then id else reverse + str = map toUpper $ concat $ fixEndian $ map hex bs + in text "0x" <> text str) -- Note [LLVM Float Types] -- ~~~~~~~~~~~~~~~~~~~~~~~ @@ -874,14 +876,6 @@ widenFp = float2Double ppFloat :: Float -> SDoc ppFloat = ppDouble . widenFp --- | Reverse or leave byte data alone to fix endianness on this target. -fixEndian :: [a] -> [a] -#if defined(WORDS_BIGENDIAN) -fixEndian = id -#else -fixEndian = reverse -#endif - -------------------------------------------------------------------------------- -- * Misc functions diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index f86207e081..c8d88a8c2a 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -833,6 +833,7 @@ cmmPrimOpFunctions mop = do MO_SubWordC w -> fsLit $ "llvm.usub.with.overflow." ++ showSDoc dflags (ppr $ widthToLlvmInt w) + MO_S_Mul2 {} -> unsupported MO_S_QuotRem {} -> unsupported MO_U_QuotRem {} -> unsupported MO_U_QuotRem2 {} -> unsupported |