<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Showing the value for the fixup requires full object code layout and relaxation, which isn't done is the text-to-text path.<div><br></div><div>--Owen<br><div><br><div><div>On Sep 12, 2012, at 5:54 PM, Greg Fitzgerald <<a href="mailto:garious@gmail.com">garious@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p class="MsoNormal">When I use llvm-mc’s ‘-show-encoding’, it only goes as far
as printing “fixups”:</p><div> <br class="webkit-block-placeholder"></div><p class="MsoNormal" style="margin-left:.5in">$ echo -e "adr r0,
lbl\nnop\nlbl:" | llvm-mc -triple=thumbv7 -show-encoding</p><div style="margin-left: 0.5in; "> <br class="webkit-block-placeholder"></div><p class="MsoNormal">Outputs:</p><p class="MsoNormal" style="margin-left:.5in">@ encoding: [A,0xa0]</p><p class="MsoNormal" style="margin-left:.5in">@ fixup A – offset:
0, value: lbl, kind: fixup_thumb_adr_pcrel_10</p><div> <br class="webkit-block-placeholder"></div><div> <br class="webkit-block-placeholder"></div><p class="MsoNormal">To find out that it is encoded as 0xa001, I can do:</p><div> <br class="webkit-block-placeholder"></div><p class="MsoNormal" style="margin-left:.5in">$ echo -e "adr r0,
lbl\nnop\nlbl:" | llvm-mc -triple=thumbv7 -show-encoding <span style="color:red">-filetype=obj > tmp.o</span></p><p class="MsoNormal" style="margin-left:.5in"><span style="color:red">$
llvm-objdump -d tmp.o</span></p><div> <br class="webkit-block-placeholder"></div><p class="MsoNormal">Is there a way to get that encoding directly from llvm-mc?</p><div> <br class="webkit-block-placeholder"></div><p class="MsoNormal">Thanks,</p><p class="MsoNormal">Greg</p>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></div></div></body></html>