[all-commits] [llvm/llvm-project] ee1040: [llvm-objdump][BPF] --symbolize-operands: infer lo...

eddyz87 via All-commits all-commits at lists.llvm.org
Tue Jul 30 22:52:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee1040b02adc95e376b295c4f59d30b991a8be9a
      https://github.com/llvm/llvm-project/commit/ee1040b02adc95e376b295c4f59d30b991a8be9a
  Author: eddyz87 <eddyz87 at gmail.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    A llvm/test/tools/llvm-objdump/BPF/disassemble-symbolize-operands.s
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump][BPF] --symbolize-operands: infer local labels for BPF (#100550)

Enable local labels computation for BPF disassembly when
`--symbolize-operands` option is specified.
This relies on `MCInstrAnalysis::evaluateBranch()` method, which is
already defined in `BPFMCInstrAnalysis::evaluateBranch`.

After this change the assembly code below:

        if r1 > 42 goto +1
        r1 -= 10
        ...

Would be printed as:

        if r1 > 42 goto +1 <L0>
        r1 -= 10
      <L0>:
        ...

(when `--symbolize-operands` option is set).

See https://reviews.llvm.org/D84191 for the main part of the
`--symbolize-operands` implementation logic.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list