This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
"Could not find a spill register" problem with ns32k; gcc 2.95.3
- To: gcc-bugs at gcc dot gnu dot org
- Subject: "Could not find a spill register" problem with ns32k; gcc 2.95.3
- From: Simon Burge <simonb at wasabisystems dot com>
- Date: Sun, 23 Sep 2001 10:58:54 +1000
- Organization: Wasabi Systems, Inc.
Hi,
I'm playing with bringing my pc532 (ns32532-based) box up to gcc 2.95.3.
Here's the complete version:
Reading specs from /usr/local/lib/gcc-lib/ns32k-netbsd/2.95.3/specs
gcc version 2.95.3 20010315 (release)
To get 2.95.3 to build, I needed to delete the
xm_file="${xm_file} ns32k/xm-netbsd.h"
line from the "ns32k-*-netbsd*" case in configure.in/configure. The
configure line (configured as part of a script) is
/usr/src/gnu/dist/toolchain/configure \
--with-gcc-version-trigger=/usr/src/gnu/dist/toolchain/gcc/version.c \
--host=ns32k-unknown-netbsd1.5X --target=ns32k-netbsd --norecursion
When I tried to compile one of the NetBSD kernel files, I got a "Could
not find a spill register" error. The source code below is a cut-down
version that reproduces the error (this contains a few warnings, the
original code did not). Here's a run with the error:
pc532:~ 1285> /usr/local/gnu/bin/cc -v -O -c nfs_vnops.c
Reading specs from /usr/local/lib/gcc-lib/ns32k-netbsd/2.95.3/specs
gcc version 2.95.3 20010315 (release)
/usr/local/lib/gcc-lib/ns32k-netbsd/2.95.3/cpp0 -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dns32k -Dns32000 -Dns32532 -D__NetBSD__ -Dpc532 -D__ns32k__ -D__KPRINTF_ATTRIBUTE__ -D__ns32k__ -D__ns32000__ -D__ns32532__ -D__NetBSD__ -D__pc532__ -D__ns32k__ -D__KPRINTF_ATTRIBUTE__ -D__ns32k -D__ns32000 -D__ns32532 -D__pc532 -Asystem(unix) -Asystem(NetBSD) -Acpu(ns32k) -Amachine(ns32k) -D__OPTIMIZE__ nfs_vnops.c /var/tmp/ccTjGYUY.i
GNU CPP version 2.95.3 20010315 (release) (32000, GAS syntax)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc-lib/ns32k-netbsd/2.95.3/include
/usr/local/lib/gcc-lib/ns32k-netbsd/2.95.3/../../../../ns32k-netbsd/include
End of search list.
The following default directories have been omitted from the search path:
/usr/local/lib/gcc-lib/ns32k-netbsd/2.95.3/../../../../include/g++-3
/usr/local/lib/gcc-lib/ns32k-netbsd/2.95.3/../../../../ns32k-netbsd/sys-include
End of omitted list.
/usr/local/lib/gcc-lib/ns32k-netbsd/2.95.3/cc1 /var/tmp/ccTjGYUY.i -quiet -dumpbase nfs_vnops.c -O -version -o /var/tmp/ccfMz9Ui.s
GNU C version 2.95.3 20010315 (release) (ns32k-netbsd) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
nfs_vnops.c: In function `foo':
nfs_vnops.c:44: Could not find a spill register
(insn 97 96 98 (set (mem:SI (plus:SI (reg/v:SI 5 r5)
(reg:SI 47)) 0)
(mem:SI (reg/v:SI 31) 0)) 15 {movsi} (insn_list 96 (nil))
(expr_list:REG_DEAD (reg:SI 47)
(nil)))
If I use "-O0" or "-O2" instead of "-O", the file compiles successfully.
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD CDs, Support and Service: http://www.wasabisystems.com/
----------------------------------- cut here -----------------------------------
struct s1 {
int s1len;
};
int
foo(int *p1)
{
struct s1 *s1;
int i1, i2, i3, i4, i5, i6, i7, i8, *ip1, *ip2;
while (i6 && i1) {
if (i5)
ip2 = ip1;
else {
i2 = i5;
foo3(i5);
goto out;
}
while (i6 && i1) {
if (i5)
ip2 = (ip1);
else if ((i5 = foo1()) != 0) {
i2 = i5;
foo3(i5);
goto out;
}
i4 = *ip2;
i7 = i8;
if (i8 > i3)
*((int *)((char *)s1 + s1->s1len)) = *p1;
if (i1) {
s1->s1len = i7;
if (i4 > 0 && (i5 = foo2(&i5, i4)) != 0) {
i2 = i5;
foo3(i5);
goto out;
}
}
}
}
out:
return (i2);
}