summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-16 11:28:08 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-16 11:28:08 +0000
commitc25d21e05b76e9c542e3bea6a9a12a77772beb14 (patch)
tree924eabbe7b157937c0cec44024284613a43820d2
parent376452165863fad987c890d9773e6eb87742a3e1 (diff)
downloadllvm-c25d21e05b76e9c542e3bea6a9a12a77772beb14.tar.gz
llvm-c25d21e05b76e9c542e3bea6a9a12a77772beb14.tar.bz2
llvm-c25d21e05b76e9c542e3bea6a9a12a77772beb14.tar.xz
[SystemZ] Add MC support for R[NOX]SBG
CodeGen support will come later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186401 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SystemZ/SystemZInstrInfo.td8
-rw-r--r--test/MC/Disassembler/SystemZ/insns.txt63
-rw-r--r--test/MC/SystemZ/insn-bad.s60
-rw-r--r--test/MC/SystemZ/insn-good.s48
4 files changed, 179 insertions, 0 deletions
diff --git a/lib/Target/SystemZ/SystemZInstrInfo.td b/lib/Target/SystemZ/SystemZInstrInfo.td
index c47e04b3cf..c6839e8581 100644
--- a/lib/Target/SystemZ/SystemZInstrInfo.td
+++ b/lib/Target/SystemZ/SystemZInstrInfo.td
@@ -827,6 +827,14 @@ let Defs = [CC] in {
def RISBG : RotateSelectRIEf<"risbg", 0xEC55, GR64, GR64>;
}
+// Rotate second operand left and perform a logical operation with selected
+// bits of the first operand.
+let Defs = [CC] in {
+ def RNSBG : RotateSelectRIEf<"rnsbg", 0xEC54, GR64, GR64>;
+ def ROSBG : RotateSelectRIEf<"rosbg", 0xEC56, GR64, GR64>;
+ def RXSBG : RotateSelectRIEf<"rxsbg", 0xEC57, GR64, GR64>;
+}
+
//===----------------------------------------------------------------------===//
// Comparison
//===----------------------------------------------------------------------===//
diff --git a/test/MC/Disassembler/SystemZ/insns.txt b/test/MC/Disassembler/SystemZ/insns.txt
index 664ae807c6..101a1683aa 100644
--- a/test/MC/Disassembler/SystemZ/insns.txt
+++ b/test/MC/Disassembler/SystemZ/insns.txt
@@ -4657,6 +4657,69 @@
# CHECK: risbg %r4, %r5, 6, 7, 8
0xec 0x45 0x06 0x07 0x08 0x55
+# CHECK: rnsbg %r0, %r0, 0, 0, 0
+0xec 0x00 0x00 0x00 0x00 0x54
+
+# CHECK: rnsbg %r0, %r0, 0, 0, 63
+0xec 0x00 0x00 0x00 0x3f 0x54
+
+# CHECK: rnsbg %r0, %r0, 0, 255, 0
+0xec 0x00 0x00 0xff 0x00 0x54
+
+# CHECK: rnsbg %r0, %r0, 255, 0, 0
+0xec 0x00 0xff 0x00 0x00 0x54
+
+# CHECK: rnsbg %r0, %r15, 0, 0, 0
+0xec 0x0f 0x00 0x00 0x00 0x54
+
+# CHECK: rnsbg %r15, %r0, 0, 0, 0
+0xec 0xf0 0x00 0x00 0x00 0x54
+
+# CHECK: rnsbg %r4, %r5, 6, 7, 8
+0xec 0x45 0x06 0x07 0x08 0x54
+
+# CHECK: rosbg %r0, %r0, 0, 0, 0
+0xec 0x00 0x00 0x00 0x00 0x56
+
+# CHECK: rosbg %r0, %r0, 0, 0, 63
+0xec 0x00 0x00 0x00 0x3f 0x56
+
+# CHECK: rosbg %r0, %r0, 0, 255, 0
+0xec 0x00 0x00 0xff 0x00 0x56
+
+# CHECK: rosbg %r0, %r0, 255, 0, 0
+0xec 0x00 0xff 0x00 0x00 0x56
+
+# CHECK: rosbg %r0, %r15, 0, 0, 0
+0xec 0x0f 0x00 0x00 0x00 0x56
+
+# CHECK: rosbg %r15, %r0, 0, 0, 0
+0xec 0xf0 0x00 0x00 0x00 0x56
+
+# CHECK: rosbg %r4, %r5, 6, 7, 8
+0xec 0x45 0x06 0x07 0x08 0x56
+
+# CHECK: rxsbg %r0, %r0, 0, 0, 0
+0xec 0x00 0x00 0x00 0x00 0x57
+
+# CHECK: rxsbg %r0, %r0, 0, 0, 63
+0xec 0x00 0x00 0x00 0x3f 0x57
+
+# CHECK: rxsbg %r0, %r0, 0, 255, 0
+0xec 0x00 0x00 0xff 0x00 0x57
+
+# CHECK: rxsbg %r0, %r0, 255, 0, 0
+0xec 0x00 0xff 0x00 0x00 0x57
+
+# CHECK: rxsbg %r0, %r15, 0, 0, 0
+0xec 0x0f 0x00 0x00 0x00 0x57
+
+# CHECK: rxsbg %r15, %r0, 0, 0, 0
+0xec 0xf0 0x00 0x00 0x00 0x57
+
+# CHECK: rxsbg %r4, %r5, 6, 7, 8
+0xec 0x45 0x06 0x07 0x08 0x57
+
# CHECK: rllg %r0, %r0, 0
0xeb 0x00 0x00 0x00 0x00 0x1c
diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s
index ea9a7edc01..60dc64f6da 100644
--- a/test/MC/SystemZ/insn-bad.s
+++ b/test/MC/SystemZ/insn-bad.s
@@ -2116,6 +2116,66 @@
risbg %r0,%r0,256,0,0
#CHECK: error: invalid operand
+#CHECK: rnsbg %r0,%r0,0,0,-1
+#CHECK: error: invalid operand
+#CHECK: rnsbg %r0,%r0,0,0,64
+#CHECK: error: invalid operand
+#CHECK: rnsbg %r0,%r0,0,-1,0
+#CHECK: error: invalid operand
+#CHECK: rnsbg %r0,%r0,0,256,0
+#CHECK: error: invalid operand
+#CHECK: rnsbg %r0,%r0,-1,0,0
+#CHECK: error: invalid operand
+#CHECK: rnsbg %r0,%r0,256,0,0
+
+ rnsbg %r0,%r0,0,0,-1
+ rnsbg %r0,%r0,0,0,64
+ rnsbg %r0,%r0,0,-1,0
+ rnsbg %r0,%r0,0,256,0
+ rnsbg %r0,%r0,-1,0,0
+ rnsbg %r0,%r0,256,0,0
+
+#CHECK: error: invalid operand
+#CHECK: rosbg %r0,%r0,0,0,-1
+#CHECK: error: invalid operand
+#CHECK: rosbg %r0,%r0,0,0,64
+#CHECK: error: invalid operand
+#CHECK: rosbg %r0,%r0,0,-1,0
+#CHECK: error: invalid operand
+#CHECK: rosbg %r0,%r0,0,256,0
+#CHECK: error: invalid operand
+#CHECK: rosbg %r0,%r0,-1,0,0
+#CHECK: error: invalid operand
+#CHECK: rosbg %r0,%r0,256,0,0
+
+ rosbg %r0,%r0,0,0,-1
+ rosbg %r0,%r0,0,0,64
+ rosbg %r0,%r0,0,-1,0
+ rosbg %r0,%r0,0,256,0
+ rosbg %r0,%r0,-1,0,0
+ rosbg %r0,%r0,256,0,0
+
+#CHECK: error: invalid operand
+#CHECK: rxsbg %r0,%r0,0,0,-1
+#CHECK: error: invalid operand
+#CHECK: rxsbg %r0,%r0,0,0,64
+#CHECK: error: invalid operand
+#CHECK: rxsbg %r0,%r0,0,-1,0
+#CHECK: error: invalid operand
+#CHECK: rxsbg %r0,%r0,0,256,0
+#CHECK: error: invalid operand
+#CHECK: rxsbg %r0,%r0,-1,0,0
+#CHECK: error: invalid operand
+#CHECK: rxsbg %r0,%r0,256,0,0
+
+ rxsbg %r0,%r0,0,0,-1
+ rxsbg %r0,%r0,0,0,64
+ rxsbg %r0,%r0,0,-1,0
+ rxsbg %r0,%r0,0,256,0
+ rxsbg %r0,%r0,-1,0,0
+ rxsbg %r0,%r0,256,0,0
+
+#CHECK: error: invalid operand
#CHECK: rll %r0,%r0,-524289
#CHECK: error: invalid operand
#CHECK: rll %r0,%r0,524288
diff --git a/test/MC/SystemZ/insn-good.s b/test/MC/SystemZ/insn-good.s
index 3adfa981cb..e9ab1ef8e3 100644
--- a/test/MC/SystemZ/insn-good.s
+++ b/test/MC/SystemZ/insn-good.s
@@ -5849,6 +5849,54 @@
risbg %r15,%r0,0,0,0
risbg %r4,%r5,6,7,8
+#CHECK: rnsbg %r0, %r0, 0, 0, 0 # encoding: [0xec,0x00,0x00,0x00,0x00,0x54]
+#CHECK: rnsbg %r0, %r0, 0, 0, 63 # encoding: [0xec,0x00,0x00,0x00,0x3f,0x54]
+#CHECK: rnsbg %r0, %r0, 0, 255, 0 # encoding: [0xec,0x00,0x00,0xff,0x00,0x54]
+#CHECK: rnsbg %r0, %r0, 255, 0, 0 # encoding: [0xec,0x00,0xff,0x00,0x00,0x54]
+#CHECK: rnsbg %r0, %r15, 0, 0, 0 # encoding: [0xec,0x0f,0x00,0x00,0x00,0x54]
+#CHECK: rnsbg %r15, %r0, 0, 0, 0 # encoding: [0xec,0xf0,0x00,0x00,0x00,0x54]
+#CHECK: rnsbg %r4, %r5, 6, 7, 8 # encoding: [0xec,0x45,0x06,0x07,0x08,0x54]
+
+ rnsbg %r0,%r0,0,0,0
+ rnsbg %r0,%r0,0,0,63
+ rnsbg %r0,%r0,0,255,0
+ rnsbg %r0,%r0,255,0,0
+ rnsbg %r0,%r15,0,0,0
+ rnsbg %r15,%r0,0,0,0
+ rnsbg %r4,%r5,6,7,8
+
+#CHECK: rosbg %r0, %r0, 0, 0, 0 # encoding: [0xec,0x00,0x00,0x00,0x00,0x56]
+#CHECK: rosbg %r0, %r0, 0, 0, 63 # encoding: [0xec,0x00,0x00,0x00,0x3f,0x56]
+#CHECK: rosbg %r0, %r0, 0, 255, 0 # encoding: [0xec,0x00,0x00,0xff,0x00,0x56]
+#CHECK: rosbg %r0, %r0, 255, 0, 0 # encoding: [0xec,0x00,0xff,0x00,0x00,0x56]
+#CHECK: rosbg %r0, %r15, 0, 0, 0 # encoding: [0xec,0x0f,0x00,0x00,0x00,0x56]
+#CHECK: rosbg %r15, %r0, 0, 0, 0 # encoding: [0xec,0xf0,0x00,0x00,0x00,0x56]
+#CHECK: rosbg %r4, %r5, 6, 7, 8 # encoding: [0xec,0x45,0x06,0x07,0x08,0x56]
+
+ rosbg %r0,%r0,0,0,0
+ rosbg %r0,%r0,0,0,63
+ rosbg %r0,%r0,0,255,0
+ rosbg %r0,%r0,255,0,0
+ rosbg %r0,%r15,0,0,0
+ rosbg %r15,%r0,0,0,0
+ rosbg %r4,%r5,6,7,8
+
+#CHECK: rxsbg %r0, %r0, 0, 0, 0 # encoding: [0xec,0x00,0x00,0x00,0x00,0x57]
+#CHECK: rxsbg %r0, %r0, 0, 0, 63 # encoding: [0xec,0x00,0x00,0x00,0x3f,0x57]
+#CHECK: rxsbg %r0, %r0, 0, 255, 0 # encoding: [0xec,0x00,0x00,0xff,0x00,0x57]
+#CHECK: rxsbg %r0, %r0, 255, 0, 0 # encoding: [0xec,0x00,0xff,0x00,0x00,0x57]
+#CHECK: rxsbg %r0, %r15, 0, 0, 0 # encoding: [0xec,0x0f,0x00,0x00,0x00,0x57]
+#CHECK: rxsbg %r15, %r0, 0, 0, 0 # encoding: [0xec,0xf0,0x00,0x00,0x00,0x57]
+#CHECK: rxsbg %r4, %r5, 6, 7, 8 # encoding: [0xec,0x45,0x06,0x07,0x08,0x57]
+
+ rxsbg %r0,%r0,0,0,0
+ rxsbg %r0,%r0,0,0,63
+ rxsbg %r0,%r0,0,255,0
+ rxsbg %r0,%r0,255,0,0
+ rxsbg %r0,%r15,0,0,0
+ rxsbg %r15,%r0,0,0,0
+ rxsbg %r4,%r5,6,7,8
+
#CHECK: rll %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x1d]
#CHECK: rll %r15, %r1, 0 # encoding: [0xeb,0xf1,0x00,0x00,0x00,0x1d]
#CHECK: rll %r1, %r15, 0 # encoding: [0xeb,0x1f,0x00,0x00,0x00,0x1d]