[llvm] r186401 - [SystemZ] Add MC support for R[NOX]SBG
Richard Sandiford
rsandifo at linux.vnet.ibm.com
Tue Jul 16 04:28:08 PDT 2013
Author: rsandifo
Date: Tue Jul 16 06:28:08 2013
New Revision: 186401
URL: http://llvm.org/viewvc/llvm-project?rev=186401&view=rev
Log:
[SystemZ] Add MC support for R[NOX]SBG
CodeGen support will come later.
Modified:
llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td
llvm/trunk/test/MC/Disassembler/SystemZ/insns.txt
llvm/trunk/test/MC/SystemZ/insn-bad.s
llvm/trunk/test/MC/SystemZ/insn-good.s
Modified: llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td?rev=186401&r1=186400&r2=186401&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td Tue Jul 16 06:28:08 2013
@@ -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
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/test/MC/Disassembler/SystemZ/insns.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/SystemZ/insns.txt?rev=186401&r1=186400&r2=186401&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/SystemZ/insns.txt (original)
+++ llvm/trunk/test/MC/Disassembler/SystemZ/insns.txt Tue Jul 16 06:28:08 2013
@@ -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
Modified: llvm/trunk/test/MC/SystemZ/insn-bad.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/SystemZ/insn-bad.s?rev=186401&r1=186400&r2=186401&view=diff
==============================================================================
--- llvm/trunk/test/MC/SystemZ/insn-bad.s (original)
+++ llvm/trunk/test/MC/SystemZ/insn-bad.s Tue Jul 16 06:28:08 2013
@@ -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
Modified: llvm/trunk/test/MC/SystemZ/insn-good.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/SystemZ/insn-good.s?rev=186401&r1=186400&r2=186401&view=diff
==============================================================================
--- llvm/trunk/test/MC/SystemZ/insn-good.s (original)
+++ llvm/trunk/test/MC/SystemZ/insn-good.s Tue Jul 16 06:28:08 2013
@@ -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]
More information about the llvm-commits
mailing list