diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-06-09 12:10:35 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-06-09 12:10:35 +0100 |
commit | 1c5b0511a89488f5280523569d45ee61c0d09ffa (patch) | |
tree | ccdb8a6ff90162e4d26318b901c473ab5a7f90cc /compiler/cmm/CmmMachOp.hs | |
parent | 972c044d5da72cee3a43209ccb41e2229914211c (diff) | |
download | haskell-1c5b0511a89488f5280523569d45ee61c0d09ffa.tar.gz |
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.
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 |