aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2017-11-16 19:15:36 +0000
committerYonghong Song <yhs@fb.com>2017-11-16 19:15:36 +0000
commitce96738dee560a9a3ad08301860d1483df3356d4 (patch)
treeb6f467eeb92a8d43b61221e6c2fcc053d5634556 /clang/unittests/Basic/VirtualFileSystemTest.cpp
parent1eaf300faced614c63cb2ff5c683fffdd3a2935b (diff)
downloadllvm-ce96738dee560a9a3ad08301860d1483df3356d4.zip
llvm-ce96738dee560a9a3ad08301860d1483df3356d4.tar.gz
llvm-ce96738dee560a9a3ad08301860d1483df3356d4.tar.bz2
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
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions