diff options
| author | Ian Lynagh <ian@well-typed.com> | 2012-09-18 17:43:15 +0100 |
|---|---|---|
| committer | Ian Lynagh <ian@well-typed.com> | 2012-09-18 17:43:15 +0100 |
| commit | b44db6f1fac8e5c166104d6158eeaccbe9eb223d (patch) | |
| tree | 77e560d4578d43d4d9e44549005f908bd2bdbf5f /compiler/cmm/CmmUtils.hs | |
| parent | 98903b9626ab332eeac9d4baeb6854dd47272e8c (diff) | |
| download | haskell-b44db6f1fac8e5c166104d6158eeaccbe9eb223d.tar.gz | |
Remove some uses of the WORDS_BIGENDIAN CPP symbol
Diffstat (limited to 'compiler/cmm/CmmUtils.hs')
| -rw-r--r-- | compiler/cmm/CmmUtils.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/cmm/CmmUtils.hs b/compiler/cmm/CmmUtils.hs index e4d1c9efb5..8cbe46360c 100644 --- a/compiler/cmm/CmmUtils.hs +++ b/compiler/cmm/CmmUtils.hs @@ -165,13 +165,11 @@ packHalfWordsCLit :: DynFlags -> StgHalfWord -> StgHalfWord -> CmmLit -- ToDo: consider using half-word lits instead -- but be careful: that's vulnerable when reversed packHalfWordsCLit dflags lower_half_word upper_half_word -#ifdef WORDS_BIGENDIAN - = mkWordCLit dflags ((fromIntegral lower_half_word `shiftL` hALF_WORD_SIZE_IN_BITS) - .|. fromIntegral upper_half_word) -#else - = mkWordCLit dflags ((fromIntegral lower_half_word) - .|. (fromIntegral upper_half_word `shiftL` hALF_WORD_SIZE_IN_BITS)) -#endif + = if wORDS_BIGENDIAN dflags + then mkWordCLit dflags ((l `shiftL` hALF_WORD_SIZE_IN_BITS) .|. u) + else mkWordCLit dflags (l .|. (u `shiftL` hALF_WORD_SIZE_IN_BITS)) + where l = fromIntegral lower_half_word + u = fromIntegral upper_half_word --------------------------------------------------- -- |
