This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Long term code compactness regression


On Sat, Oct 27, 2001 at 12:46:52AM +0200, Jan Hubicka wrote:
> For i386, you may try -mpreferred-stack-boundary=2 that is the most common
> cause of code size growth on 2.95.0+ compilers for i386.

I ran my tests again with -mpreferred-stack-boundary=2 where
available.

gcc version		options								size
2.7.2.3			-O2									214284
3.0.2			-O2 -mpreferred-stack-boundary=2	212844
2.95.4-pre		-O2	-mpreferred-stack-boundary=2	204076
HEAD			-O2 -mpreferred-stack-boundary=2	202616

Well, that is looking better!

I did have the problem that gcc from HEAD ICE'd on telnet.c:

/usr/local/gcc/bin/gcc -I /home/aaronl/src/busybox/newbus/include -Wall -Wstrict-prototypes -Wshadow -Os -fomit-frame-pointer -D_GNU_SOURCE  -mpreferred-stack-boundary=2   -c -o telnet.o telnet.c
[snip warnings]
telnet.c: In function `telnet_main':
telnet.c:627: Internal compiler error in eliminate_regs, at reload1.c:2576
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

I wanted to submit the preprocessed source, but, oddly, the problem
does not occur when I preprocess the source using cpp. When I used gcc
-E, the preprocessed source did exhibit the problem. I ran diff on the
two outputs and it seems that only gcc -E would expand things such as
htons():

-        addr->sin_port = htons(port);
+        addr->sin_port = (__extension__ ({ register unsigned short int __v; if (__builtin_constant_p (port)) __v = ((((port) >> 8) & 0xff) | (((port) & 0xff) << 8)); else __asm__ __volatile__ ("rorw $8, %w0" : "=r" (__v) : "0" ((unsigned short int) (port)) : "cc"); __v; %})); 

I'm not sure why, but I've put the one that does exhibit the problem
up at http://people.debian.org/~aaronl/telnet.gcc-E.i.gz. It will
cause an ICE when compiled with -O[23s], on gcc 3.1 20011026
(experimental).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]