[PATCH] D144829: [BPF] Add a few new insns under cpu=v4

Eduard Zingerman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 08:27:40 PDT 2023


eddyz87 accepted this revision.
eddyz87 added a comment.

Hi Yonghong,

Looks good to me, thanks!
Before landing this, could you please adjust tests a little bit more?

- Extend `assembler-disassembler-v4.s` with signed `div` and `mod`, e.g.:

  // CHECK: 3f 31 01 00 00 00 00 00	r1 s/= r3
  // CHECK: 9f 42 01 00 00 00 00 00	r2 s%= r4
  r1 s/= r3
  r2 s%= r4
  
  // CHECK: 3c 31 01 00 00 00 00 00	w1 s/= w3
  // CHECK: 9c 42 01 00 00 00 00 00	w2 s%= w4
  w1 s/= w3
  w2 s%= w4

- For `gotol` add a test case which tries each possibility in `BPFMIPreEmitPeephole::adjustBranch()`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144829/new/

https://reviews.llvm.org/D144829



More information about the cfe-commits mailing list