[clang] [llvm] [RISC-V] Added the mips extension instructions like ehb,ihb and pause etc for MIPS RV64 P8700. (PR #155747)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 28 08:01:24 PDT 2025
================
@@ -125,10 +125,25 @@ class Mips_prefetch_ri<dag outs, dag ins, string opcodestr, string argstr>
let Inst{6-0} = OPC_CUSTOM_0.Value;
}
+// MIPS Ext Insns Fromat.
+let hasSideEffects = 1, mayLoad = 0,
+ mayStore = 0 in class MIPSExtInst_ri<bits<6> shimm5, string opcodestr>
+ : RVInstIShift<0b00000, 0b001, OPC_OP_IMM, (outs), (ins), opcodestr, ""> {
+ let shamt = shimm5;
+ let rd = 0;
+ let rs1 = 0;
+}
+
//===----------------------------------------------------------------------===//
// MIPS extensions
//===----------------------------------------------------------------------===//
-let Predicates = [HasVendorXMIPSCBOP] ,DecoderNamespace = "Xmipscbop" in {
+let Predicates = [HasVendorXMIPSEXECTL], DecoderNamespace = "XMIPS" in {
+ def MIPS_EHB : MIPSExtInst_ri<0b000011, "mips.ehb">;
+ def MIPS_IHB : MIPSExtInst_ri<0b000001, "mips.ihb">;
+ def MIPS_PAUSE : MIPSExtInst_ri<0b000101, "mips.pause">;
+}
+
+let Predicates = [HasVendorXMIPSCBOP] ,DecoderNamespace = "XMIPS" in {
----------------
topperc wrote:
```suggestion
let Predicates = [HasVendorXMIPSCBOP], DecoderNamespace = "XMIPS" in {
```
https://github.com/llvm/llvm-project/pull/155747
More information about the cfe-commits
mailing list