On 19 February 2014 11:58, Richard Sandiford
<rsand...@linux.vnet.ibm.com> wrote:
> I agree that having an unrecognised asm shouldn't be a hard error until
> assembly time though.  Saleem, is the problem that this is being rejected
> earlier?

Hi Andrew, Richard,

Thanks for your reviews! We agree that we should actually just ignore
the contents until object emission.

Just for context, one of the reasons why we enabled inline assembly
checks is for some obscure cases when the snippet changes the
instructions set (arm -> thumb) and the rest of the function becomes
garbage. Our initial implementation was to always emit .arm/.thumb
after *any* inline assembly, which would become a nop in the worst
case. But since we had easy access to the assembler, we thought: "why
not?".

The idea is now to try to parse the snippet for cases like .arm/.thumb
but only emit a warning IFF -Wbad-inline-asm (or whatever) is set (and
not to make it on by default), otherwise, ignore. We're hoping our
assembler will be able to cope with the multiple levels of indirection
automagically. ;)

Thanks again!
--renato

Reply via email to