<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:jiong.wang@netronome.com" title="Jiong Wang <jiong.wang@netronome.com>"> <span class="fn">Jiong Wang</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Branch targets in BPF disassembler listing are incorrect"
href="https://bugs.llvm.org/show_bug.cgi?id=35966">bug 35966</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Branch targets in BPF disassembler listing are incorrect"
href="https://bugs.llvm.org/show_bug.cgi?id=35966#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Branch targets in BPF disassembler listing are incorrect"
href="https://bugs.llvm.org/show_bug.cgi?id=35966">bug 35966</a>
from <span class="vcard"><a class="email" href="mailto:jiong.wang@netronome.com" title="Jiong Wang <jiong.wang@netronome.com>"> <span class="fn">Jiong Wang</span></a>
</span></b>
<pre>The disassembly for branch target has been improved a little bit by
commit 7a07b064e95d464a7192a4ea78ad902e232b9604
Author: Yonghong Song <<a href="mailto:yhs@fb.com">yhs@fb.com</a>>
Date: Thu Nov 16 19:15:36 2017 +0000
bpf: print backward branch target properly
git-svn-id: <a href="https://llvm.org/svn/llvm-project/llvm/trunk@318442">https://llvm.org/svn/llvm-project/llvm/trunk@318442</a>
91177308-0d34-0410-b5e6-96231b3b80d8
llvm-objdump will output something like the following for backward and forward
branch accordingly:
backward: if r2 s> r3 goto -10
forward: if r4 s>= r3 goto +11
pc-relative address/index is printed instead of absolute address/index. This is
inconsistent with kernel verifier disassembly format.
There is one place we could potentially improve though, it is when there is not
symbol information that llvm-objdump will also annotate the branch target with
it's section relative address:
if r2 s> r1 goto +7 <.text+0xd8>
This address however is not turned into index which is used in all other
places, this might be a little bit confusing to people. To improve this, needs
modification on llvm-objdump generic code, might be not worth doing that.
Based on above explanation, I think the current disassembly output for branch
target is expected.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>