GMP 5.0.5 build fails with tcc due to x86_64 asm (unknown register...)

Vincent Lefevre vincent at vinc17.net
Mon Jun 18 16:48:24 CEST 2012


The GMP 5.0.5 build fails with tcc 0.9.25 on a Debian/unstable
amd64 (x86_64) machine:

make[2]: Entering directory `/home/vlefevre/gmp-5.0.5/mpn'
/home/vlefevre/dash/bin/dash ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" tcc -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo add_n | sed 's/_$//'`      `test -f 'add_n.asm' || echo './'`add_n.asm
libtool: compile:  ../mpn/m4-ccas --m4=m4 tcc -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_add_n add_n.asm  -DPIC -o .libs/add_n.o
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_add_n -DPIC add_n.asm >tmp-add_n.s
 tcc -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_add_n tmp-add_n.s -DPIC -o .libs/add_n.o
tmp-add_n.s:81: error: unknown register

The line is:

        bt      $0, %r8                 

but if I remove this line, I get:

tst.s:82: error: unknown opcode 'jrcxz'

for the line:

        jrcxz   Llt4

It seems that tcc has a very limited asm support (perhaps only 32-bit
x86?). This should be tested in configure.

$ uname -a
Linux ypig 3.2.0-2-amd64 #1 SMP Mon Jun 11 17:24:18 UTC 2012 x86_64 GNU/Linux
$ ./config.guess
coreinhm-unknown-linux-gnu
$ sh ./configfsf.guess
x86_64-unknown-linux-gnu

Attached config.log compressed with xz and config.m4 files.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.xz
Type: application/octet-stream
Size: 27284 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20120618/5d09c25c/attachment-0001.obj>
-------------- next part --------------
dnl config.m4.  Generated automatically by configure.
changequote(<,>)
ifdef(<__CONFIG_M4_INCLUDED__>,,<
define(<CONFIG_TOP_SRCDIR>,<`../.'>)
define(<WANT_ASSERT>,0)
define(<WANT_PROFILING>,<`no'>)
define(<M4WRAP_SPURIOUS>,<no>)
define(<TEXT>, <.text>)
define(<DATA>, <.data>)
define(<LABEL_SUFFIX>, <:>)
define(<GLOBL>, <.globl>)
define(<GLOBL_ATTR>, <>)
define(<GSYM_PREFIX>, <>)
define(<RODATA>, <.data>)
define(<TYPE>, <.type	$1,@$2>)
define(<SIZE>, <>)
define(<LSYM_PREFIX>, <L>)
define(<W32>, <.long>)
define(<ALIGN_LOGARITHMIC>,<no>)
define(<ALIGN_FILL_0x90>,<yes>)
define(<SQR_TOOM2_THRESHOLD>,<32>)
define(<SIZEOF_UNSIGNED>,<4>)
define(<GMP_LIMB_BITS>,64)
define(<GMP_NAIL_BITS>,0)
define(<GMP_NUMB_BITS>,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))
>)
changequote(`,')
ifdef(`__CONFIG_M4_INCLUDED__',,`
include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4')
include_mpn(`x86_64/x86_64-defs.m4')
define_not_for_expansion(`HAVE_HOST_CPU_x86_64')
define_not_for_expansion(`HAVE_ABI_64')
define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN')
define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')
')
define(`__CONFIG_M4_INCLUDED__')


More information about the gmp-bugs mailing list