[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs

Jim Grosbach grosbach at apple.com
Wed Jun 22 10:52:35 PDT 2011


On Jun 22, 2011, at 10:42 AM, Damjan Marion wrote:

> 
> On Jun 22, 2011, at 7:27 PM, Jim Grosbach wrote:
> 
>>> I will try to find those pre-v3 patches.
>>> 
>>> In meantime I wrote a patch which changes to old mnemonics for shift instructions.
>>> This fixes compiling on the freebsd.
>> 
>> If this is really the only issue you're seeing, we may be lucky and your binutils already have support for lots of the changes necessary to handle llvm assembly. Let's cross our fingers that's the case.
> 
> At this point I will be happy to have ARMv5 assembly working, and seems that this issue is only show-stopper so far.
> 

Cool. Glad to hear that.

> I also had problem with "internal_relocation (type: OFFSET_IMM) not fixed up" errors while compiling libcsu, but I fixed that with passing -O1 to clang.
> 
>> Does your assembler support the other shift mnemonics (e.g., "LSL")? This will change the output for all of them.
> 
> Yes, it works for other shift mnemonics. Verified...
> 

OK. Would it be possible to just add this mnemonic to your assembler project? It's not unlikely just an inadvertent omission that it didn't have it already since it knows about the other shift aliases.

If we really need to change to compiler output instead, we should make sure to only change the rrx mnemonic, not all of the aliased mov instructions.

-Jim



More information about the llvm-dev mailing list