[llvm] [RISC-V] Add P-ext MC Support for More Pair Operations (PR #154088)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 10:25:56 PDT 2025
================
@@ -98,6 +98,24 @@ class PLUI_i<bits<7> funct7, string opcodestr>
let Inst{23-15} = imm10{9-1};
}
+// Common base for widening binary ops
+class RVPWideningBase<bits<2> w, bit arith_shift, string opcodestr>
+ : RVInst<(outs GPRPairRV32:$rd), (ins GPR:$rs1, GPR:$rs2), opcodestr,
+ "$rd, $rs1, $rs2", [], InstFormatOther> {
+ bits<5> rs2;
+ bits<5> rs1;
+ bits<5> rd;
+
+ let Inst{31} = 0b0;
+ let Inst{26-25} = w;
+ let Inst{24-20} = rs2;
+ let Inst{19-15} = rs1;
+ let Inst{14-12} = 0b010;
+ let Inst{11-8} = rd{4-1};
+ let Inst{7} = arith_shift;
+ let Inst{6-0} = OPC_OP_32.Value;
----------------
topperc wrote:
This is the wrong opcode. It should be OP_IMM_32 as specified on page 3 of the encoding spec.
https://github.com/llvm/llvm-project/pull/154088
More information about the llvm-commits
mailing list