}
break;
}
- case PPC::CP_COPYx:
- case PPC::CP_COPY_FIRST: {
- MCInst TmpInst;
- TmpInst.setOpcode(PPC::CP_COPY);
- TmpInst.addOperand(Inst.getOperand(0));
- TmpInst.addOperand(Inst.getOperand(1));
- TmpInst.addOperand(MCOperand::createImm(Opcode == PPC::CP_COPYx ? 0 : 1));
-
- Inst = TmpInst;
- break;
- }
- case PPC::CP_PASTEx :
- case PPC::CP_PASTE_LAST: {
- MCInst TmpInst;
- TmpInst.setOpcode(Opcode == PPC::CP_PASTEx ? PPC::CP_PASTE
- : PPC::CP_PASTE_rec);
- TmpInst.addOperand(Inst.getOperand(0));
- TmpInst.addOperand(Inst.getOperand(1));
- TmpInst.addOperand(MCOperand::createImm(Opcode == PPC::CP_PASTEx ? 0 : 1));
-
- Inst = TmpInst;
- break;
- }
}
}
(instregex "DCBZ(L)?(EP)?$"),
(instregex "DCBTST(EP)?$"),
(instregex "CP_COPY(8)?$"),
- (instregex "CP_PASTE(8)?$"),
(instregex "ICBI(EP)?$"),
(instregex "ICBT(LS)?$"),
(instregex "LBARX(L)?$"),
def : Pat<(int_ppc_darn), (DARN 1)>;
def : Pat<(int_ppc_darnraw), (DARN 2)>;
+class X_RA5_RB5<bits<6> opcode, bits<10> xo, string opc, RegisterOperand ty,
+ InstrItinClass itin, list<dag> pattern>
+ : X_L1_RS5_RS5<opcode, xo, (outs), (ins ty:$rA, ty:$rB, u1imm:$L),
+ !strconcat(opc, " $rA, $rB"), itin, pattern>{
+ let L = 1;
+}
+
class X_L1_RA5_RB5<bits<6> opcode, bits<10> xo, string opc, RegisterOperand ty,
InstrItinClass itin, list<dag> pattern>
: X_L1_RS5_RS5<opcode, xo, (outs), (ins ty:$rA, ty:$rB, u1imm:$L),
!strconcat(opc, " $rA, $rB, $L"), itin, pattern>;
let Interpretation64Bit = 1, isCodeGenOnly = 1 in {
-def CP_COPY8 : X_L1_RA5_RB5<31, 774, "copy" , g8rc, IIC_LdStCOPY, []>;
-def CP_PASTE8 : X_L1_RA5_RB5<31, 902, "paste" , g8rc, IIC_LdStPASTE, []>;
+def CP_COPY8 : X_RA5_RB5<31, 774, "copy" , g8rc, IIC_LdStCOPY, []>;
def CP_PASTE8_rec : X_L1_RA5_RB5<31, 902, "paste.", g8rc, IIC_LdStPASTE, []>,isRecordForm;
}
// We prefix 'CP' to COPY due to name conflict in Target.td. We also prefix to
// PASTE for naming consistency.
let mayLoad = 1 in
-def CP_COPY : X_L1_RA5_RB5<31, 774, "copy" , gprc, IIC_LdStCOPY, []>;
-
-let mayStore = 1 in
-def CP_PASTE : X_L1_RA5_RB5<31, 902, "paste" , gprc, IIC_LdStPASTE, []>;
+def CP_COPY : X_RA5_RB5<31, 774, "copy" , gprc, IIC_LdStCOPY, []>;
let mayStore = 1, Defs = [CR0] in
def CP_PASTE_rec : X_L1_RA5_RB5<31, 902, "paste.", gprc, IIC_LdStPASTE, []>, isRecordForm;
-def CP_COPYx : PPCAsmPseudo<"copy $rA, $rB" , (ins gprc:$rA, gprc:$rB)>;
-def CP_PASTEx : PPCAsmPseudo<"paste $rA, $rB", (ins gprc:$rA, gprc:$rB)>;
-def CP_COPY_FIRST : PPCAsmPseudo<"copy_first $rA, $rB",
- (ins gprc:$rA, gprc:$rB)>;
-def CP_PASTE_LAST : PPCAsmPseudo<"paste_last $rA, $rB",
- (ins gprc:$rA, gprc:$rB)>;
-def CP_ABORT : XForm_0<31, 838, (outs), (ins), "cp_abort", IIC_SprABORT, []>;
+def : InstAlias<"paste. $RA, $RB", (CP_PASTE_rec gprc:$RA, gprc:$RB, 1)>;
+def CP_ABORT : XForm_0<31, 838, (outs), (ins), "cpabort", IIC_SprABORT, []>;
// Message Synchronize
def MSGSYNC : XForm_0<31, 886, (outs), (ins), "msgsync", IIC_SprMSGSYNC, []>;
# CHECK: mfsrin 10, 12
0x7d 0x40 0x65 0x26
-# CHECK: copy 2, 19, 1
+# CHECK: copy 2, 19
0x7c 0x22 0x9e 0x0c
-# CHECK: paste 17, 1, 1
-0x7c 0x31 0x0f 0x0c
+# CHECK: paste. 17, 1, 0
+0x7c 0x11 0x0f 0x0d
-# CHECK: cp_abort
+# CHECK: paste. 17, 1
+0x7c 0x31 0x0f 0x0d
+
+# CHECK: cpabort
0x7c 0x00 0x06 0x8c
# CHECK: msgsync
attn
# Copy-Paste Facility (Extended Mnemonics):
-# CHECK-BE: copy 2, 19, 0 # encoding: [0x7c,0x02,0x9e,0x0c]
-# CHECK-LE: copy 2, 19, 0 # encoding: [0x0c,0x9e,0x02,0x7c]
+# CHECK-BE: copy 2, 19 # encoding: [0x7c,0x22,0x9e,0x0c]
+# CHECK-LE: copy 2, 19 # encoding: [0x0c,0x9e,0x22,0x7c]
copy 2, 19
-# CHECK-BE: copy 2, 19, 1 # encoding: [0x7c,0x22,0x9e,0x0c]
-# CHECK-LE: copy 2, 19, 1 # encoding: [0x0c,0x9e,0x22,0x7c]
- copy_first 2, 19
-# CHECK-BE: paste 17, 1, 0 # encoding: [0x7c,0x11,0x0f,0x0c]
-# CHECK-LE: paste 17, 1, 0 # encoding: [0x0c,0x0f,0x11,0x7c]
- paste 17, 1
-# CHECK-BE: paste. 17, 1, 1 # encoding: [0x7c,0x31,0x0f,0x0d]
-# CHECK-LE: paste. 17, 1, 1 # encoding: [0x0d,0x0f,0x31,0x7c]
- paste_last 17, 1
+# CHECK-BE: paste. 17, 1, 0 # encoding: [0x7c,0x11,0x0f,0x0d]
+# CHECK-LE: paste. 17, 1, 0 # encoding: [0x0d,0x0f,0x11,0x7c]
+ paste. 17, 1, 0
+# CHECK-BE: paste. 17, 1 # encoding: [0x7c,0x31,0x0f,0x0d]
+# CHECK-LE: paste. 17, 1 # encoding: [0x0d,0x0f,0x31,0x7c]
+ paste. 17, 1, 1
+# CHECK-BE: paste. 17, 1 # encoding: [0x7c,0x31,0x0f,0x0d]
+# CHECK-LE: paste. 17, 1 # encoding: [0x0d,0x0f,0x31,0x7c]
+ paste. 17, 1
mfsrin %r10,%r12
# Copy-Paste Facility
-# CHECK-BE: copy 2, 19, 1 # encoding: [0x7c,0x22,0x9e,0x0c]
-# CHECK-LE: copy 2, 19, 1 # encoding: [0x0c,0x9e,0x22,0x7c]
- copy 2, 19, 1
-# CHECK-BE: paste 17, 1, 1 # encoding: [0x7c,0x31,0x0f,0x0c]
-# CHECK-LE: paste 17, 1, 1 # encoding: [0x0c,0x0f,0x31,0x7c]
- paste 17, 1, 1
-# CHECK-BE: cp_abort # encoding: [0x7c,0x00,0x06,0x8c]
-# CHECK-LE: cp_abort # encoding: [0x8c,0x06,0x00,0x7c]
- cp_abort
+# CHECK-BE: copy 2, 19 # encoding: [0x7c,0x22,0x9e,0x0c]
+# CHECK-LE: copy 2, 19 # encoding: [0x0c,0x9e,0x22,0x7c]
+ copy 2, 19
+# CHECK-BE: paste. 17, 1 # encoding: [0x7c,0x31,0x0f,0x0d]
+# CHECK-LE: paste. 17, 1 # encoding: [0x0d,0x0f,0x31,0x7c]
+ paste. 17, 1, 1
+# CHECK-BE: cpabort # encoding: [0x7c,0x00,0x06,0x8c]
+# CHECK-LE: cpabort # encoding: [0x8c,0x06,0x00,0x7c]
+ cpabort
+
# Message Synchronize
# CHECK-BE: msgsync # encoding: [0x7c,0x00,0x06,0xec]