Karel Gardas
2011-Sep-03 07:47 UTC
[LLVMdev] The right option combination to compile into ARM/Thumb2 code.
Hello, I'm trying to convince llc to compile into thumb2 ISA on ARMv7. I'm using: -march=thumb -mattr=v7,thumb2,vfp3 but llc complains about this with: llc: error: invalid target 'thumb -mattr=v7,thumb2,vfp3' I'm using LLVM from Aug 29 2011. To me the set of options looks sane so I'd like to ask what's wrong with this. Thanks! Karel
James Molloy
2011-Sep-03 08:46 UTC
[LLVMdev] The right option combination to compile into ARM/Thumb2 code.
Hi Karel, It actually looks like the argument parser has parsed "thumb -mattr=v7,thumb2,vfp3" as the full argument to "-march=". Strange. The easiest way to get what you want is probably "-mtriple thumbv7--". v7 has Thumb2 enabled and VFPv3 (along with NEON) by default. Cheers, James ________________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] On Behalf Of Karel Gardas [karel.gardas at centrum.cz] Sent: 03 September 2011 08:47 To: LLVM Developers Mailing List Subject: [LLVMdev] The right option combination to compile into ARM/Thumb2 code. Hello, I'm trying to convince llc to compile into thumb2 ISA on ARMv7. I'm using: -march=thumb -mattr=v7,thumb2,vfp3 but llc complains about this with: llc: error: invalid target 'thumb -mattr=v7,thumb2,vfp3' I'm using LLVM from Aug 29 2011. To me the set of options looks sane so I'd like to ask what's wrong with this. Thanks! Karel _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Karel Gardas
2011-Sep-03 08:58 UTC
[LLVMdev] The right option combination to compile into ARM/Thumb2 code.
Hi James, On 09/ 3/11 10:46 AM, James Molloy wrote:> Hi Karel, > > It actually looks like the argument parser has parsed "thumb -mattr=v7,thumb2,vfp3" as the full argument to "-march=". Strange.thanks a lot for this remark. It actually solved my issue. It was caused by me telling GHC to pass all those params by using one -optlc parameter but this indeed results in llc receiving whole this string as one parameter. So instead of wrong: -optlc="-march=thumb -mattr=v7,thumb2,vfp3" I need to use: -optlc=-march=thumb -optlc=-mattr=v7,thumb2,vfp3 where -optlc passes its argument to llc command. Thanks! Karel
Reasonably Related Threads
- [LLVMdev] The right option combination to compile into ARM/Thumb2 code.
- [LLVMdev] ARM issue: Trying to add an operand to a machine instr that is already done!
- [LLVMdev] ARM issue: Trying to add an operand to a machine instr that is already done!
- [LLVMdev] ARM issue: Trying to add an operand to a machine instr that is already done!
- [LLVMdev] Question about arm thumb2 code generation