<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 25 November 2013 20:43, Greg Fitzgerald <span dir="ltr"><<a href="mailto:garious@gmail.com" target="_blank">garious@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  I'm starting to think that fixing this bug is a bad idea and that reporting an error might be more appropriate.  Fixing the bug opens up a can of worms.  Say the user's inline assembly doesn't return to thumb mode.  Should the compiler inject the $t mapping symbol?  Should it inject a ".code 16" directive?  Should it inject a label and adr to switch back to thumb mode?  Where do we draw the line?<br>
</blockquote><div><br></div><div>I think it all depends on the kind of things the user does. The bottom line is: you should keep the asm/object consistent, which means you'll have to insert as much boilerplate code as needed (but nothing more) to keep it working. Since the user can do unimaginable things in inline assembly, you'll have to either be ultra-smart, or start cutting their wings with warnings/error messages.</div>
<div><br></div><div>Where you draw the line is just a matter of priorities. Implement what you need and err what you don't support, yet. ;)</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  Also, my test is fragile.  That $a shouldn't be displayed by llvm-objdump (and isn't by GNU's objdump).  Also, the CHECK-NEXT assertions are checking those bytes in the context of thumb instructions.  Instead there should just be one CHECK that matches all 4 bytes on one line.<br>
</blockquote><div><br></div><div>$a, $t and $d symbols are only printed on the assembly output, not the object file. If objdump recognizes the areas as thumb/arm/data, it *may* print them back, but they're not in the object itself. This is why disassembling ARM objects from an arbitrary point is not the easiest of tasks. If your test was done in asm output, it could be easier to create the CHECK lines.</div>
<div></div></div><br></div><div class="gmail_extra">cheers,</div><div class="gmail_extra">--renato</div></div>