summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/SystemZ
diff options
context:
space:
mode:
authorBryan Chan <bryan.chan@ca.ibm.com>2016-05-16 20:32:22 +0000
committerBryan Chan <bryan.chan@ca.ibm.com>2016-05-16 20:32:22 +0000
commit28b759c4c8d306b972fcd593280dcc8562904295 (patch)
treedc467e09e1d1a888bf46b046d1605642aff981ac /llvm/test/MC/SystemZ
parent7ffd0b44091ecfdbab65051e07636362939ec541 (diff)
downloadbcm5719-llvm-28b759c4c8d306b972fcd593280dcc8562904295.tar.gz
bcm5719-llvm-28b759c4c8d306b972fcd593280dcc8562904295.zip
[SystemZ] Support LRVH and STRVH opcodes
Summary: On Linux, /usr/include/bits/byteswap-16.h defines __byteswap_16(x) as an inlined LRVH (Load Reversed Half-word) instruction. The SystemZ back-end did not support this opcode and the inlined assembly would cause a fatal error. Reviewers: bryanpkc, uweigand Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18732 llvm-svn: 269688
Diffstat (limited to 'llvm/test/MC/SystemZ')
-rw-r--r--llvm/test/MC/SystemZ/insn-good.s44
1 files changed, 44 insertions, 0 deletions
diff --git a/llvm/test/MC/SystemZ/insn-good.s b/llvm/test/MC/SystemZ/insn-good.s
index 8bb99eda781..344ee138789 100644
--- a/llvm/test/MC/SystemZ/insn-good.s
+++ b/llvm/test/MC/SystemZ/insn-good.s
@@ -6539,6 +6539,28 @@
lrl %r7,frob@PLT
lrl %r8,frob@PLT
+#CHECK: lrvh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x1f]
+#CHECK: lrvh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x1f]
+#CHECK: lrvh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x1f]
+#CHECK: lrvh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x1f]
+#CHECK: lrvh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x1f]
+#CHECK: lrvh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x1f]
+#CHECK: lrvh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x1f]
+#CHECK: lrvh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x1f]
+#CHECK: lrvh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x1f]
+#CHECK: lrvh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x1f]
+
+ lrvh %r0,-524288
+ lrvh %r0,-1
+ lrvh %r0,0
+ lrvh %r0,1
+ lrvh %r0,524287
+ lrvh %r0,0(%r1)
+ lrvh %r0,0(%r15)
+ lrvh %r0,524287(%r1,%r15)
+ lrvh %r0,524287(%r15,%r1)
+ lrvh %r15,0
+
#CHECK: lrv %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x1e]
#CHECK: lrv %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x1e]
#CHECK: lrv %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x1e]
@@ -8965,6 +8987,28 @@
strl %r7,frob@PLT
strl %r8,frob@PLT
+#CHECK: strvh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x3f]
+#CHECK: strvh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x3f]
+#CHECK: strvh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x3f]
+#CHECK: strvh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x3f]
+#CHECK: strvh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x3f]
+#CHECK: strvh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x3f]
+#CHECK: strvh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x3f]
+#CHECK: strvh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x3f]
+#CHECK: strvh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x3f]
+#CHECK: strvh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x3f]
+
+ strvh %r0,-524288
+ strvh %r0,-1
+ strvh %r0,0
+ strvh %r0,1
+ strvh %r0,524287
+ strvh %r0,0(%r1)
+ strvh %r0,0(%r15)
+ strvh %r0,524287(%r1,%r15)
+ strvh %r0,524287(%r15,%r1)
+ strvh %r15,0
+
#CHECK: strv %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x3e]
#CHECK: strv %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x3e]
#CHECK: strv %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x3e]
OpenPOWER on IntegriCloud