FD_ZERO() on Linux with egcs-2.92.18
Frank Pilhofer
fp@informatik.uni-frankfurt.de
Wed Nov 4 15:23:00 GMT 1998
Hi,
the FD_ZERO() macro does not compile on Linux 2.0.31 using the current
egcs snapshot. Here's a test program:
#include <sys/time.h>
int main ()
{
fd_set set;
FD_ZERO (&set);
}
The FD_ZERO() macro resolves to
__asm__ __volatile__("cld ; rep ; stosl" :"=m"
(*(__kernel_fd_set *) ( &set )) :"a" (0),
"c" ((1024 / (8 * sizeof(unsigned long)) ) ),
"D" ((__kernel_fd_set *) ( &set )) :"cx","di") ;
and gcc then reports:
egcs-bug-2.cc: In function `int main()':
egcs-bug-2.cc:6: Invalid `asm' statement:
egcs-bug-2.cc:6: fixed or forbidden register 2 (cx) was spilled for class CREG.
My egcs version is
rose:~/uni/mico/test > g++ -v
Reading specs from
/local/pkg/egcs/19981101/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.92.18/specs
gcc version egcs-2.92.18 19981101 (gcc2 ss-980609 experimental)
I read about the new register allocation routines. Does that mean that
Linux will need "fixincludes" until the Linux kernels are fixed?
Frank
--
+ Frank Pilhofer fp@informatik.uni-frankfurt.de +
| http://www.uni-frankfurt.de/~fp/ |
+---- Life would be a very great deal less weird without you. - DA ----+
More information about the Gcc-bugs
mailing list