Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-11 Thread Kris Kennaway

On Tue, Sep 10, 2002 at 09:41:56PM -0700, David O'Brien wrote:

 +.  if ${CPUTYPE} == athlon-mp || ${CPUTYPE} == athlon-xp || ${CPUTYPE} == 
athlon-4 || ${CPUTYPE} == athlon
 +_CPUCFLAGS = -march=${CPUTYPE}
  .  elif ${CPUTYPE} == k6-3
  _CPUCFLAGS = -march=k6-3
  .  elif ${CPUTYPE} == k6-2

Why stop there?  Nearly all of the CPUTYPE values are the same as
their -march commands.

 +. if ${CPUTYPE} == athlon-mp || ${CPUTYPE} == athlon-xp || ${CPUTYPE} == 
athlon-4
 +MACHINE_CPU = athlon-xp k7 3dnow see mmx k6 k5 i586 i486 i386

^^^ typo

 +. elif ${CPUTYPE} == athlon || ${CPUTYPE} == athlon-tbird
 +MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386

Can you think of a situtation where the athlon/athlon-xp capabilities
would need to be tested?  i.e. what would they be used for?

Kris



msg36876/pgp0.pgp
Description: PGP signature


Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-11 Thread David O'Brien

On Wed, Sep 11, 2002 at 10:56:48AM -0700, Kris Kennaway wrote:
  +. elif ${CPUTYPE} == athlon || ${CPUTYPE} == athlon-tbird
  +MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386
 
 Can you think of a situtation where the athlon/athlon-xp capabilities
 would need to be tested?  i.e. what would they be used for?
 
I do not quite understand the question.  Are you asking if there are any
differences between athlon and athlon-xp?  Or are you maybe asking if
there are any differences between athlon-4, athlon-xp, and athlon-mp?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-10 Thread David O'Brien

On Fri, Sep 06, 2002 at 06:08:23PM -0700, Maxime Henrion wrote:
 Forgot that one.  Here is an updated patch.  I'm quite sure that on the
 Intel side, only the pentium 4 have sse2, but I don't know if any AMD
 chip supports it yet.  The attached patch only adds it for p4's.

Athlon-{X,M}P support SSE[1].  AMD x86-64 will be the first AMD processor
to support SSE2.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-10 Thread David O'Brien

On Fri, Sep 06, 2002 at 01:30:26PM -0700, Kris Kennaway wrote:
  `-mcpu=CPU-TYPE'
   Tune to CPU-TYPE everything applicable about the generated code,
   except for the ABI and the set of available instructions.  The
   choices for CPU-TYPE are `i386', `i486', `i586', `i686',
   `pentium', `pentium-mmx', `pentiumpro', `pentium2', `pentium3',
   `pentium4', `k6', `k6-2', `k6-3', `athlon', `athlon-tbird',
   `athlon-4', `athlon-xp' and `athlon-mp'.
  
  You can also add -msse, -msse2, -m3dnow to use those extensions. It would
  appear that our bsd.cpu.mk file is out of date and is missing the newer
  cpu types.
 
 How about the following patch (I've only tested 'pentium3'):

I'd like to commit these Athlon changes.  I find this much easier to
understand.


Index: bsd.cpu.mk
===
RCS file: /home/ncvs/src/share/mk/bsd.cpu.mk,v
retrieving revision 1.18
diff -u -r1.18 bsd.cpu.mk
--- bsd.cpu.mk  7 Sep 2002 01:26:10 -   1.18
+++ bsd.cpu.mk  8 Sep 2002 23:25:51 -
@@ -42,16 +42,8 @@
 #  http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html
 
 . if ${MACHINE_ARCH} == i386
-.  if ${CPUTYPE} == athlon-mp
-_CPUCFLAGS = -march=athlon-mp
-.  elif ${CPUTYPE} == athlon-xp
-_CPUCFLAGS = -march=athlon-xp
-.  elif ${CPUTYPE} == athlon-4
-_CPUCFLAGS = -march=athlon-4
-.  elif ${CPUTYPE} == athlon-tbird
-_CPUCFLAGS = -march=athlon-tbird
-.  elif ${CPUTYPE} == athlon
-_CPUCFLAGS = -march=athlon
+.  if ${CPUTYPE} == athlon-mp || ${CPUTYPE} == athlon-xp || ${CPUTYPE} == 
+athlon-4 || ${CPUTYPE} == athlon
+_CPUCFLAGS = -march=${CPUTYPE}
 .  elif ${CPUTYPE} == k6-3
 _CPUCFLAGS = -march=k6-3
 .  elif ${CPUTYPE} == k6-2
@@ -105,16 +97,10 @@
 # presence of a CPU feature.
 
 .if ${MACHINE_ARCH} == i386
-. if ${CPUTYPE} == athlon-mp
-MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
-. elif ${CPUTYPE} == athlon-xp
-MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
-. elif ${CPUTYPE} == athlon-4
-MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
-. elif ${CPUTYPE} == athlon-tbird
-MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386
-. elif ${CPUTYPE} == athlon
-MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386
+. if ${CPUTYPE} == athlon-mp || ${CPUTYPE} == athlon-xp || ${CPUTYPE} == 
+athlon-4
+MACHINE_CPU = athlon-xp k7 3dnow see mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon || ${CPUTYPE} == athlon-tbird
+MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386
 . elif ${CPUTYPE} == k6-3
 MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386
 . elif ${CPUTYPE} == k6-2

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-06 Thread Kris Kennaway

On Tue, Aug 06, 2002 at 06:55:11PM -0700, Peter Wemm wrote:

 `-mcpu=CPU-TYPE'
  Tune to CPU-TYPE everything applicable about the generated code,
  except for the ABI and the set of available instructions.  The
  choices for CPU-TYPE are `i386', `i486', `i586', `i686',
  `pentium', `pentium-mmx', `pentiumpro', `pentium2', `pentium3',
  `pentium4', `k6', `k6-2', `k6-3', `athlon', `athlon-tbird',
  `athlon-4', `athlon-xp' and `athlon-mp'.
 
 You can also add -msse, -msse2, -m3dnow to use those extensions. It would
 appear that our bsd.cpu.mk file is out of date and is missing the newer
 cpu types.

How about the following patch (I've only tested 'pentium3'):

Index: share/mk/bsd.cpu.mk
===
RCS file: /usr/home/ncvs/src/share/mk/bsd.cpu.mk,v
retrieving revision 1.16
diff -u -r1.16 bsd.cpu.mk
--- share/mk/bsd.cpu.mk 2 Aug 2002 18:04:22 -   1.16
+++ share/mk/bsd.cpu.mk 6 Sep 2002 20:25:46 -
 -28,8 +28,8 
 CPUTYPE = i686
 .  elif ${CPUTYPE} == pentium
 CPUTYPE = i586
-.  elif ${CPUTYPE} == athlon
-CPUTYPE = k7
+.  elif ${CPUTYPE} == k7
+CPUTYPE = athlon
 .  endif
 . endif
 
 -42,20 +42,30 
 #  http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html
 
 . if ${MACHINE_ARCH} == i386
-.  if ${CPUTYPE} == k7
+.  if ${CPUTYPE} == athlon-mp
+_CPUCFLAGS = -march=athlon-mp
+.  elif ${CPUTYPE} == athlon-xp
+_CPUCFLAGS = -march=athlon-xp
+.  elif ${CPUTYPE} == athlon-4
+_CPUCFLAGS = -march=athlon-4
+.  elif ${CPUTYPE} == athlon-tbird
+_CPUCFLAGS = -march=athlon-tbird
+.  elif ${CPUTYPE} == athlon
 _CPUCFLAGS = -march=athlon
+.  elif ${CPUTYPE} == k6-3
+_CPUCFLAGS = -march=k6-3
 .  elif ${CPUTYPE} == k6-2
-_CPUCFLAGS = -march=k6
+_CPUCFLAGS = -march=k6-2
 .  elif ${CPUTYPE} == k6
 _CPUCFLAGS = -march=k6
 .  elif ${CPUTYPE} == k5
 _CPUCFLAGS = -march=pentium
 .  elif ${CPUTYPE} == p4
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium4
 .  elif ${CPUTYPE} == p3
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium3
 .  elif ${CPUTYPE} == p2
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium2
 .  elif ${CPUTYPE} == i686
 _CPUCFLAGS = -march=pentiumpro
 .  elif ${CPUTYPE} == i586/mmx
Index: share/examples/etc/make.conf
===
RCS file: /usr/home/ncvs/src/share/examples/etc/make.conf,v
retrieving revision 1.198
diff -u -r1.198 make.conf
--- share/examples/etc/make.conf2 Aug 2002 18:04:22 -   1.198
+++ share/examples/etc/make.conf6 Sep 2002 20:25:19 -
 -24,7 +24,7 
 # NO_CPU_CFLAGS variable below.
 # Currently the following CPU types are recognized:
 #   Intel x86 architecture:
-#   (AMD CPUs) k7 k6-2 k6 k5
+#   (AMD CPUs) athlon-mp athlon-xp athlon-4 athlon-tbird athlon k6-3 k6-2 k6 
+k5
 #   (Intel CPUs)   p4 p3 p2 i686 i586/mmx i586 i486 i386
 #   Alpha/AXP architecture: ev6 pca56 ev56 ev5 ev45 ev4
 #   Intel ia64 architecture: itanium



msg36772/pgp0.pgp
Description: PGP signature


Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-06 Thread Dan Nelson

In the last episode (Sep 06), Kris Kennaway said:
 How about the following patch (I've only tested 'pentium3'):
 
 Index: share/mk/bsd.cpu.mk

I've been using a similar patch ever since 3.* went into the tree with
no problems.  Haven't benchmarked the difference between pentiumpro and
the other options, either, though.


-- 
Dan Nelson
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-06 Thread Maxime Henrion

Kris Kennaway wrote:
 On Tue, Aug 06, 2002 at 06:55:11PM -0700, Peter Wemm wrote:
 
  `-mcpu=CPU-TYPE'
   Tune to CPU-TYPE everything applicable about the generated code,
   except for the ABI and the set of available instructions.  The
   choices for CPU-TYPE are `i386', `i486', `i586', `i686',
   `pentium', `pentium-mmx', `pentiumpro', `pentium2', `pentium3',
   `pentium4', `k6', `k6-2', `k6-3', `athlon', `athlon-tbird',
   `athlon-4', `athlon-xp' and `athlon-mp'.
  
  You can also add -msse, -msse2, -m3dnow to use those extensions. It would
  appear that our bsd.cpu.mk file is out of date and is missing the newer
  cpu types.
 
 How about the following patch (I've only tested 'pentium3'):
[patch ripped]

I've got a very similar patch which I believe to be a bit more complete
because it also updates the MACHINE_CPU variable which lists the
features available on a particular CPU.  I attach it to this mail.

Cheers,
Maxime


Index: bsd.cpu.mk
===
RCS file: /space2/ncvs/src/share/mk/bsd.cpu.mk,v
retrieving revision 1.16
diff -u -p -r1.16 bsd.cpu.mk
--- bsd.cpu.mk  2 Aug 2002 18:04:22 -   1.16
+++ bsd.cpu.mk  11 Aug 2002 18:46:06 -
 -28,8 +28,8  CPUTYPE = ultrasparc
 CPUTYPE = i686
 .  elif ${CPUTYPE} == pentium
 CPUTYPE = i586
-.  elif ${CPUTYPE} == athlon
-CPUTYPE = k7
+.  elif ${CPUTYPE} == k7
+CPUTYPE = athlon
 .  endif
 . endif
 
 -42,20 +42,30  CPUTYPE = k7
 #  http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html
 
 . if ${MACHINE_ARCH} == i386
-.  if ${CPUTYPE} == k7
+.  if ${CPUTYPE} == athlon-mp
+_CPUCFLAGS = -march=athlon-mp
+.  elif ${CPUTYPE} == athlon-xp
+_CPUCFLAGS = -march=athlon-xp
+.  elif ${CPUTYPE} == athlon-4
+_CPUCFLAGS = -march=athlon-4
+.  elif ${CPUTYPE} == athlon-tbird
+_CPUCFLAGS = -march=athlon-tbird
+.  elif ${CPUTYPE} == athlon
 _CPUCFLAGS = -march=athlon
+.  elif ${CPUTYPE} == k6-3
+_CPUCFLAGS = -march=k6-3
 .  elif ${CPUTYPE} == k6-2
-_CPUCFLAGS = -march=k6
+_CPUCFLAGS = -march=k6-2
 .  elif ${CPUTYPE} == k6
 _CPUCFLAGS = -march=k6
 .  elif ${CPUTYPE} == k5
 _CPUCFLAGS = -march=pentium
 .  elif ${CPUTYPE} == p4
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium4
 .  elif ${CPUTYPE} == p3
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium3
 .  elif ${CPUTYPE} == p2
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium2
 .  elif ${CPUTYPE} == i686
 _CPUCFLAGS = -march=pentiumpro
 .  elif ${CPUTYPE} == i586/mmx
 -93,8 +103,18  CFLAGS += ${_CPUCFLAGS}
 # presence of a CPU feature.
 
 .if ${MACHINE_ARCH} == i386
-. if ${CPUTYPE} == k7
+. if ${CPUTYPE} == athlon-mp
+MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon-xp
+MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon-4
+MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon-tbird
+MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon
 MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == k6-3
+MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386
 . elif ${CPUTYPE} == k6-2
 MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386
 . elif ${CPUTYPE} == k6



Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-06 Thread Kris Kennaway

On Fri, Sep 06, 2002 at 05:55:47PM -0700, Maxime Henrion wrote:

 I've got a very similar patch which I believe to be a bit more complete
 because it also updates the MACHINE_CPU variable which lists the
 features available on a particular CPU.  I attach it to this mail.

Oops, I forgot that part.  How about sse2 though?

Kris



msg36779/pgp0.pgp
Description: PGP signature


Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-06 Thread Maxime Henrion

Kris Kennaway wrote:
 On Fri, Sep 06, 2002 at 05:55:47PM -0700, Maxime Henrion wrote:
 
  I've got a very similar patch which I believe to be a bit more complete
  because it also updates the MACHINE_CPU variable which lists the
  features available on a particular CPU.  I attach it to this mail.
 
 Oops, I forgot that part.  How about sse2 though?

Forgot that one.  Here is an updated patch.  I'm quite sure that on the
Intel side, only the pentium 4 have sse2, but I don't know if any AMD
chip supports it yet.  The attached patch only adds it for p4's.

Cheers,
Maxime


Index: bsd.cpu.mk
===
RCS file: /home/ncvs/src/share/mk/bsd.cpu.mk,v
retrieving revision 1.16
diff -u -p -r1.16 bsd.cpu.mk
--- bsd.cpu.mk  2 Aug 2002 18:04:22 -   1.16
+++ bsd.cpu.mk  7 Sep 2002 01:05:43 -
 -28,8 +28,8  CPUTYPE = ultrasparc
 CPUTYPE = i686
 .  elif ${CPUTYPE} == pentium
 CPUTYPE = i586
-.  elif ${CPUTYPE} == athlon
-CPUTYPE = k7
+.  elif ${CPUTYPE} == k7
+CPUTYPE = athlon
 .  endif
 . endif
 
 -42,20 +42,30  CPUTYPE = k7
 #  http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html
 
 . if ${MACHINE_ARCH} == i386
-.  if ${CPUTYPE} == k7
+.  if ${CPUTYPE} == athlon-mp
+_CPUCFLAGS = -march=athlon-mp
+.  elif ${CPUTYPE} == athlon-xp
+_CPUCFLAGS = -march=athlon-xp
+.  elif ${CPUTYPE} == athlon-4
+_CPUCFLAGS = -march=athlon-4
+.  elif ${CPUTYPE} == athlon-tbird
+_CPUCFLAGS = -march=athlon-tbird
+.  elif ${CPUTYPE} == athlon
 _CPUCFLAGS = -march=athlon
+.  elif ${CPUTYPE} == k6-3
+_CPUCFLAGS = -march=k6-3
 .  elif ${CPUTYPE} == k6-2
-_CPUCFLAGS = -march=k6
+_CPUCFLAGS = -march=k6-2
 .  elif ${CPUTYPE} == k6
 _CPUCFLAGS = -march=k6
 .  elif ${CPUTYPE} == k5
 _CPUCFLAGS = -march=pentium
 .  elif ${CPUTYPE} == p4
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium4
 .  elif ${CPUTYPE} == p3
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium3
 .  elif ${CPUTYPE} == p2
-_CPUCFLAGS = -march=pentiumpro
+_CPUCFLAGS = -march=pentium2
 .  elif ${CPUTYPE} == i686
 _CPUCFLAGS = -march=pentiumpro
 .  elif ${CPUTYPE} == i586/mmx
 -93,8 +103,18  CFLAGS += ${_CPUCFLAGS}
 # presence of a CPU feature.
 
 .if ${MACHINE_ARCH} == i386
-. if ${CPUTYPE} == k7
+. if ${CPUTYPE} == athlon-mp
+MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon-xp
+MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon-4
+MACHINE_CPU = sse k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon-tbird
 MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == athlon
+MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386
+. elif ${CPUTYPE} == k6-3
+MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386
 . elif ${CPUTYPE} == k6-2
 MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386
 . elif ${CPUTYPE} == k6
 -102,7 +122,7  MACHINE_CPU = mmx k6 k5 i586 i486 i386
 . elif ${CPUTYPE} == k5
 MACHINE_CPU = k5 i586 i486 i386
 . elif ${CPUTYPE} == p4
-MACHINE_CPU = sse i686 mmx i586 i486 i386
+MACHINE_CPU = sse2 sse i686 mmx i586 i486 i386
 . elif ${CPUTYPE} == p3
 MACHINE_CPU = sse i686 mmx i586 i486 i386
 . elif ${CPUTYPE} == p2



Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-06 Thread Kris Kennaway

On Fri, Sep 06, 2002 at 06:08:23PM -0700, Maxime Henrion wrote:
 Kris Kennaway wrote:
  On Fri, Sep 06, 2002 at 05:55:47PM -0700, Maxime Henrion wrote:
  
   I've got a very similar patch which I believe to be a bit more complete
   because it also updates the MACHINE_CPU variable which lists the
   features available on a particular CPU.  I attach it to this mail.
  
  Oops, I forgot that part.  How about sse2 though?
 
 Forgot that one.  Here is an updated patch.  I'm quite sure that on the
 Intel side, only the pentium 4 have sse2, but I don't know if any AMD
 chip supports it yet.  The attached patch only adds it for p4's.

Looks good to me!

Kris



msg36781/pgp0.pgp
Description: PGP signature


Re: Updating bsd.cpu.mk (Re: -fomit-frame-pointer for the world build)

2002-09-06 Thread Peter Wemm

Maxime Henrion wrote:

 Kris Kennaway wrote:
  On Fri, Sep 06, 2002 at 05:55:47PM -0700, Maxime Henrion wrote:
  
   I've got a very similar patch which I believe to be a bit more complete
   because it also updates the MACHINE_CPU variable which lists the
   features available on a particular CPU.  I attach it to this mail.
  
  Oops, I forgot that part.  How about sse2 though?
 
 Forgot that one.  Here is an updated patch.  I'm quite sure that on the
 Intel side, only the pentium 4 have sse2, but I don't know if any AMD
 chip supports it yet.  The attached patch only adds it for p4's.

Both of the Hammer cpus support SSE2 FWIW.

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
All of this is for nothing if we don't go to the stars - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message