@@ -12588,12 +12588,10 @@ class MOPSMemoryCopy<bits<2> opcode, bits<2> op1, bits<2> op2, string asm>
1258812588class MOPSMemoryMove<bits<2> opcode, bits<2> op1, bits<2> op2, string asm>
1258912589 : MOPSMemoryCopyMoveBase<1, opcode, op1, op2, asm>;
1259012590
12591- class MOPSMemorySetBase<bit isTagging, bits<2> opcode, bit op1, bit op2,
12592- string asm>
12593- : I<(outs GPR64common:$Rd_wb, GPR64:$Rn_wb),
12594- (ins GPR64common:$Rd, GPR64:$Rn, GPR64:$Rm),
12595- asm, "\t[$Rd]!, $Rn!, $Rm",
12596- "$Rd = $Rd_wb,$Rn = $Rn_wb", []>,
12591+ class MOPSMemorySetBase<dag ins, string operands, bit isTagging, bits<2> opcode,
12592+ bit op1, bit op2, bit op3, string asm>
12593+ : I<(outs GPR64common:$Rd_wb, GPR64:$Rn_wb), ins,
12594+ asm, operands, "$Rd = $Rd_wb,$Rn = $Rn_wb", []>,
1259712595 Sched<[]> {
1259812596 bits<5> Rd;
1259912597 bits<5> Rn;
@@ -12605,20 +12603,34 @@ class MOPSMemorySetBase<bit isTagging, bits<2> opcode, bit op1, bit op2,
1260512603 let Inst{15-14} = opcode;
1260612604 let Inst{13} = op2;
1260712605 let Inst{12} = op1;
12608- let Inst{11-10} = 0b01;
12606+ let Inst{11} = 0b0;
12607+ let Inst{10} = op3;
1260912608 let Inst{9-5} = Rn;
1261012609 let Inst{4-0} = Rd;
1261112610
12612- let DecoderMethod = "DecodeSETMemOpInstruction";
1261312611 let mayLoad = 0;
1261412612 let mayStore = 1;
1261512613}
1261612614
12617- class MOPSMemorySet<bits<2> opcode, bit op1, bit op2, string asm>
12618- : MOPSMemorySetBase<0, opcode, op1, op2, asm>;
12615+ class MOPSMemorySet<bits<2> opcode, bit op1, bit op2, bit op3, string asm>
12616+ : MOPSMemorySetBase<(ins GPR64common:$Rd, GPR64:$Rn, GPR64:$Rm),
12617+ "\t[$Rd]!, $Rn!, $Rm", 0, opcode, op1, op2, op3, asm> {
12618+ let DecoderMethod = "DecodeSETMemOpInstruction";
12619+ }
12620+
12621+ class MOPSMemorySetTagging<bits<2> opcode, bit op1, bit op2, bit op3, string asm>
12622+ : MOPSMemorySetBase<(ins GPR64common:$Rd, GPR64:$Rn, GPR64:$Rm),
12623+ "\t[$Rd]!, $Rn!, $Rm", 1, opcode, op1, op2, op3, asm> {
12624+ let DecoderMethod = "DecodeSETMemOpInstruction";
12625+ }
1261912626
12620- class MOPSMemorySetTagging<bits<2> opcode, bit op1, bit op2, string asm>
12621- : MOPSMemorySetBase<1, opcode, op1, op2, asm>;
12627+ class MOPSGoMemorySetTagging<bits<2> opcode, bit op1, bit op2, bit op3, string asm>
12628+ : MOPSMemorySetBase<(ins GPR64common:$Rd, GPR64:$Rn),
12629+ "\t[$Rd]!, $Rn!", 1, opcode, op1, op2, op3, asm> {
12630+ // No `Rm` operand, as all bits must be set to 1
12631+ let Inst{20-16} = 0b11111;
12632+ let DecoderMethod = "DecodeSETMemGoOpInstruction";
12633+ }
1262212634
1262312635multiclass MOPSMemoryCopyInsns<bits<2> opcode, string asm> {
1262412636 def "" : MOPSMemoryCopy<opcode, 0b00, 0b00, asm>;
@@ -12659,17 +12671,27 @@ multiclass MOPSMemoryMoveInsns<bits<2> opcode, string asm> {
1265912671}
1266012672
1266112673multiclass MOPSMemorySetInsns<bits<2> opcode, string asm> {
12662- def "" : MOPSMemorySet<opcode, 0, 0, asm>;
12663- def T : MOPSMemorySet<opcode, 1, 0, asm # "t">;
12664- def N : MOPSMemorySet<opcode, 0, 1, asm # "n">;
12665- def TN : MOPSMemorySet<opcode, 1, 1, asm # "tn">;
12674+ def "" : MOPSMemorySet<opcode, 0, 0, 1, asm>;
12675+ def T : MOPSMemorySet<opcode, 1, 0, 1, asm # "t">;
12676+ def N : MOPSMemorySet<opcode, 0, 1, 1, asm # "n">;
12677+ def TN : MOPSMemorySet<opcode, 1, 1, 1, asm # "tn">;
1266612678}
1266712679
1266812680multiclass MOPSMemorySetTaggingInsns<bits<2> opcode, string asm> {
12669- def "" : MOPSMemorySetTagging<opcode, 0, 0, asm>;
12670- def T : MOPSMemorySetTagging<opcode, 1, 0, asm # "t">;
12671- def N : MOPSMemorySetTagging<opcode, 0, 1, asm # "n">;
12672- def TN : MOPSMemorySetTagging<opcode, 1, 1, asm # "tn">;
12681+ def "" : MOPSMemorySetTagging<opcode, 0, 0, 1, asm>;
12682+ def T : MOPSMemorySetTagging<opcode, 1, 0, 1, asm # "t">;
12683+ def N : MOPSMemorySetTagging<opcode, 0, 1, 1, asm # "n">;
12684+ def TN : MOPSMemorySetTagging<opcode, 1, 1, 1, asm # "tn">;
12685+ }
12686+
12687+ //----------------------------------------------------------------------------
12688+ // MOPS Granule Only - FEAT_MOPS_GO
12689+ //----------------------------------------------------------------------------
12690+ multiclass MOPSGoMemorySetTaggingInsns<bits<2> opcode, string asm> {
12691+ def "" : MOPSGoMemorySetTagging<opcode, 0, 0, 0, asm>;
12692+ def T : MOPSGoMemorySetTagging<opcode, 1, 0, 0, asm # "t">;
12693+ def N : MOPSGoMemorySetTagging<opcode, 0, 1, 0, asm # "n">;
12694+ def TN : MOPSGoMemorySetTagging<opcode, 1, 1, 0, asm # "tn">;
1267312695}
1267412696
1267512697//----------------------------------------------------------------------------
0 commit comments