summaryrefslogtreecommitdiff
path: root/test/MC/SystemZ
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-25 09:04:52 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-25 09:04:52 +0000
commitcf20e45cc4cb77bcb16363531e600883cd27ff80 (patch)
treecebffed322b6409d23f5b236e86b1faab811143a /test/MC/SystemZ
parentb284e1bf08d24deb20b7deab71fce6f3034cc89a (diff)
[SystemZ] Add LOC and LOCG
As with the stores, these instructions can trap when the condition is false, so they are only used for things like (cond ? x : *ptr). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/SystemZ')
-rw-r--r--test/MC/SystemZ/insn-bad-z196.s34
-rw-r--r--test/MC/SystemZ/insn-good-z196.s96
2 files changed, 130 insertions, 0 deletions
diff --git a/test/MC/SystemZ/insn-bad-z196.s b/test/MC/SystemZ/insn-bad-z196.s
index f62ea74fa09..5243eb57cd7 100644
--- a/test/MC/SystemZ/insn-bad-z196.s
+++ b/test/MC/SystemZ/insn-bad-z196.s
@@ -25,6 +25,40 @@
ahik %r0, %r1, foo
#CHECK: error: invalid operand
+#CHECK: loc %r0,0,-1
+#CHECK: error: invalid operand
+#CHECK: loc %r0,0,16
+#CHECK: error: invalid operand
+#CHECK: loc %r0,-524289,1
+#CHECK: error: invalid operand
+#CHECK: loc %r0,524288,1
+#CHECK: error: invalid use of indexed addressing
+#CHECK: loc %r0,0(%r1,%r2),1
+
+ loc %r0,0,-1
+ loc %r0,0,16
+ loc %r0,-524289,1
+ loc %r0,524288,1
+ loc %r0,0(%r1,%r2),1
+
+#CHECK: error: invalid operand
+#CHECK: locg %r0,0,-1
+#CHECK: error: invalid operand
+#CHECK: locg %r0,0,16
+#CHECK: error: invalid operand
+#CHECK: locg %r0,-524289,1
+#CHECK: error: invalid operand
+#CHECK: locg %r0,524288,1
+#CHECK: error: invalid use of indexed addressing
+#CHECK: locg %r0,0(%r1,%r2),1
+
+ locg %r0,0,-1
+ locg %r0,0,16
+ locg %r0,-524289,1
+ locg %r0,524288,1
+ locg %r0,0(%r1,%r2),1
+
+#CHECK: error: invalid operand
#CHECK: sllk %r0,%r0,-524289
#CHECK: error: invalid operand
#CHECK: sllk %r0,%r0,524288
diff --git a/test/MC/SystemZ/insn-good-z196.s b/test/MC/SystemZ/insn-good-z196.s
index 5b0ed59cb15..5b452b50810 100644
--- a/test/MC/SystemZ/insn-good-z196.s
+++ b/test/MC/SystemZ/insn-good-z196.s
@@ -121,6 +121,102 @@
ark %r15,%r0,%r0
ark %r7,%r8,%r9
+#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]
+#CHECK: loc %r0, 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0xf2]
+#CHECK: loc %r0, 0(%r1), 0 # encoding: [0xeb,0x00,0x10,0x00,0x00,0xf2]
+#CHECK: loc %r0, 0(%r15), 0 # encoding: [0xeb,0x00,0xf0,0x00,0x00,0xf2]
+#CHECK: loc %r15, 0, 0 # encoding: [0xeb,0xf0,0x00,0x00,0x00,0xf2]
+#CHECK: loc %r1, 4095(%r2), 3 # encoding: [0xeb,0x13,0x2f,0xff,0x00,0xf2]
+
+ loc %r0,0,0
+ loc %r0,0,15
+ loc %r0,-524288,0
+ loc %r0,524287,0
+ loc %r0,0(%r1),0
+ loc %r0,0(%r15),0
+ loc %r15,0,0
+ loc %r1,4095(%r2),3
+
+#CHECK: loco %r1, 2(%r3) # encoding: [0xeb,0x11,0x30,0x02,0x00,0xf2]
+#CHECK: loch %r1, 2(%r3) # encoding: [0xeb,0x12,0x30,0x02,0x00,0xf2]
+#CHECK: locnle %r1, 2(%r3) # encoding: [0xeb,0x13,0x30,0x02,0x00,0xf2]
+#CHECK: locl %r1, 2(%r3) # encoding: [0xeb,0x14,0x30,0x02,0x00,0xf2]
+#CHECK: locnhe %r1, 2(%r3) # encoding: [0xeb,0x15,0x30,0x02,0x00,0xf2]
+#CHECK: loclh %r1, 2(%r3) # encoding: [0xeb,0x16,0x30,0x02,0x00,0xf2]
+#CHECK: locne %r1, 2(%r3) # encoding: [0xeb,0x17,0x30,0x02,0x00,0xf2]
+#CHECK: loce %r1, 2(%r3) # encoding: [0xeb,0x18,0x30,0x02,0x00,0xf2]
+#CHECK: locnlh %r1, 2(%r3) # encoding: [0xeb,0x19,0x30,0x02,0x00,0xf2]
+#CHECK: loche %r1, 2(%r3) # encoding: [0xeb,0x1a,0x30,0x02,0x00,0xf2]
+#CHECK: locnl %r1, 2(%r3) # encoding: [0xeb,0x1b,0x30,0x02,0x00,0xf2]
+#CHECK: locle %r1, 2(%r3) # encoding: [0xeb,0x1c,0x30,0x02,0x00,0xf2]
+#CHECK: locnh %r1, 2(%r3) # encoding: [0xeb,0x1d,0x30,0x02,0x00,0xf2]
+#CHECK: locno %r1, 2(%r3) # encoding: [0xeb,0x1e,0x30,0x02,0x00,0xf2]
+
+ loco %r1,2(%r3)
+ loch %r1,2(%r3)
+ locnle %r1,2(%r3)
+ locl %r1,2(%r3)
+ locnhe %r1,2(%r3)
+ loclh %r1,2(%r3)
+ locne %r1,2(%r3)
+ loce %r1,2(%r3)
+ locnlh %r1,2(%r3)
+ loche %r1,2(%r3)
+ locnl %r1,2(%r3)
+ locle %r1,2(%r3)
+ locnh %r1,2(%r3)
+ locno %r1,2(%r3)
+
+#CHECK: locg %r0, 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0xe2]
+#CHECK: locg %r0, 0, 15 # encoding: [0xeb,0x0f,0x00,0x00,0x00,0xe2]
+#CHECK: locg %r0, -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0xe2]
+#CHECK: locg %r0, 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0xe2]
+#CHECK: locg %r0, 0(%r1), 0 # encoding: [0xeb,0x00,0x10,0x00,0x00,0xe2]
+#CHECK: locg %r0, 0(%r15), 0 # encoding: [0xeb,0x00,0xf0,0x00,0x00,0xe2]
+#CHECK: locg %r15, 0, 0 # encoding: [0xeb,0xf0,0x00,0x00,0x00,0xe2]
+#CHECK: locg %r1, 4095(%r2), 3 # encoding: [0xeb,0x13,0x2f,0xff,0x00,0xe2]
+
+ locg %r0,0,0
+ locg %r0,0,15
+ locg %r0,-524288,0
+ locg %r0,524287,0
+ locg %r0,0(%r1),0
+ locg %r0,0(%r15),0
+ locg %r15,0,0
+ locg %r1,4095(%r2),3
+
+#CHECK: locgo %r1, 2(%r3) # encoding: [0xeb,0x11,0x30,0x02,0x00,0xe2]
+#CHECK: locgh %r1, 2(%r3) # encoding: [0xeb,0x12,0x30,0x02,0x00,0xe2]
+#CHECK: locgnle %r1, 2(%r3) # encoding: [0xeb,0x13,0x30,0x02,0x00,0xe2]
+#CHECK: locgl %r1, 2(%r3) # encoding: [0xeb,0x14,0x30,0x02,0x00,0xe2]
+#CHECK: locgnhe %r1, 2(%r3) # encoding: [0xeb,0x15,0x30,0x02,0x00,0xe2]
+#CHECK: locglh %r1, 2(%r3) # encoding: [0xeb,0x16,0x30,0x02,0x00,0xe2]
+#CHECK: locgne %r1, 2(%r3) # encoding: [0xeb,0x17,0x30,0x02,0x00,0xe2]
+#CHECK: locge %r1, 2(%r3) # encoding: [0xeb,0x18,0x30,0x02,0x00,0xe2]
+#CHECK: locgnlh %r1, 2(%r3) # encoding: [0xeb,0x19,0x30,0x02,0x00,0xe2]
+#CHECK: locghe %r1, 2(%r3) # encoding: [0xeb,0x1a,0x30,0x02,0x00,0xe2]
+#CHECK: locgnl %r1, 2(%r3) # encoding: [0xeb,0x1b,0x30,0x02,0x00,0xe2]
+#CHECK: locgle %r1, 2(%r3) # encoding: [0xeb,0x1c,0x30,0x02,0x00,0xe2]
+#CHECK: locgnh %r1, 2(%r3) # encoding: [0xeb,0x1d,0x30,0x02,0x00,0xe2]
+#CHECK: locgno %r1, 2(%r3) # encoding: [0xeb,0x1e,0x30,0x02,0x00,0xe2]
+
+ locgo %r1,2(%r3)
+ locgh %r1,2(%r3)
+ locgnle %r1,2(%r3)
+ locgl %r1,2(%r3)
+ locgnhe %r1,2(%r3)
+ locglh %r1,2(%r3)
+ locgne %r1,2(%r3)
+ locge %r1,2(%r3)
+ locgnlh %r1,2(%r3)
+ locghe %r1,2(%r3)
+ locgnl %r1,2(%r3)
+ locgle %r1,2(%r3)
+ locgnh %r1,2(%r3)
+ locgno %r1,2(%r3)
+
#CHECK: ngrk %r0, %r0, %r0 # encoding: [0xb9,0xe4,0x00,0x00]
#CHECK: ngrk %r0, %r0, %r15 # encoding: [0xb9,0xe4,0xf0,0x00]
#CHECK: ngrk %r0, %r15, %r0 # encoding: [0xb9,0xe4,0x00,0x0f]