[PATCH] Small fix for umul_ppmm on ARM

Ken Werner ken.werner at linaro.org
Wed Dec 21 21:51:09 CET 2011


On 12/21/2011 08:51 PM, Werner Koch wrote:
> On Wed, 21 Dec 2011 18:18, ken.werner at linaro.org said:
>
>> This code generates the following assembler error message when compiling
>> for -march=armv5te:
>>    Error: selected processor does not support Thumb mode `umull r5,ip,r5,r3'
>
> What cpp macro is defined for this architecure?  I would feel better not
> to change 10 years old code, if there is a way to avoid it.

$ arm-linux-gnueabi-cpp -march=armv5te -dM /dev/null|grep ARCH
#define __ARM_ARCH_5TE__ 1

However, initially I thought it's  because of the inline assembly and I 
wrote that tiny patch. But I just noticed when using the toolchain I've 
got that even the following code:

   unsigned int foo (unsigned int xh, unsigned int xl, unsigned int a, 
unsigned int b) {
     __asm__ ("%@ Inlined umul_ppmm\n"
              "umull %r1, %r0, %r2, %r3"
                      : "=&r" (xh), "=&r" (xl)
                      : "r" (a), "r" (b)
                      : "r0", "r1");
     return xl;
   }

results in:
   Assembler messages:
   Error: selected processor does not support Thumb mode `umull r4,r5,r2,r3'

It doesn't occur when using the CSL 2011.03 for example. So, I suspect a 
toolchain bug. I'll investigate further.

Regards,
Ken



More information about the Gcrypt-devel mailing list