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-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
  2 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 1998-04-28 15:33 UTC (permalink / raw)
  To: Joao Cardoso; +Cc: egcs

On Mon, Apr 27, 1998 at 05:46:12PM +0100, Joao Cardoso wrote:
> On sco-3.2v5.0.4 `configure' wrongly detect a Pentium II as a i386.

You'd actually like to detect a p2 as an i686, since it uses the ppro core.


r~

^ 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-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
  2 siblings, 0 replies; 6+ messages in thread
From: Todd Vierling @ 1998-04-28 19:49 UTC (permalink / raw)
  To: Joao Cardoso; +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.

: 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.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)


^ 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-05-03 22:02 ` Jim Wilson
@ 1998-04-30 20:03   ` Joao Cardoso
  0 siblings, 0 replies; 6+ messages in thread
From: Joao Cardoso @ 1998-04-30 20:03 UTC (permalink / raw)
  To: Jim Wilson; +Cc: egcs

Jim Wilson wrote:
> 
> If we are going to fix this, we should get the processor right.
> Does this work?
> 

Yes. Thanks.

o At home, with Free SCO and a Pentium:

Configuring for a i586-pc-sco3.2v5.0.4 host.
Created "Makefile" in /src/compilers/egcs-1.0.2-objdir using
"/src/compilers/egcs-1.0/config/mh-sysv"
...

o At the office, with a Pentium II:

Configuring for a i686-pc-sco3.2v5.0.4 host.
Created "Makefile" in /src/egcs-1.0.2-build using
"/src/egcs-1.0.2/config/mh-sys
...

> config.guess is a shared file, so it might take me a little while to figure
> out the right way to modify it.  It isn't safe to just change EGCS's version
> of it.
> 
> Tue Apr 28 19:54:26 1998  Jim Wilson  <wilson@cygnus.com>
> 
>         * config.guess (i?86:*:3.2:*): Check for 'Pent II' and set
>         UNAME_MACHINE to i686.
> 
> Index: config.guess
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/config.guess,v
> retrieving revision 1.10
> diff -p -r1.10 config.guess
> *** config.guess        1998/04/03 16:21:56     1.10
> --- config.guess        1998/04/29 02:54:18
> *************** EOF
> *** 695,700 ****
> --- 695,702 ----
>                 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
>                 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
>                         && UNAME_MACHINE=i586
> +               (/bin/uname -X|egrep '^Machine.*Pent II' >/dev/null) \
> +                       && UNAME_MACHINE=i686
>                 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
>         else
>                 echo ${UNAME_MACHINE}-pc-sysv32

-- 
Joao Cardoso, INESC  |  e-mail:
R. Jose Falcao 110   |  tel:    + 351 2 2094345
4050 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-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
  2 siblings, 1 reply; 6+ messages in thread
From: Jim Wilson @ 1998-05-03 22:02 UTC (permalink / raw)
  To: Joao Cardoso; +Cc: egcs

If we are going to fix this, we should get the processor right.
Does this work?

config.guess is a shared file, so it might take me a little while to figure
out the right way to modify it.  It isn't safe to just change EGCS's version
of it.

Tue Apr 28 19:54:26 1998  Jim Wilson  <wilson@cygnus.com>

	* config.guess (i?86:*:3.2:*): Check for 'Pent II' and set
	UNAME_MACHINE to i686.

Index: config.guess
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/config.guess,v
retrieving revision 1.10
diff -p -r1.10 config.guess
*** config.guess	1998/04/03 16:21:56	1.10
--- config.guess	1998/04/29 02:54:18
*************** EOF
*** 695,700 ****
--- 695,702 ----
  		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
  		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
  			&& UNAME_MACHINE=i586
+ 		(/bin/uname -X|egrep '^Machine.*Pent II' >/dev/null) \
+ 			&& UNAME_MACHINE=i686
  		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
  	else
  		echo ${UNAME_MACHINE}-pc-sysv32


^ 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).