Assembler failure on 16-bit ARM Thumb-1 build

Marc Glisse marc.glisse at inria.fr
Sat Mar 19 23:35:45 CET 2011


On Sat, 19 Mar 2011, Mike Mohr wrote:

> The configure script finishes as before, but when make is started the
> build fails fairly quickly as follows:
>
> libtool: compile:  arm-linux-androideabi-gcc -std=gnu99 -c
> -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_dive_1
> -O2 -mthumb -Wa,--noexecstack dive_1.s  -fPIC -DPIC -o .libs/dive_1.o
> dive_1.s: Assembler messages:
> dive_1.s:73: Error: selected processor does not support `umull r8,r5,r4,r3'
> dive_1.s:183: Error: selected processor does not support `umull fp,ip,r0,r3'
> make[2]: *** [dive_1.lo] Error 1
>
> Looking through the generated assembly code, the two parts that are failing are:
>
> #APP
> @ 136 "dive_1.c" 1
>        umull r8,r5,r4,r3
> @ 0 "" 2
>
> #APP
> @ 115 "dive_1.c" 1
>        umull fp,ip,r0,r3
> @ 0 "" 2
>
> Looking on lines 115 and 136 in mpn/dive_1.c shows:
>
> from mpn/dive_1.c on lines:
>  115 - umul_ppmm (h, dummy, l, divisor);
>  136 - umul_ppmm (h, dummy, l, divisor);
>
> So it appears that umul_ppmm is unsupported on thumb-1 as-is.  I know
> next to no ARM assembly, so I'm hoping that someone on this list can
> help.

umul_ppmm is a macro defined in the file longlong.h. This version of the 
code is protected by the suspicious:
#if 1 || defined (__arm_m__)    /* `M' series has widening multiply support */

I know nothing about arm or this code, but does it help if you remove "1 
||" there?

-- 
Marc Glisse


More information about the gmp-bugs mailing list