[cfe-commits] [Patch] Make Thumb triples force Thumb mode

Renato Golin rengolin at systemcall.org
Wed Jul 25 09:12:01 PDT 2012


Ok, we need to fix other parts as well, ie. make it recognizes M3 and
produce Thumb2 directly. Whatever -mthumb was doing.

I'll try again privately with Salvatore and send another patch when we're happy.

cheers,
--renato

On 25 July 2012 17:01, salvatore benedetto
<salvatore.benedetto at gmail.com> wrote:
> On Wed, Jul 25, 2012 at 5:48 PM, Renato Golin <rengolin at systemcall.org> wrote:
>> On 25 July 2012 14:59, salvatore benedetto
>> <salvatore.benedetto at gmail.com> wrote:
>>> Hmmm, I hope I'm not doing anything wrong on my side, but I've just
>>> applied your patch,
>>> recompile and test it on my host system (linux) and it still produces armv5te.
>>
>> armv57e you mean Thumb or ARM code?
>
> $ arm-none-linux-gnueabi-readelf -A testReference.o
> Attribute Section: aeabi
> File Attributes
>   Tag_CPU_name: "5TE"
>   Tag_CPU_arch: v5TE
>   Tag_ARM_ISA_use: Yes
>   Tag_THUMB_ISA_use: Thumb-1
>   Tag_ABI_FP_denormal: Needed
>   Tag_ABI_FP_exceptions: Needed
>   Tag_ABI_FP_number_model: IEEE 754
>   Tag_ABI_align_needed: 8-byte
>   Tag_ABI_align_preserved: 8-byte, except leaf SP
>   Tag_DIV_use: Not allowed
>
> which is the result I had before applying your patch.
>
> http://permalink.gmane.org/gmane.comp.compilers.llvm.devel/52030
>
> And unfortunately applying the -mthumb -march=cortex-m3 as I used to,
> now gives me an error.
>
> clang++ -ccc-host-triple thumbv7-none-eabi  -ccc-gcc-name
> arm-none-linux-gnueabi-g++  testReference.cpp -c -mthumb
> -mcpu=cortex-m3
> fatal error: error in backend: CPU: 'cortex-m3' does not support ARM
> mode execution!
>
> S.



-- 
cheers,
--renato

http://systemcall.org/



More information about the cfe-commits mailing list