
#7902: Add support for byte endianness swapping exposed as a primops ---------------------------------+------------------------------------------ Reporter: tab | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: bswap endianness | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by tab): I've refreshed the compiler bits to also expose a generic bSwap# that works on Word, and made some documentation precision on what the primops do for bSwap16 and bSwap32 as currently it will zero all the upper bits of word#. I've added the bits patch here for reference, and it doesn't looks as bad as i imagined. that's what i'll sent to the list ASAP. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7902#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler