@@ -60,7 +60,7 @@ class PairCStore_rri<bits<3> funct3, string OpcodeStr,
6060 DAGOperand RC, DAGOperand opnd>
6161 : RVInst16CS<funct3, 0b00, (outs), (ins RC:$rs2,GPRCMem:$rs1, opnd:$imm),
6262 OpcodeStr, "$rs2, ${imm}(${rs1})">;
63-
63+
6464//===----------------------------------------------------------------------===//
6565// Instructions
6666//===----------------------------------------------------------------------===//
@@ -91,6 +91,21 @@ def C_SD_RV32 : PairCStore_rri<0b111, "c.sd", GPRPairCRV32, uimm8_lsb000>,
9191}
9292}// Predicates = [HasStdExtZclsd, IsRV32], DecoderNamespace = "ZcOverlap"
9393
94+ //===----------------------------------------------------------------------===//
95+ // Assembler Pseudo Instructions
96+ //===----------------------------------------------------------------------===//
97+
98+ let Predicates = [HasStdExtZclsd, IsRV32] in {
99+ def : InstAlias<"c.ld $rd, (${rs1})",
100+ (C_LD_RV32 GPRPairCRV32:$rd, GPRCMem:$rs1, 0), 0>;
101+ def : InstAlias<"c.sd $rs2, (${rs1})",
102+ (C_SD_RV32 GPRPairCRV32:$rs2, GPRCMem:$rs1, 0), 0>;
103+ def : InstAlias<"c.ldsp $rd, (${rs1})",
104+ (C_LDSP_RV32 GPRPairNoX0RV32:$rd, SPMem:$rs1, 0), 0>;
105+ def : InstAlias<"c.sdsp $rs2, (${rs1})",
106+ (C_SDSP_RV32 GPRPairRV32:$rs2, SPMem:$rs1, 0), 0>;
107+ }
108+
94109//===----------------------------------------------------------------------===//
95110// Compress Instruction tablegen backend.
96111//===----------------------------------------------------------------------===//
0 commit comments