This is an archive of the discontinued LLVM Phabricator instance.

[BPF] Fix assembly parsing errors for atomic_fetch_* instructions
ClosedPublic

Authored by eddyz87 on Apr 2 2023, 7:27 PM.

Details

Summary

Fixes BPF assembler parsing errors for the following instructions:

  • atomic_fetch_add
  • atomic_fetch_and
  • atomic_fetch_xor
  • atomic_fetch_or
  • cmpxchg32_32
  • cmpxchg_64
  • xchg32_32
  • xchg_64

Also add a test to verify that all instructions could be assembled and disassembled.

Diff Detail

Event Timeline

eddyz87 created this revision.Apr 2 2023, 7:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2023, 7:27 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
eddyz87 requested review of this revision.Apr 2 2023, 7:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2023, 7:27 PM

Hi Yonghong,

Could you please take a look?
This fixes issues with parsing of some atomic operations identified during verifier tests migration.

yonghong-song accepted this revision.Apr 2 2023, 8:49 PM
This revision is now accepted and ready to land.Apr 2 2023, 8:49 PM

LGTM. Thanks for the fix!

eddyz87 updated this revision to Diff 510650.Apr 3 2023, 5:28 PM

git-clang-format fixes