<div dir="ltr"><div><div><div>Hi Tim,<br></div>Thanks for your observations.It seems I have missed adding encoding values for registers.<br><br></div>Thanks,<br></div>Mahesh B<br></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid #d3d4de">
        <tr>
        <td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color:#4453ea">www.avast.com</a>
                </td>
        </tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 11, 2017 at 1:27 PM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mahesh,<br>
<br>
On 11 December 2017 at 06:41, Mahesh Bodapati via llvm-dev<br>
<span class=""><<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
> we have seen proper register numbers when we have generated assembly files<br>
> through clang but when we generated dump files from object file then we didn't see expected<br>
> register numbers.<br>
<br>
</span>I assume this is a backend you're writing? Those encodings have a lot<br>
of 0s in them, so I'm guessing the object file is what's wrong rather<br>
than the dumper.<br>
<br>
Have you made sure you have fields in your instructions whose names<br>
match the registers in the (outs) and (ins) and get assigned to the<br>
"Inst" bitfield? That's how TableGen knows where to encode each<br>
register.<br>
<br>
You should look for calls to getMachineOpValue in<br>
build/lib/Target/XYZ/<wbr>XYZGenMCCodeEmitter.inc, both in the source and<br>
with a debugger to make sure it's actually being called and doing what<br>
you expect.<br>
<br>
Cheers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div>