public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs-1.0.2 wrongly detect a Pentium II as a i386 on SCO5 - patch included
@ 1998-04-27 14:44 Joao Cardoso
  1998-04-28 15:33 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Joao Cardoso @ 1998-04-27 14:44 UTC (permalink / raw)
  To: egcs

Hi,

On sco-3.2v5.0.4 `configure' wrongly detect a Pentium II as a i386.
uname output:

# uname -X

System = SCO_SV
Node = merlin
Release = 3.2v5.0.4
KernelID = 97/09/03
Machine = Pent II
BusType = ISA
Serial = 4EL025833
Users = 5-user
OEM# = 0
Origin# = 1
NumCPU = 1

I don't know if this has any implications on code generation. A simple
 `gcc -S foo.c' report `-mcpu=i386 -march=pentium'

Also, I don't know if UNAME_MACHINE should be set to i586 ou i686? In
 the simple diff to the top config.guess that I include, I set it to
 i586. Please change if appropriate.


*** config.guess- Mon Apr 27 17:28:31 1998
--- config.guess Mon Apr 27 17:29:12 1998
***************
*** 674,680 ****
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
                UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*=
//')`
                (/bin/uname -X|egrep i80486 >/dev/null) &&
UNAME_MACHINE=i486
!               (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
                        && UNAME_MACHINE=i586
                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
        else
--- 674,680 ----
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
                UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*=
//')`
                (/bin/uname -X|egrep i80486 >/dev/null) &&
UNAME_MACHINE=i486
!               (/bin/uname -X|egrep '^Machine.*Pent' >/dev/null) \
                        && UNAME_MACHINE=i586
                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
        else


Thanks,
Joao

-- 
Joao Cardoso			|	e-mail: jcardoso@inescn.pt
INESC, R. Jose Falcao 110	|	tel:	+ 351 2 2094345
4000 PORTO, PORTUGAL		|	fax:	+ 351 2 2008487

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: egcs-1.0.2 wrongly detect a Pentium II as a i386 on SCO5 - patch included
@ 1998-04-29  7:57 Michael Meissner
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Meissner @ 1998-04-29  7:57 UTC (permalink / raw)
  To: jcardoso, tv; +Cc: egcs

| On Mon, 27 Apr 1998, Joao Cardoso wrote:
|
| : On sco-3.2v5.0.4 `configure' wrongly detect a Pentium II as a i386.
|
| This is actually half correct.

Well if you look at config.guess, you will see that it gets the information
from /usr/options/cb.name if it exists, and /bin/uname -X if it does not.
Somebody who has a SCO system with a Pentium-II will have to supply us with the
appropriate lines to use, since there is no telling what an OS might choose to
report.

| : I don't know if this has any implications on code generation. A simple
| :  `gcc -S foo.c' report `-mcpu=i386 -march=pentium'
|
| The -march= is what really matters.  All i[3456]86 based chips are, at their
| base, considered `i386' processors, but the architecture can be set for code
| generation as gcc does above.  The actual architecture name is i386, not
| i586 or i686.
|
| When it comes down to it, a machine name such as `i586-pc-linux' is
| incorrect.  `configure' just happily accepts it and treats it as
| `i386-pc-linux'.  Same goes for SCO.

Wrong.  If you configure for i386-pc-linux, it will default the scheduling
parameters to be an i386.  If you configure for i585-pc-linux, it will default
the scheduling parameters to be a Pentium classic.  Similarly for
i686-pc-linux, it will default for a Pentium-{Pro,II}.  For example, when
compiling for a i386, the compiler believes the fastest way to push a value in
memory is to execute a single push instruction, while for all machines higher
than a i386, it loads the value into a register and then does a push.

--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-05-03 22:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-27 14:44 egcs-1.0.2 wrongly detect a Pentium II as a i386 on SCO5 - patch included Joao Cardoso
1998-04-28 15:33 ` Richard Henderson
1998-04-28 19:49 ` Todd Vierling
1998-05-03 22:02 ` Jim Wilson
1998-04-30 20:03   ` Joao Cardoso
1998-04-29  7:57 Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).