[llvm] [RFC][BPF] Add support for asm gotol_or_nop and nop_or_gotol insns (PR #75110)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 23:09:21 PST 2023


================
@@ -604,6 +604,32 @@ class BRANCH_LONG<BPFJumpOp Opc, string OpcodeStr, list<dag> Pattern>
   let BPFClass = BPF_JMP32;
 }
 
+class BRANCH_OR_NOP<BPFJumpOp Opc, string OpcodeStr, list<dag> Pattern>
----------------
yonghong-song wrote:

> these two insns are just special cases for `JMPL`, how about just extending(inherit) `BRANCH_LONG` and override `Inst{55-52}` fields?

Thanks. @inclyc Good suggestion and adding the test! I marked the patch as RFC. Will wait until the design in kernel is settled and then will make proper coding (as you suggested in the above) and add tests.

https://github.com/llvm/llvm-project/pull/75110


More information about the llvm-commits mailing list