<div dir="ltr"><div>BC is flagged as isCodeGenOnly in the tablegen because of: <br><br>  // BCC represents an arbitrary conditional branch on a predicate.<br>  // FIXME: should be able to write a pattern for PPCcondbranch, but can't use<br>  // a two-value operand where a dag node expects two operands. :(<br>  let isCodeGenOnly = 1 in {<br><br></div>IIRC isCodeGenOnly instructions have different disassembly behavior.  The X86 backend has / had a "ForceDisassemble" flag with the comment<br><pre>   // The disassembler should know about this, but not the asmparser.</pre><div><div><div class="gmail_extra">The assembly input is handled via an instruction alias, which I think is only used by the asmparser to expand bne into the isCodeGenOnly form: <br><br>defm : BranchExtendedMnemonic<"ne", 68>;<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Someone else should know off the top of their head but the x86 backend has a very similar setup (X86InstrControl.td) for the ICBr multiclass which handles different bit widths of conditional branch immediates, and isCodeGenOnly and ForceDisassemble are both set on two of the three forms.  That might explain why it works there and not with PPC, but I might be wrong. <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Hope that helps, <br clear="all"></div><div class="gmail_extra"><div><div class="gmail_signature">GNOMETOYS<br></div></div>
<br><div class="gmail_quote">On Fri, Dec 1, 2017 at 5:14 AM, Leonardo Bianconi via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="PT-BR">
<div class="gmail-m_4383779067310236006WordSection1">
<p class="gmail-MsoNormal"><u></u> <u></u></p>
<div><span class="gmail-">
<p class="gmail-MsoNormal"><u></u> <u></u></p>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">But where is the flat set? Maybe I can debug and check what is going on.</span><u></u><u></u></p>
</blockquote>
</span><div><span class="gmail-">
<p class="gmail-MsoNormal"> The MCInstrDesc are in a table in lib/Target/PowerPC/<wbr>PPCGenInstrInfo.inc of your build directory.<u></u><u></u></p>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<p class="gmail-m_4383779067310236006gmail-msonormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Some additional information:</span><u></u><u></u></p>
<p class="gmail-m_4383779067310236006gmail-msonormal" style="text-indent:35.4pt"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">MCInst opcode: 0x7cb</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Decode Index: 0x1e</span><u></u><u></u></p>
</blockquote>
<div>
<p class="gmail-MsoNormal">I had assumed this would have dissembled to '// Inst #234 = BC' which does have the branch flag set, but I think that opcode is for XXLNOR instruction.<u></u><u></u></p>
</div>
</span><div><span class="gmail-">
<p class="gmail-MsoNormal" style="margin-bottom:12pt">Could it be disassembling to `// Inst #2014 = gBC` instead which does not have the branch flag set? Adding Hal and Ulrich in case they have some extra insight here.<span style="color:rgb(31,73,125)"><u></u><u></u></span></p>
</span><p class="gmail-MsoNormal" style="margin-bottom:12pt"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(56,87,35)" lang="EN-US">This code is new for me, I will make some
 more debugging to check this, and if I find more information, I let you know.</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"><u></u><u></u></span></p><span class="gmail-">
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<p class="gmail-m_4383779067310236006gmail-msonormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Remembering I’m using a little endian Power8 machine.</span><u></u><u></u></p>
</blockquote>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal" style="margin-bottom:12pt">Are there any outstanding patches or workarounds I need to build lldb on Power8?<u></u><u></u></p>
</div>
</span><p class="gmail-MsoNormal" style="margin-bottom:12pt"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(56,87,35)" lang="EN-US">This “<a href="https://github.com/PPC64/lldb" target="_blank">https://github.com/PPC64/lldb</a><wbr>” is the
 repository we are using to development (using “next” branch).<u></u><u></u></span></p>
<p class="gmail-MsoNormal" style="margin-bottom:12pt"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(56,87,35)" lang="EN-US">Also there are “<a href="https://github.com/PPC64/clang" target="_blank">https://github.com/PPC64/<wbr>clang</a>”
 and “<a href="https://github.com/PPC64/llvm" target="_blank">https://github.com/PPC64/llvm</a><wbr>” as fixed references to avoid, for example, use lldb with the llvm from upstream repository in a different version.<u></u><u></u></span></p>
<p class="gmail-MsoNormal" style="margin-bottom:12pt"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(56,87,35)" lang="EN-US">Using these versions it should build.<u></u><u></u></span></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(56,87,35)" lang="EN-US">Thanks,<u></u><u></u></span></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(56,87,35)" lang="EN-US">Leonardo.<u></u><u></u></span></p>
<div>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p>
<p class="gmail-MsoNormal"><span lang="EN-US">Thanks<u></u><u></u></span></p>
</div>
<div>
<p class="gmail-MsoNormal">Sean<br>
 <u></u><u></u></p>
</div>
</div>
</div>
</div><div><div class="gmail-h5">
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
<div>
<p class="gmail-MsoNormal">On Thu, Nov 30, 2017 at 10:09 AM, Leonardo Bianconi <<a href="mailto:leonardo.bianconi@eldorado.org.br" target="_blank">leonardo.bianconi@eldorado.<wbr>org.br</a>> wrote:<u></u><u></u></p>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">But where is the flat set? Maybe I can debug and check what is going on.</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">There is the possibility to be lldb usage, but it’s obtaining the disassembler as it is.</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">When lldb tries to instantiate the disassembler, it checks many information in</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">llvm/tools/lldb/source/<wbr>Plugins/Disassembler/llvm/<wbr>DisassemblerLLVMC.cpp:1014 =</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">“DisassemblerLLVMC::<wbr>DisassemblerLLVMC(const ArchSpec &arch,</span><span lang="EN-US">
</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">const char *flavor_string)”,</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">which I couldn’t find if it’s doing correct. Is there a place that explains the “flavor”
 and</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">“features_str” variables used at DisassemblerLLVMC.cpp:1163</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">(“newLLVMCDisassembler(triple_<wbr>str, cpu, features_str.c_str(), flavor, *this)”)?</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Another question that I have is, how can I compare the data it gets with the real instructions?</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">I found the file “PPCGenDisassemblerTables.inc”<wbr>, where the table is declared, and where
 the it</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">is decoded, so the current instruction bne cr7,0x2000092c (0x409e000c) is being processed
 by</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">the case 30 in the PPCGenDisassemblerTables.inc file:</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">      case 30:</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">        tmp = fieldFromInstruction(insn, 21, 5);</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">        if (decodeUImmOperand<5>(MI, tmp, Address, Decoder) == MCDisassembler::Fail) {
 return MCDisassembler::Fail; }</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">        tmp = fieldFromInstruction(insn, 16, 5);</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">        if (DecodeCRBITRCRegisterClass(<wbr>MI, tmp, Address, Decoder) == MCDisassembler::Fail)
 { return MCDisassembler::Fail; }</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">        tmp = fieldFromInstruction(insn, 2, 14);</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">        MI.addOperand(MCOperand::<wbr>createImm(tmp));</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">        return S;         
</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Which is the correct reading for the BC instruction. What am I missing?</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Some additional information:</span><u></u><u></u></p>
<p class="gmail-MsoNormal" style="text-indent:35.4pt">
<span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">MCInst opcode: 0x7cb</span><u></u><u></u></p>
<p class="gmail-MsoNormal" style="text-indent:35.4pt">
<span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Decode Index: 0x1e</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">=================             <wbr>                      
</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Test case:</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-m_4383779067310236006m1959917323803839692msolistparagraph"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">-</span><span style="font-size:7pt;color:rgb(31,73,125)" lang="EN-US">         
</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Build the file “lldb/packages/Python/<wbr>lldbsuite/test/<wbr>functionalities/stop-hook/<wbr>main.cpp”</span><u></u><u></u></p>
<p class="gmail-m_4383779067310236006m1959917323803839692msolistparagraph"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">-</span><span style="font-size:7pt;color:rgb(31,73,125)" lang="EN-US">         
</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Run LLDB with the binary just generated</span><u></u><u></u></p>
<p class="gmail-m_4383779067310236006m1959917323803839692msolistparagraph"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">-</span><span style="font-size:7pt;color:rgb(31,73,125)" lang="EN-US">         
</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Add the breakpoint “b main.cpp:30”</span><u></u><u></u></p>
<p class="gmail-m_4383779067310236006m1959917323803839692msolistparagraph"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">-</span><span style="font-size:7pt;color:rgb(31,73,125)" lang="EN-US">         
</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Send the command “n”, stepping over to next line.</span><u></u><u></u></p>
<p class="gmail-MsoNormal" style="text-indent:18pt">
<span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Result: The debugger will not stop and will execute the entire binary.</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Remembering I’m using a little endian Power8 machine.</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Thanks!</span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"> </span><u></u><u></u></p>
<p class="gmail-MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif"> Nemanja Ivanovic [mailto:<a href="mailto:nemanja.i.ibm@gmail.com" target="_blank">nemanja.i.ibm@gmail.<wbr>com</a>]
<br>
<b>Sent:</b> quinta-feira, 30 de novembro de 2017 07:54<br>
<b>To:</b> Sean Fertile <<a href="mailto:sd.fertile@gmail.com" target="_blank">sd.fertile@gmail.com</a>><br>
<b>Cc:</b> Leonardo Bianconi <<a href="mailto:leonardo.bianconi@eldorado.org.br" target="_blank">leonardo.bianconi@eldorado.<wbr>org.br</a>>;
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm-dev] PPC64 Disassembler</span><u></u><u></u></p>
<p class="gmail-MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="gmail-MsoNormal"><span lang="EN-US">The `isBranch` flag is already set on the branch instructions. Furthermore, we do use the `isBranch()` query in a few places in the PPC back end, so this does
 work. Perhaps there's something specific about the lldb usage? Is it somehow possible that the `isBranch()` query is called on the wrong instruction?</span><u></u><u></u></p>
</div>
<div>
<div>
<p class="gmail-MsoNormal"><span lang="EN-US">Would you be able to provide a test case that reproduces the issue?</span><u></u><u></u></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p class="gmail-MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<div>
<p class="gmail-MsoNormal"><span lang="EN-US">On Thu, Nov 30, 2017 at 2:30 AM, Sean Fertile via llvm-dev <</span><a href="mailto:llvm-dev@lists.llvm.org" target="_blank"><span lang="EN-US">llvm-dev@lists.llvm.org</span></a><span lang="EN-US">>
 wrote:</span><u></u><u></u></p>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt">
<p class="gmail-MsoNormal"><span lang="EN-US">Hello Leonardo,<br>
<br>
What is the opcode of the MCInstrDesc?<br>
<br>
Sean</span><u></u><u></u></p>
<div>
<div>
<p class="gmail-MsoNormal"><span lang="EN-US"><br>
On Wed, Nov 29, 2017 at 1:48 PM, Leonardo Bianconi via llvm-dev<br>
<</span><a href="mailto:llvm-dev@lists.llvm.org" target="_blank"><span lang="EN-US">llvm-dev@lists.llvm.org</span></a><span lang="EN-US">> wrote:<br>
> Hi all,<br>
><br>
><br>
><br>
> I’m working on lldb to make it available to ppc64le, but the “step over”<br>
><br>
> is not working for some cases.<br>
><br>
><br>
><br>
> When debugging, I can see that the disassembler analyze some instructions<br>
><br>
> forward, looking for a branch instruction<br>
><br>
> (llvm/tools/lldb/source/<wbr>Plugins/Disassembler/llvm/<wbr>DisassemblerLLVMC.cpp:87<br>
><br>
> – “const bool can_branch = mc_disasm_ptr->CanBranch(inst)<wbr>;”), while<br>
><br>
> trying to set the next breakpoint.<br>
><br>
><br>
><br>
> On this case, the instruction is the “bne     cr7,0x2000092c”, which is a<br>
> branch,<br>
><br>
> but at llvm/lib/MC/MCInstrDesc.cpp:35 –<br>
><br>
> “if (isBranch() || isCall() || isReturn() || isIndirectBranch())” it returns<br>
> false,<br>
><br>
> making lldb do not set the correct breakpoint, so the execution does not<br>
> stop<br>
><br>
> at next line, which should be the “step over” behavior.<br>
><br>
><br>
><br>
> The variable “Flags” for the disassembled instruction does not have the<br>
> branch<br>
><br>
> flag.<br>
><br>
><br>
><br>
> I have tried to change the file “/lib/Target/PowerPC/<wbr>PPCInstrInfo.td”,<br>
> adding<br>
><br>
> “isBranch = 1” for the instruction "bc 4, $bi, $dst", but had not effect.<br>
><br>
><br>
><br>
> Comparing with x86_64, building the same cpp file, the instruction<br>
><br>
> “jne    0x4005eb” has the branch flag, which identifies it as a branch<br>
> instruction.<br>
><br>
><br>
><br>
> Where is the definition that an instruction is a branch? Is it a bug?<br>
><br>
><br>
><br>
> Thanks!<br>
><br>
></span><u></u><u></u></p>
</div>
</div>
<p class="gmail-MsoNormal"><span lang="EN-US">> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> </span><a href="mailto:llvm-dev@lists.llvm.org" target="_blank"><span lang="EN-US">llvm-dev@lists.llvm.org</span></a><span lang="EN-US"><br>
> </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank"><span lang="EN-US">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</span></a><span lang="EN-US"><br>
><br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
</span><a href="mailto:llvm-dev@lists.llvm.org" target="_blank"><span lang="EN-US">llvm-dev@lists.llvm.org</span></a><span lang="EN-US"><br>
</span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank"><span lang="EN-US">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</span></a><u></u><u></u></p>
</blockquote>
</div>
<p class="gmail-MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div></div></div>