[GHC] #12095: GHC and LLVM don't agree on what to do with byteSwap16#
GHC
ghc-devs at haskell.org
Sat May 21 12:20:21 UTC 2016
#12095: GHC and LLVM don't agree on what to do with byteSwap16#
-------------------------------------+-------------------------------------
Reporter: thoughtpolice | Owner:
Type: bug | Status: new
Priority: high | Milestone: 8.0.2
Component: Compiler (LLVM) | Version: 8.0.1
Resolution: | Keywords: codegen, llvm
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by rwbarton):
`byteSwap16#` is defined in `primops.txt.pp` as
{{{
primop BSwap16Op "byteSwap16#" Monadic Word# -> Word#
{Swap bytes in the lower 16 bits of a word. The higher bytes are
undefined. }
}}}
So, I don't see the problem. Writing `W64# (byteSwap16# (...))` is wrong.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12095#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list