summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/SPARC/CodeGen.hs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-06-09 12:10:35 +0100
committerIan Lynagh <ian@well-typed.com>2013-06-09 12:10:35 +0100
commit1c5b0511a89488f5280523569d45ee61c0d09ffa (patch)
treeccdb8a6ff90162e4d26318b901c473ab5a7f90cc /compiler/nativeGen/SPARC/CodeGen.hs
parent972c044d5da72cee3a43209ccb41e2229914211c (diff)
downloadhaskell-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/nativeGen/SPARC/CodeGen.hs')
-rw-r--r--compiler/nativeGen/SPARC/CodeGen.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/nativeGen/SPARC/CodeGen.hs b/compiler/nativeGen/SPARC/CodeGen.hs
index 9c84a38f6a..5d2b9a9d6d 100644
--- a/compiler/nativeGen/SPARC/CodeGen.hs
+++ b/compiler/nativeGen/SPARC/CodeGen.hs
@@ -647,6 +647,7 @@ outOfLineMachOp_table mop
MO_Memset -> fsLit "memset"
MO_Memmove -> fsLit "memmove"
+ MO_BSwap w -> fsLit $ bSwapLabel w
MO_PopCnt w -> fsLit $ popCntLabel w
MO_S_QuotRem {} -> unsupported