<div dir="ltr"><div><div>Hello all,<br>Hello Simon,<br><br></div><div>Thank you very much for your tutorial "Howto: Implementing LLVM Integrated Assembler". It was indeed very helpful for me.<br></div>I am having a little bit difficulties with the AsmParser which I would like to postpone for the moment.<br></div><div>I have the LLVM IR for a simple add that I want to see its emitted binary. Do you think it's possible/doable to give this internal representation to the CodeEmitter and see the binary representation instead of going through writing the assembly code, then parsing it, and then run it with the show-encoding option?<br></div><div>Thanks a lot.<br><br></div><div>Cheers,<br></div><div>ES<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 17, 2015 at 1:17 PM, Simon Cook 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
If you have an AsmParser implemented, you could put an instruction into<br>
a file and then run it through llvm-mc with the -show-encoding option.<br>
For example:<br>
<br>
  llvm-mc -triple=foo -show-encoding test.s<br>
<br>
Hope this helps.<br>
Thanks,<br>
Simon<br>
<div><div class="h5"><br>
On 17/08/15 09:33, Sky Flyer via llvm-dev wrote:<br>
> Hi all,<br>
><br>
> I have defined an instruction in the InstFormat.td and InstrInfo.td<br>
> files. I also wrote a CodeEmitter class for that, and now I have a .inc<br>
> file after compilation that seems like it might be correct, BUT, I would<br>
> like to see what will be generated when the assembly code is converted<br>
> to the binary machine code!<br>
> Is there any command in TableGen or a test class to do so?<br>
><br>
> Cheers,<br>
> ES<br>
><br>
</div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>         <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>