<div dir="ltr"><div style>Yep, b.w using ARM's "alternative syntax" is broken. Luckily, though LLVM bitcode doesn't compile to this form, and will always use a label instead. Here's a patch that only acknowledges the broken instructions:</div>
<div><br></div><a href="https://github.com/garious/llvm/commit/916c4badd816178da9fdbac5b5ed2331a7201f98">https://github.com/garious/llvm/commit/916c4badd816178da9fdbac5b5ed2331a7201f98</a><div><br></div><div>I submitted this to llvm-commits a while back, but nobody replied. :(<br>
<div><br></div><div style>-Greg</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 27, 2012 at 4:20 PM, Vladimir Pouzanov <span dir="ltr"><<a href="mailto:farcaller@gmail.com" target="_blank">farcaller@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 all.<br>
<br>
I came across a strange behaviour in the instruction printer for Thumbv2:<br>
<br>
The instruction is 0xf000b800, which is a b.w #0<br>
<br>
LLVM returns it as b.w #-262144, which doesn't make any sense to me.<br>
<br>
Should I consider it a bug?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Vladimir Pouzanov<br>
<a href="http://www.farcaller.net/" target="_blank">http://www.farcaller.net/</a><br>
<br>
<br>
_______________________________________________<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" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</font></span></blockquote></div><br></div></div>