summaryrefslogtreecommitdiff
path: root/test/MC/SystemZ
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/SystemZ')
-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
3 files changed, 27 insertions, 0 deletions
diff --git a/test/MC/SystemZ/insn-bad-z196.s b/test/MC/SystemZ/insn-bad-z196.s
index 0ed33702e4..24640018a5 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 3fe3f4d6a7..eadb9f0997 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 769ab02ee4..2bc27bd58a 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]