aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-10-01 14:53:46 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-10-01 14:53:46 +0000
commitad366a3f67679a56d25464dc2bcad3a0a6a51780 (patch)
tree39b7511c4c9ec60d3ce4c5738e98c350e38ce8f3 /test/MC
parentbd1958d8e99ebd5a885f848b2f688c399cfc9886 (diff)
downloadexternal_llvm-ad366a3f67679a56d25464dc2bcad3a0a6a51780.zip
external_llvm-ad366a3f67679a56d25464dc2bcad3a0a6a51780.tar.gz
external_llvm-ad366a3f67679a56d25464dc2bcad3a0a6a51780.tar.bz2
[SystemZ] Add immediate addition involving high words
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/Disassembler/SystemZ/insns.txt18
-rw-r--r--test/MC/SystemZ/insn-bad-z196.s8
-rw-r--r--test/MC/SystemZ/insn-bad.s5
-rw-r--r--test/MC/SystemZ/insn-good-z196.s14
4 files changed, 45 insertions, 0 deletions
diff --git a/test/MC/Disassembler/SystemZ/insns.txt b/test/MC/Disassembler/SystemZ/insns.txt
index 4775a5d..2f2e7fa 100644
--- a/test/MC/Disassembler/SystemZ/insns.txt
+++ b/test/MC/Disassembler/SystemZ/insns.txt
@@ -349,6 +349,24 @@
# CHECK: ahy %r15, 0
0xe3 0xf0 0x00 0x00 0x00 0x7a
+# CHECK: aih %r0, -2147483648
+0xcc 0x08 0x80 0x00 0x00 0x00
+
+# CHECK: aih %r0, -1
+0xcc 0x08 0xff 0xff 0xff 0xff
+
+# CHECK: aih %r0, 0
+0xcc 0x08 0x00 0x00 0x00 0x00
+
+# CHECK: aih %r0, 1
+0xcc 0x08 0x00 0x00 0x00 0x01
+
+# CHECK: aih %r0, 2147483647
+0xcc 0x08 0x7f 0xff 0xff 0xff
+
+# CHECK: aih %r15, 0
+0xcc 0xf8 0x00 0x00 0x00 0x00
+
# CHECK: alcgr %r0, %r0
0xb9 0x88 0x00 0x00
diff --git a/test/MC/SystemZ/insn-bad-z196.s b/test/MC/SystemZ/insn-bad-z196.s
index 0ed3370..2464001 100644
--- a/test/MC/SystemZ/insn-bad-z196.s
+++ b/test/MC/SystemZ/insn-bad-z196.s
@@ -25,6 +25,14 @@
ahik %r0, %r1, foo
#CHECK: error: invalid operand
+#CHECK: aih %r0, (-1 << 31) - 1
+#CHECK: error: invalid operand
+#CHECK: aih %r0, (1 << 31)
+
+ aih %r0, (-1 << 31) - 1
+ aih %r0, (1 << 31)
+
+#CHECK: error: invalid operand
#CHECK: fidbra %f0, 0, %f0, -1
#CHECK: error: invalid operand
#CHECK: fidbra %f0, 0, %f0, 16
diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s
index 3fe3f4d..eadb9f0 100644
--- a/test/MC/SystemZ/insn-bad.s
+++ b/test/MC/SystemZ/insn-bad.s
@@ -128,6 +128,11 @@
ahy %r0, -524289
ahy %r0, 524288
+#CHECK: error: {{(instruction requires: high-word)?}}
+#CHECK: aih %r0, 0
+
+ aih %r0, 0
+
#CHECK: error: invalid operand
#CHECK: al %r0, -1
#CHECK: error: invalid operand
diff --git a/test/MC/SystemZ/insn-good-z196.s b/test/MC/SystemZ/insn-good-z196.s
index 769ab02..2bc27bd 100644
--- a/test/MC/SystemZ/insn-good-z196.s
+++ b/test/MC/SystemZ/insn-good-z196.s
@@ -49,6 +49,20 @@
ahik %r15, %r0, 0
ahik %r7, %r8, -16
+#CHECK: aih %r0, -2147483648 # encoding: [0xcc,0x08,0x80,0x00,0x00,0x00]
+#CHECK: aih %r0, -1 # encoding: [0xcc,0x08,0xff,0xff,0xff,0xff]
+#CHECK: aih %r0, 0 # encoding: [0xcc,0x08,0x00,0x00,0x00,0x00]
+#CHECK: aih %r0, 1 # encoding: [0xcc,0x08,0x00,0x00,0x00,0x01]
+#CHECK: aih %r0, 2147483647 # encoding: [0xcc,0x08,0x7f,0xff,0xff,0xff]
+#CHECK: aih %r15, 0 # encoding: [0xcc,0xf8,0x00,0x00,0x00,0x00]
+
+ aih %r0, -1 << 31
+ aih %r0, -1
+ aih %r0, 0
+ aih %r0, 1
+ aih %r0, (1 << 31) - 1
+ aih %r15, 0
+
#CHECK: alghsik %r0, %r0, -32768 # encoding: [0xec,0x00,0x80,0x00,0x00,0xdb]
#CHECK: alghsik %r0, %r0, -1 # encoding: [0xec,0x00,0xff,0xff,0x00,0xdb]
#CHECK: alghsik %r0, %r0, 0 # encoding: [0xec,0x00,0x00,0x00,0x00,0xdb]