Yonghong Song writes: <snip> > > The change looks good. Tested with unit tests and kernel selftests. > I added something like below to one of test_progs bpf programs: > (void)__sync_fetch_and_add(value_p, 1); > and the generated code is correct for alu32 mode and the objdump > is able to disassemble correctly with -mattr=+alu32. > > You can add my ack: > Acked-by: Yonghong Song <yhs@xxxxxx> > > Could you go ahead to push to llvm trunk? Thanks! Done, thanks. Regards, Jiong > >> >> lib/Target/BPF/BPFInstrInfo.td | 28 ++++++- >> lib/Target/BPF/BPFMIChecking.cpp | 97 ++++++++++++++++++++++++- >> lib/Target/BPF/Disassembler/BPFDisassembler.cpp | 3 +- >> test/CodeGen/BPF/xadd.ll | 2 + >> test/CodeGen/BPF/xadd_legal.ll | 26 +++++++ >> test/MC/BPF/insn-unit.s | 3 +- >> test/MC/BPF/load-store-32.s | 3 + >> 7 files changed, 154 insertions(+), 8 deletions(-) >> create mode 100644 test/CodeGen/BPF/xadd_legal.ll >>