Bug in gmp 5.1.1

Mark Pointing markpointing at optusnet.com.au
Sat Mar 16 09:11:58 CET 2013


Hi,
I (think I) have found a bug in gmp 5.1.1.  I was trying to compile for 
armV5 (see attached make_transcript.txt) and was getting assembler 
errors.  I downloaded v5.0.5 and make completed without errors.

Bug report details:

*Version:* 5.1.1
*
Test program to replicate bug:*
I used the following configure command:
CC=arm-unknown-linux-gnueabi-gcc CXX=arm-unknown-linux-gnueabi-g++ 
AS=arm-unknown-linux-gnueabi-as 
OBJDUMP=arm-unknown-linux-gnueabi-objdump ./configure 
--host=armv5-unknown-linux-gnueabi --prefix=/opt/ea800-toolchain/ 
--exec-prefix=/opt/ea800-toolchain/
And then:
make
*
Description of what is wrong:* Source code will not build, please see 
attachment for transcript of make errors.  Cross compiling on Ubuntu 
12.10 x86_64 for armV5 target (Asus EA-800). Note that version 5.0.5 
compiles fine using the same process.

*Stack Trace: *N/A
*
Configure options:* see above
*
Compiler version: *
Using built-in specs.
Target: arm-unknown-linux-gnueabi
Configured with: 
/home/mark/eeenote/crosstool-ng/.build/src/gcc-4.2.4/configure 
--build=x86_64-build_unknown-linux-gnu 
--host=x86_64-build_unknown-linux-gnu --target=arm-unknown-linux-gnueabi 
--prefix=/home/mark/eeenote/ea800-toolchain 
--with-sysroot=/home/mark/eeenote/ea800-toolchain/arm-unknown-linux-gnueabi//sys-root 
--enable-languages=c,c++ --disable-multilib --with-arch=iwmmxt 
--with-cpu=iwmmxt --with-tune=iwmmxt --with-float=soft 
--enable-__cxa_atexit --disable-libmudflap --enable-libgomp 
--enable-libssp --enable-threads=posix --enable-target-optspace 
--with-local-prefix=/home/mark/eeenote/ea800-toolchain/arm-unknown-linux-gnueabi//sys-root 
--disable-nls --enable-symvers=gnu --enable-c99 --enable-long-long
Thread model: posix
gcc version 4.2.4

*uname -a output (of machine doing the build):*
Linux linuxbox 3.5.0-23-generic #35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 
2013 x86_64 x86_64 x86_64 GNU/Linux

*output of running config.guess*
coreisbr-unknown-linux-gnu

*output of running configfsf.guess*
bash: ./configfsf.guess: Permission denied

*a compressed copy of config.log is attached as config.log.gz.*

*config.m4 is attached.**

**the offending file mpn/tmp-rsh1add_n.s is also attached.*


Thanks and Best Regards,
Mark Pointing.
-------------- next part --------------
mark at linuxbox:~/temp/gmp-5.1.1$ make -j4
make  all-recursive
make[1]: Entering directory `/home/mark/temp/gmp-5.1.1'
Making all in tests
make[2]: Entering directory `/home/mark/temp/gmp-5.1.1/tests'
Making all in .
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests'
Making all in devel
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests/devel'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests/devel'
Making all in mpn
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests/mpn'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests/mpn'
Making all in mpz
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests/mpz'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests/mpz'
Making all in mpq
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests/mpq'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests/mpq'
Making all in mpf
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests/mpf'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests/mpf'
Making all in rand
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests/rand'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests/rand'
Making all in misc
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests/misc'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests/misc'
Making all in cxx
make[3]: Entering directory `/home/mark/temp/gmp-5.1.1/tests/cxx'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests/cxx'
make[2]: Leaving directory `/home/mark/temp/gmp-5.1.1/tests'
Making all in mpn
make[2]: Entering directory `/home/mark/temp/gmp-5.1.1/mpn'
/bin/bash ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" arm-unknown-linux-gnueabi-gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo rsh1add_n | sed 's/_$//'`    -marm -O2 -pedantic -fomit-frame-pointer -march=armv5  `test -f 'rsh1add_n.asm' || echo './'`rsh1add_n.asm
/bin/bash ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" arm-unknown-linux-gnueabi-gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo rsh1sub_n | sed 's/_$//'`    -marm -O2 -pedantic -fomit-frame-pointer -march=armv5  `test -f 'rsh1sub_n.asm' || echo './'`rsh1sub_n.asm
libtool: compile:  ../mpn/m4-ccas --m4=m4 arm-unknown-linux-gnueabi-gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_rsh1add_n -marm -O2 -pedantic -fomit-frame-pointer -march=armv5 rsh1add_n.asm  -fPIC -DPIC -o .libs/rsh1add_n.o
libtool: compile:  ../mpn/m4-ccas --m4=m4 arm-unknown-linux-gnueabi-gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_rsh1sub_n -marm -O2 -pedantic -fomit-frame-pointer -march=armv5 rsh1sub_n.asm  -fPIC -DPIC -o .libs/rsh1sub_n.o
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_rsh1add_n -DPIC rsh1add_n.asm >tmp-rsh1add_n.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_rsh1sub_n -DPIC rsh1sub_n.asm >tmp-rsh1sub_n.s
 arm-unknown-linux-gnueabi-gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_rsh1add_n -marm -O2 -pedantic -fomit-frame-pointer -march=armv5 tmp-rsh1add_n.s -fPIC -DPIC -o .libs/rsh1add_n.o
 arm-unknown-linux-gnueabi-gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_rsh1sub_n -marm -O2 -pedantic -fomit-frame-pointer -march=armv5 tmp-rsh1sub_n.s -fPIC -DPIC -o .libs/rsh1sub_n.o
tmp-rsh1add_n.s: Assembler messages:
tmp-rsh1add_n.s:81: Error: bad instruction `rrxs r12,r7'
tmp-rsh1add_n.s:92: Error: bad instruction `rrxs r12,r7'
tmp-rsh1add_n.s:93: Error: bad instruction `rrxs r6,r6'
tmp-rsh1add_n.s:94: Error: bad instruction `rrxs r5,r5'
tmp-rsh1add_n.s:95: Error: bad instruction `rrxs r4,r4'
tmp-rsh1add_n.s:108: Error: bad instruction `rrxs r12,r6'
tmp-rsh1add_n.s:109: Error: bad instruction `rrxs r5,r5'
tmp-rsh1add_n.s:110: Error: bad instruction `rrxs r4,r4'
tmp-rsh1add_n.s:120: Error: bad instruction `rrxs r12,r5'
tmp-rsh1add_n.s:121: Error: bad instruction `rrxs r4,r4'
tmp-rsh1add_n.s:126: Error: bad instruction `rrxs r4,r4'
tmp-rsh1sub_n.s: Assembler messages:
tmp-rsh1sub_n.s:81: Error: bad instruction `rrxs r12,r7'
tmp-rsh1sub_n.s:92: Error: bad instruction `rrxs r12,r7'
tmp-rsh1sub_n.s:93: Error: bad instruction `rrxs r6,r6'
tmp-rsh1sub_n.s:94: Error: bad instruction `rrxs r5,r5'
tmp-rsh1sub_n.s:95: Error: bad instruction `rrxs r4,r4'
tmp-rsh1sub_n.s:108: Error: bad instruction `rrxs r12,r6'
tmp-rsh1sub_n.s:109: Error: bad instruction `rrxs r5,r5'
tmp-rsh1sub_n.s:110: Error: bad instruction `rrxs r4,r4'
tmp-rsh1sub_n.s:120: Error: bad instruction `rrxs r12,r5'
tmp-rsh1sub_n.s:121: Error: bad instruction `rrxs r4,r4'
tmp-rsh1sub_n.s:127: Error: bad instruction `rrxs r4,r4'
make[2]: *** [rsh1add_n.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [rsh1sub_n.lo] Error 1
make[2]: Leaving directory `/home/mark/temp/gmp-5.1.1/mpn'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mark/temp/gmp-5.1.1'
make: *** [all] Error 2
mark at linuxbox:~/temp/gmp-5.1.1$ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.gz
Type: application/x-gzip
Size: 78615 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20130316/72926c6e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.m4
Type: application/x-m4
Size: 1153 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20130316/72926c6e/attachment-0003.bin>
-------------- next part --------------





























































  
  
  
  
  





	.text
	.align	3
	.globl	__gmpn_rsh1add_n 
	.type	__gmpn_rsh1add_n,#function
__gmpn_rsh1add_n:
	push	{r4-r11}
	ldr	r4, [r1], #4
	ldr	r8, [r2], #4
	adds	r4, r4, r8
	rrxs	r12, r7
	and	r11, r4, #1	
	subs	r3, r3, #4
	blo	.Lend

.Ltop:	ldmia	r1!, {r5,r6,r7}
	ldmia	r2!, {r8,r9,r10}
	cmn	r12, r12
	adcs	r5, r5, r8
	adcs	r6, r6, r9
	adcs	r7, r7, r10
	rrxs	r12, r7
	rrxs	r6, r6
	rrxs	r5, r5
	rrxs	r4, r4
	subs	r3, r3, #3
	stmia	r0!, {r4,r5,r6}
	mov	r4, r7
	bhs	.Ltop

.Lend:	cmn	r3, #2
	bls	.Le2
	ldm	r1, {r5,r6}
	ldm	r2, {r8,r9}
	cmn	r12, r12
	adcs	r5, r5, r8
	adcs	r6, r6, r9
	rrxs	r12, r6
	rrxs	r5, r5
	rrxs	r4, r4
	stmia	r0!, {r4,r5}
	mov	r4, r6
	b	.Le1

.Le2:	bne	.Le1
	ldr	r5, [r1, #0]
	ldr	r8, [r2, #0]
	cmn	r12, r12
	adcs	r5, r5, r8
	rrxs	r12, r5
	rrxs	r4, r4
	str	r4, [r0], #4
	mov	r4, r5

.Le1:	cmn	r12, r12
	rrxs	r4, r4
	str	r4, [r0, #0]
	mov	r0, r11
	pop	{r4-r11}
	bx	r14
	.size	__gmpn_rsh1add_n,.-__gmpn_rsh1add_n


More information about the gmp-bugs mailing list