linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benoit Poulot-Cazajous <poulot@ifrance.com>
To: "M. R. Brown" <mrbrown@0xd6.org>
Cc: nbecker@fred.net, linux-kernel@vger.kernel.org
Subject: On K7, -march=k6 is good (Was Re: Why no -march=athlon?)
Date: 19 Dec 2001 18:46:13 +0100	[thread overview]
Message-ID: <lnitb3drx6.fsf_-_@walhalla.agaha> (raw)
In-Reply-To: <x88r8ptki37.fsf@rpppc1.hns.com> <20011217174020.GA24772@0xd6.org>
In-Reply-To: <20011217174020.GA24772@0xd6.org>

"M. R. Brown" <mrbrown@0xd6.org> writes:

> * nbecker@fred.net <nbecker@fred.net> on Mon, Dec 17, 2001:
> 
> > I noticed that linux/arch/i386/Makefile says:
> > 
> > ifdef CONFIG_MK7
> > CFLAGS += -march=i686 -malign-functions=4 
> > endif
> > 
> > 
> > Why not -march=athlon?  Is this just for compatibility with old gcc?
> 
> The recommend kernel compiler is gcc 2.95.x, which doesn't support
> "-march=athlon".

But gcc-2.95,x _supports_ "-march=k6", and we should use that instead of
"-march-i686".

Obvious patch for 2.4.16 :

--- linux-2.4.16/arch/i386/Makefile	Thu Apr 12 21:20:31 2001
+++ linux-2.4.16-bpc/arch/i386/Makefile	Sun Dec 16 15:44:06 2001
@@ -63,7 +63,7 @@
 endif
 
 ifdef CONFIG_MK7
-CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; else echo "-march=i686 -malign-functions=4"; fi) 
+CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; elif $(CC) -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=k6 -malign-functions=4"; else echo "-march=i686 -malign-functions=4"; fi)
 endif
 
 ifdef CONFIG_MCRUSOE

I have tested this change, using 3 steps of the ChorusOS compilation
as benchmarks (The test first bootstrap gcc, then compiles various
cross-compilers in parallel and then uses them to build ChorusOS for
various architectures). On my XP1800+, it gives :

before the patch :
1017.92user 261.80system 24:39.89elapsed 86%CPU
706.33user 160.79system 16:23.61elapsed 88%CPU
1787.38user 418.76system 43:35.97elapsed 84%CPU

after the patch :
1018.42user 253.85system 24:44.68elapsed 85%CPU
704.89user 151.76system 16:16.14elapsed 87%CPU
1786.96user 410.76system 43:05.32elapsed 85%CPU

The improvement in system time is nice.

  -- Benoit


  reply	other threads:[~2001-12-19 17:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-17 14:59 Why no -march=athlon? nbecker
2001-12-17 15:54 ` Dominik Mierzejewski
2001-12-17 17:40 ` M. R. Brown
2001-12-19 17:46   ` Benoit Poulot-Cazajous [this message]
2001-12-19 17:56     ` On K7, -march=k6 is good (Was Re: Why no -march=athlon?) M. R. Brown
2001-12-19 18:39       ` nbecker
2001-12-19 18:47         ` M. R. Brown
2001-12-19 18:52           ` J Sloan
2001-12-19 19:01             ` Josh McKinney
2001-12-19 19:21             ` M. R. Brown
2001-12-19 19:28               ` J Sloan
2001-12-19 19:38         ` Allan Sandfeld
2001-12-19 21:40       ` Benoit Poulot-Cazajous
2001-12-19 20:33 RaúlNúñez de Arenas Coronado
2001-12-20  0:06 ` Alessandro Suardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lnitb3drx6.fsf_-_@walhalla.agaha \
    --to=poulot@ifrance.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrbrown@0xd6.org \
    --cc=nbecker@fred.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).