Subject: Re: default optimization
To: Wojciech Puchar <wojtek@wojtek.from.pl>
From: SAITOH Masanobu <masanobu@iij.ad.jp>
List: port-i386
Date: 01/23/2001 06:30:03
 Sorry, I had been misunderstanding.

 > > I seem to remember the same thing -- I thought that it was the
 > > '-march=...' flag that did the 'CPU code generation' thing.
 > ------from gcc.info---------
 > 
 > `-mcpu=CPU TYPE'
 >      Assume the defaults for the machine type CPU TYPE when scheduling
 >      instructions.  The choices for CPU TYPE are:
 > 
 >      `i386'        `i486'        `i586'        `i686'        
 >      `pentium'     `pentiumpro'  `k6'                        
 > 
 >      While picking a specific CPU TYPE will schedule things
 >      appropriately for that particular chip, the compiler will not
 >                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >      generate any code that does not run on the i386 without the
 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >      `-march=CPU TYPE' option being used.  `i586' is equivalent to
 >      `pentium' and `i686' is equivalent to `pentiumpro'.  `k6' is the
 >      AMD chip as opposed to the Intel ones.
 > 
 > `-m386'
 > `-m486'
 > `-mpentium'
 > `-mpentiumpro'
 >      Synonyms for -mcpu=i386, -mcpu=i486, -mcpu=pentium, and
 >      -mcpu=pentiumpro respectively.  These synonyms are deprecated.

"gcc -Q -v tst.c" shows:

------
 /usr/libexec/cc1 /tmp/cclGvoqB.i -dumpbase tst.c -version -o /tmp/ccyPq5c4.s
GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386-netbsd) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
options passed: 
options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
 -fpcc-struct-return -fsjlj-exceptions -fcommon -fgnu-linker
 -fargument-alias -m80387 -mhard-float -mno-soft-float -mieee-fp
 -mfp-ret-in-387 -mno-fancy-math-387 -mschedule-prologue -mcpu=i386
 -march=pentium
------

It seems our gcc defines both "-mcpu=i386" and "-march=pentium" by default.

----------------------------------------------------------
		SAITOH Masanobu (masanobu@iij.ad.jp
				  msaitoh@netbsd.org)