[commit: ghc] master: Add support for byte endian swapping for Word 16/32/64. (1c5b051)

Ian Lynagh igloo at earth.li
Sun Jun 9 14:19:26 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/1c5b0511a89488f5280523569d45ee61c0d09ffa

>---------------------------------------------------------------

commit 1c5b0511a89488f5280523569d45ee61c0d09ffa
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun Jun 9 12:10:35 2013 +0100

    Add support for byte endian swapping for Word 16/32/64.
    
    * 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.

 compiler/cmm/CmmMachOp.hs               |  1 +
 compiler/cmm/PprC.hs                    |  1 +
 compiler/codeGen/StgCmmPrim.hs          | 12 +++++++
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 60 ++++++++++++++++++++-------------
 compiler/nativeGen/CPrim.hs             |  9 +++++
 compiler/nativeGen/PPC/CodeGen.hs       |  1 +
 compiler/nativeGen/SPARC/CodeGen.hs     |  1 +
 compiler/nativeGen/X86/CodeGen.hs       | 14 ++++++++
 compiler/nativeGen/X86/Instr.hs         |  3 ++
 compiler/nativeGen/X86/Ppr.hs           |  1 +
 compiler/prelude/primops.txt.pp         |  9 +++++
 11 files changed, 88 insertions(+), 24 deletions(-)


Diff suppressed because of size. To see it, use:

    git show 1c5b0511a89488f5280523569d45ee61c0d09ffa



More information about the ghc-commits mailing list