aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 14:34:52 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 14:34:52 +0000
commit146fd5a902934102839ce67ac4456a510b5760cb (patch)
treed45fe774d5cbf1b050df823ed82944d515332cb6 /lib
parent23bf653297f0403841c3abffbd861519d34db50b (diff)
downloadexternal_llvm-146fd5a902934102839ce67ac4456a510b5760cb.zip
external_llvm-146fd5a902934102839ce67ac4456a510b5760cb.tar.gz
external_llvm-146fd5a902934102839ce67ac4456a510b5760cb.tar.bz2
Add bswap patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/SystemZ/SystemZInstrInfo.td18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Target/SystemZ/SystemZInstrInfo.td b/lib/Target/SystemZ/SystemZInstrInfo.td
index c124af6..30204fa 100644
--- a/lib/Target/SystemZ/SystemZInstrInfo.td
+++ b/lib/Target/SystemZ/SystemZInstrInfo.td
@@ -432,6 +432,24 @@ def MOV128r0_even : Pseudo<(outs GR128:$dst), (ins GR128:$src),
[]>;
}
+// Byte swaps
+def BSWAP32rr : Pseudo<(outs GR32:$dst), (ins GR32:$src),
+ "lrvr\t{$dst, $src}",
+ [(set GR32:$dst, (bswap GR32:$src))]>;
+def BSWAP64rr : Pseudo<(outs GR64:$dst), (ins GR64:$src),
+ "lrvgr\t{$dst, $src}",
+ [(set GR64:$dst, (bswap GR64:$src))]>;
+
+def BSWAP16rm : Pseudo<(outs GR32:$dst), (ins rriaddr:$src),
+ "lrvh\t{$dst, $src}",
+ [(set GR32:$dst, (bswap (extloadi32i16 rriaddr:$src)))]>;
+def BSWAP32rm : Pseudo<(outs GR32:$dst), (ins rriaddr:$src),
+ "lrv\t{$dst, $src}",
+ [(set GR32:$dst, (bswap (load rriaddr:$src)))]>;
+def BSWAP64rm : Pseudo<(outs GR64:$dst), (ins rriaddr:$src),
+ "lrvg\t{$dst, $src}",
+ [(set GR64:$dst, (bswap (load rriaddr:$src)))]>;
+
//===----------------------------------------------------------------------===//
// Arithmetic Instructions