gcc 2.7.2.3 on SCO os5.0.5 - Experiences, Suggestions
Helmut Schellong
schellong@t-online.de
Mon Mar 15 11:57:00 GMT 1999
gcc 2.7.2.3 on SCO os5.0.5, installed from Skunkware98-CD
intel-pentium
---------------------------------------------------------
Experiences, Suggestions:
-------------------------
Hello,
I have worked with your 'gcc' for the first time
and have compared it with 'icc' and 'cc'.
Current start script see below.
Experiences:
==============================================================
step (separate) code size speed
--------------------------------------------------------------
-O1 --- +++
-O2 ++ --
-O3 +++ --
BEGIN 131000 .82s
-funsigned-char - +
-fwritable-strings (.text->.data) . ++
jump_tables .text --> .data . ++
-malign-loops=0 -malign-jumps=0 --- +
-malign-functions=2
-fomit-frame-pointer -- +
-fforce-mem - .
-fcaller-saves - +
-m386 - +
((regparm(1))) #few - +
((regparm(2))) #few + -
((regparm(1))) #more - Bugs!
-mrtd --- (++?)
-fcall-saved-ebx -fcall-saved-esi --- (++?)
-fcall-saved-edi
with frame ptr -fcall-saved-ecx!
-fcall-saved-ebx -fcall-saved-esi -- (+?)
-fcall-saved-edi
without fr_ptr -fcall-saved-ecx!
END 116100 .65s
icc (optimized) 156000 .72s
cc (optimized) 123000 .79s
==============================================================
Suggestions:
------------
sometimes: movzbl --> xorl eax,eax ; movb bl,al
movzbl 4(ebx), esi is okay (mem)
Add option:
-fjumptables-data
(see above)
Add options:
-fcall-saved-static
-fcall-saved-public
-fcall-saved-extern
(-fcaller-saves is the little brother)
-fcall-used-static
-fcall-used-public
-fcall-used-extern
-mrtd-static
-mrtd-public
-mrtd-extern
-mregparm-static
-mregparm-public
-mregparm-extern
Reason: the affected options normally are not applicable
because of the global effect (libraries)!
(Add option:
-S -fasm-merge-c-source)
Nota:
-----
icc and cc put string literals and jump tables
into .data-sector per default or without choice.
Putting into .text is bad on pentium.
(into .rodata would be perfect, but...)
Failed:
-------
((stdcall,cdecl)) do not work and additionally
cancel all other attributes.
((regparm(n))) works with small functions
they not contain any call.
Otherwise --> SIGSEGV,...
======================================================
:
set -f
RW=-fwritable-strings
gcc -m386 -funsigned-char -s -mcoff -O1 $RW \
-Wall -fverbose-asm \
-Wno-uninitialized -Wno-parentheses -Wno-char-subscripts \
-Wpointer-arith -Wcast-align \
-Wwrite-strings \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wmissing-declarations \
-malign-loops=0 -malign-jumps=0 -malign-functions=2 \
-fomit-frame-pointer \
-fforce-mem \
-fcaller-saves \
-I/u/l/h $* -lx
#-malign-double \
#-fexpensive-optimizations \
#-mreg-alloc=acdbSDB \
#-fno-defer-pop \
#-fcall-saved-ebx \
#-fcall-saved-esi \
#-fcall-saved-edi \
#-fcall-saved-ecx \
#-fcall-used-ecx \
#-fforce-addr \
#-Wconversion \
#-Wnested-externs \
#-ffast-math \
#-Wcast-qual \
#-Wshadow -Wredundant-decls \
======================================================
--
Mit freundlichen GrüÃÂen
Helmut Schellong
post@schellong.de
http://www.schellong.de
More information about the Gcc
mailing list