[LLVMdev] Compile code for arm

Chris Cadwallader ccadwallader at arxan.com
Mon Dec 10 13:38:29 PST 2012


As Renato sort of pointed out, you can disable thumb with -mno-thumb. I believe NEON and VFP must be turned 'on' and are off by default. This can be done with -mfpu=neon or -mfpu=vfp<version/type>. Are you seeing VFP/NEON instructions without these flags?


On Dec 8, 2012, at 4:44 PM, Amir Yazdanbakhsh wrote:

Thanks Tim.

I just need the assembly file. Anyway, I still have problem with generating assembly for the ARM without having any thumb and other fancy instructions.

Best Regards,
A. Yazdanbakhsh

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

PhD. Student
School of Electrical and Computer Engineering
University of Wisconsin-Madison
E-mail:     yazdanbakhsh at wisc.edu<mailto:yazdanbakhsh at wisc.edu>


<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<



On Sat, Dec 8, 2012 at 3:39 PM, Tim Northover <t.p.northover at gmail.com<mailto:t.p.northover at gmail.com>> wrote:

Hi Amir,

On Dec 8, 2012 8:13 PM, "Amir Yazdanbakhsh" <amir.yazdanbakhsh at gmail.com<mailto:amir.yazdanbakhsh at gmail.com>> wrote:
> My problem is I am playing with the size of registerfile in ARM. I thought I can do it with only modifying the Target in the LLVM directory. But if it is going to use gcc-toolchain, then I need to modify them as well which is a huge work!

That sort of depends how you modify it. If you just want to look at assembly output by clang then probably nothing in GCC needs modifying. All compiling to assembly relies on is the headers, which don't really have any specific information about the number of registers.

If you want to produce valid executables in some sense, then it appears you've got two options (as well as quite a bit of work on an emulator anyway):
1. Add the registers using a currently UNDEFINED section of the instruction space. This way the existing GCC libraries will probably be functional, though you'll only be testing the efficiency of part of the system being upgraded.
2. Mangle encodings even more, in which case you will have to rebuild the libraries. Clang may or may not be capable of doing that.

Regards.

Tim

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu>         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121210/3de54afa/attachment.html>


More information about the llvm-dev mailing list