llvm-project/llvm/test
Yonghong Song ce96738dee bpf: print backward branch target properly
Currently, it prints the backward branch offset as unsigned value
like below:
       7:       7d 34 0b 00 00 00 00 00         if r4 s>= r3 goto 11 <LBB0_3>
       8:       b7 00 00 00 00 00 00 00         r0 = 0
LBB0_2:
       9:       07 00 00 00 01 00 00 00         r0 += 1
      ......
      17:       bf 31 00 00 00 00 00 00         r1 = r3
      18:       6d 32 f6 ff 00 00 00 00         if r2 s> r3 goto 65526 <LBB0_3+0x7FFB0>

The correct print insn 18 should be:
      18:       6d 32 f6 ff 00 00 00 00         if r2 s> r3 goto -10 <LBB0_2>

To provide better clarity and be consistent with kernel verifier output,
the insn 7 output is changed to the following with "+" added to
non-negative branch offset:
       7:       7d 34 0b 00 00 00 00 00         if r4 s>= r3 goto +11 <LBB0_3>

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 318442
2017-11-16 19:15:36 +00:00
..
Analysis Let llvm.invariant.group.barrier accepts pointer to any address space 2017-11-16 16:32:16 +00:00
Assembler [IR] redefine 'UnsafeAlgebra' / 'reassoc' fast-math-flags and add 'trans' fast-math-flag 2017-11-06 16:27:15 +00:00
Bindings [LLVM-C] Expose functions to create debug locations via DIBuilder. 2017-11-01 22:18:52 +00:00
Bitcode [ThinLTO] Fix missing call graph edges for calls with bitcasts. 2017-11-10 00:47:47 +00:00
BugPoint
CodeGen bpf: print backward branch target properly 2017-11-16 19:15:36 +00:00
DebugInfo [DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs. 2017-11-15 10:57:05 +00:00
Examples
ExecutionEngine [mips] Adds support for R_MIPS_26, HIGHER, HIGHEST relocations in RuntimeDyld. 2017-10-22 09:47:41 +00:00
Feature
FileCheck Add a -D flag to FileCheck to define variables 2017-11-07 13:24:44 +00:00
Instrumentation [asan] Fix size/alignment issues with non-default shadow scale 2017-11-16 12:57:19 +00:00
Integer
JitListener
LTO [LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local. 2017-11-04 17:04:39 +00:00
Linker Verifier: Ignore CUs pulled in by ODR-uniqued types. 2017-10-18 01:11:01 +00:00
MC bpf: print backward branch target properly 2017-11-16 19:15:36 +00:00
Object [test] Add test files that were missed from SVN r317459 2017-11-06 07:36:17 +00:00
ObjectYAML [ObjectYAML] Handle SHF_COMPRESSED 2017-10-03 06:35:55 +00:00
Other Let llvm.invariant.group.barrier accepts pointer to any address space 2017-11-16 16:32:16 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [globalisel][tablegen] Generate rule coverage and use it to identify untested rules 2017-11-16 00:46:35 +00:00
ThinLTO/X86 [LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local. 2017-11-04 17:04:39 +00:00
Transforms [InstCombine] add tests for pow(); NFC 2017-11-16 17:49:54 +00:00
Unit
Verifier Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
YAMLParser
tools Add ELF dynamic symbol support to yaml2obj/obj2yaml 2017-11-16 18:10:15 +00:00
.clang-format
CMakeLists.txt [llvm-opt-fuzzer] Add opt fuzzer to the test-depends list. 2017-11-15 15:07:37 +00:00
TestRunner.sh
lit.cfg.py [llvm-opt-fuzzer] NFC. Add sanity tests. 2017-11-15 12:36:57 +00:00
lit.site.cfg.py.in Reland "Add feature to determine if host architecture is 64-bit in llvm-lit" 2017-11-02 23:45:51 +00:00