Skip to content
  • Ian Lynagh's avatar
    Add support for byte endian swapping for Word 16/32/64. · 1c5b0511
    Ian Lynagh authored
    * Exposes bSwap{,16,32,64}# primops
    * Add a new machops MO_BSwap
    * Use a Stg implementation (hs_bswap{16,32,64}) for other implementation
      in NCG.
    * Generate bswap in X86 NCG for 32 and 64 bits, and for 16 bits, bswap+shr
      instead of using xchg.
    * Generate llvm.bswap intrinsics in llvm codegen.
    
    Patch from Vincent Hanquez.
    1c5b0511