[PATCH] ARM: Emit ".code 16" before global inline-asm	instructions in thumb mode
    Renato Golin 
    renato.golin at linaro.org
       
    Fri Jul 25 11:06:05 PDT 2014
    
    
  
On 25 July 2014 17:54, Jim Grosbach <grosbach at apple.com> wrote:
> That’s not going to be 100% reliable as there are many mnemonics valid in both. For example, what do you do for “_foo: bx lr”?
What I had in mind was to have a callback in case the parsing fails
with "invalid instruction for ARM/Thumb" and _realise_ we're in the
wrong encoding.
But again, if the user wants to write Thumb code in inline assembly,
using encoding modifiers would be the expected behaviour, so even that
would be correcting bad user behaviour.
Enhancement at best...
> I prefer the simple and easy to explain answer this patch implements.
Absolutely!
--renato
    
    
More information about the llvm-commits
mailing list