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

Austin Seipp a at ghc.haskell.org
Wed Jul 17 16:44:08 CEST 2013


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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/18087a119b47368b15231c43402c81888c75957d

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

commit 18087a119b47368b15231c43402c81888c75957d
Author: Austin Seipp <aseipp at pobox.com>
Date:   Wed Jul 17 03:41:01 2013 -0500

    Add support for byte endian swapping for Word 16/32/64.
    
      * Exposes bSwap{,16,32,64}# primops
      * Add a new machop: 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.
    
    Authored-by: Vincent Hanquez <tab at snarc.org>
    Signed-off-by: Austin Seipp <aseipp at pobox.com>

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


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

    git show 18087a119b47368b15231c43402c81888c75957d




More information about the ghc-commits mailing list