[m-dev.] gcc abort on runtime/mercury_atomic_ops.c
Zoltan Somogyi
zs at csse.unimelb.edu.au
Mon Oct 22 13:30:08 AEST 2007
On my laptop (alys, a Dell Inspiron 9400 with an Intel T2500 CPU), I get
the following error from gcc:
../scripts/mgnuc --grade asm_fast.gc --c-debug --no-ansi -- -O0 -g -c mercury_atomic_ops.c -o mercury_atomic_ops.o
mercury_atomic_ops.c: In function `MR_compare_and_swap_word':
mercury_atomic_ops.c:22: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
The output of gcc -v is:
Reading specs from /usr/lib/gcc/i486-linux-gnu/3.4.6/specs
Configured with: ../src/configure -v --enable-languages=c,c++,f77,pascal --prefix=/usr --libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --program-suffix=-3.4 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --with-tune=pentium4 i486-linux-gnu
Thread model: posix
gcc version 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
The error goes away if I delete the -O0 from the list of command line
arguments. (I originally added it via Mmake.runtime.params, since I was
trying to debug something in the runtime.)
Does anyone know what specifically causes the incompatibility of -O0
with this inline asm code? (I mean beside the x86's lack of registers,
especially after we reserve some.)
Zoltan.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions: mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the developers
mailing list