diff options
author | Austin Seipp <aseipp@pobox.com> | 2013-07-17 03:41:01 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2013-07-17 04:18:52 -0500 |
commit | 18087a119b47368b15231c43402c81888c75957d (patch) | |
tree | 9bc069d9d0540fd40dc75745f4ab80218c1bf6d3 /compiler/cmm/CmmMachOp.hs | |
parent | 2f99cdb9f9e561f29d726fea90a5a98de7499a2d (diff) | |
download | haskell-18087a119b47368b15231c43402c81888c75957d.tar.gz |
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@snarc.org>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'compiler/cmm/CmmMachOp.hs')
-rw-r--r-- | compiler/cmm/CmmMachOp.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/cmm/CmmMachOp.hs b/compiler/cmm/CmmMachOp.hs index fae84e5d53..8d42bbd2cb 100644 --- a/compiler/cmm/CmmMachOp.hs +++ b/compiler/cmm/CmmMachOp.hs @@ -529,6 +529,7 @@ data CallishMachOp | MO_Memmove | MO_PopCnt Width + | MO_BSwap Width deriving (Eq, Show) pprCallishMachOp :: CallishMachOp -> SDoc |