aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/SystemZ
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-10-01 12:11:47 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-10-01 12:11:47 +0000
commitced450f0e6266eb8c2624fc1895cbc2749d715c3 (patch)
tree1f12f564ed9f888409bda19564d7cf132a894f9c /test/MC/SystemZ
parent55d7d83b6c9e55fa73d667660c8e90f92999385b (diff)
downloadexternal_llvm-ced450f0e6266eb8c2624fc1895cbc2749d715c3.zip
external_llvm-ced450f0e6266eb8c2624fc1895cbc2749d715c3.tar.gz
external_llvm-ced450f0e6266eb8c2624fc1895cbc2749d715c3.tar.bz2
[SystemZ] Add sign-extending high-word loads (LBH and LHH)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/SystemZ')
-rw-r--r--test/MC/SystemZ/insn-bad-z196.s16
-rw-r--r--test/MC/SystemZ/insn-bad.s10
-rw-r--r--test/MC/SystemZ/insn-good-z196.s44
3 files changed, 70 insertions, 0 deletions
diff --git a/test/MC/SystemZ/insn-bad-z196.s b/test/MC/SystemZ/insn-bad-z196.s
index cc795d4..6214b8e 100644
--- a/test/MC/SystemZ/insn-bad-z196.s
+++ b/test/MC/SystemZ/insn-bad-z196.s
@@ -73,6 +73,14 @@
fixbra %f2, 0, %f0, 0
#CHECK: error: invalid operand
+#CHECK: lbh %r0, -524289
+#CHECK: error: invalid operand
+#CHECK: lbh %r0, 524288
+
+ lbh %r0, -524289
+ lbh %r0, 524288
+
+#CHECK: error: invalid operand
#CHECK: lfh %r0, -524289
#CHECK: error: invalid operand
#CHECK: lfh %r0, 524288
@@ -81,6 +89,14 @@
lfh %r0, 524288
#CHECK: error: invalid operand
+#CHECK: lhh %r0, -524289
+#CHECK: error: invalid operand
+#CHECK: lhh %r0, 524288
+
+ lhh %r0, -524289
+ lhh %r0, 524288
+
+#CHECK: error: invalid operand
#CHECK: loc %r0,0,-1
#CHECK: error: invalid operand
#CHECK: loc %r0,0,16
diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s
index 2420e40..8bfb134 100644
--- a/test/MC/SystemZ/insn-bad.s
+++ b/test/MC/SystemZ/insn-bad.s
@@ -1390,6 +1390,11 @@
lb %r0, -524289
lb %r0, 524288
+#CHECK: error: {{(instruction requires: high-word)?}}
+#CHECK: lbh %r0, 0
+
+ lbh %r0, 0
+
#CHECK: error: invalid register pair
#CHECK: lcxbr %f0, %f2
#CHECK: error: invalid register pair
@@ -1560,6 +1565,11 @@
lh %r0, -1
lh %r0, 4096
+#CHECK: error: {{(instruction requires: high-word)?}}
+#CHECK: lhh %r0, 0
+
+ lhh %r0, 0
+
#CHECK: error: invalid operand
#CHECK: lhi %r0, -32769
#CHECK: error: invalid operand
diff --git a/test/MC/SystemZ/insn-good-z196.s b/test/MC/SystemZ/insn-good-z196.s
index 66ce63a..fa4471e 100644
--- a/test/MC/SystemZ/insn-good-z196.s
+++ b/test/MC/SystemZ/insn-good-z196.s
@@ -163,6 +163,28 @@
fixbra %f4, 5, %f8, 9
fixbra %f13, 0, %f0, 0
+#CHECK: lbh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xc0]
+#CHECK: lbh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xc0]
+#CHECK: lbh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xc0]
+#CHECK: lbh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0xc0]
+#CHECK: lbh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0xc0]
+#CHECK: lbh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0xc0]
+#CHECK: lbh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0xc0]
+#CHECK: lbh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0xc0]
+#CHECK: lbh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0xc0]
+#CHECK: lbh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0xc0]
+
+ lbh %r0, -524288
+ lbh %r0, -1
+ lbh %r0, 0
+ lbh %r0, 1
+ lbh %r0, 524287
+ lbh %r0, 0(%r1)
+ lbh %r0, 0(%r15)
+ lbh %r0, 524287(%r1,%r15)
+ lbh %r0, 524287(%r15,%r1)
+ lbh %r15, 0
+
#CHECK: lfh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xca]
#CHECK: lfh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xca]
#CHECK: lfh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xca]
@@ -185,6 +207,28 @@
lfh %r0, 524287(%r15,%r1)
lfh %r15, 0
+#CHECK: lhh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xc4]
+#CHECK: lhh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xc4]
+#CHECK: lhh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xc4]
+#CHECK: lhh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0xc4]
+#CHECK: lhh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0xc4]
+#CHECK: lhh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0xc4]
+#CHECK: lhh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0xc4]
+#CHECK: lhh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0xc4]
+#CHECK: lhh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0xc4]
+#CHECK: lhh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0xc4]
+
+ lhh %r0, -524288
+ lhh %r0, -1
+ lhh %r0, 0
+ lhh %r0, 1
+ lhh %r0, 524287
+ lhh %r0, 0(%r1)
+ lhh %r0, 0(%r15)
+ lhh %r0, 524287(%r1,%r15)
+ lhh %r0, 524287(%r15,%r1)
+ lhh %r15, 0
+
#CHECK: loc %r0, 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0xf2]
#CHECK: loc %r0, 0, 15 # encoding: [0xeb,0x0f,0x00,0x00,0x00,0xf2]
#CHECK: loc %r0, -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0xf2]