public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Toon Moene <toon@moene.indiv.nluug.nl>
To: Richard Henderson <rth@cygnus.com>
Cc: egcs@cygnus.com, hjstein@bfr.co.il
Subject: Re: EGCS vs GCC performance
Date: Tue, 20 Jan 1998 14:54:00 -0000	[thread overview]
Message-ID: <9801202151.AA16863@moene.indiv.nluug.nl> (raw)
In-Reply-To: <m24t2zbimz.fsf@blinky.bfr.co.il>

Richard Henderson <rth@cygnus.com> writes:

>> It is configured properly for EV5 machines for certain.

Harvey Stein writes:

>  What about EV56s?  I presume that the same config would
>  be fine?  And as of what date is the above the case?
>  With egcs-1.0 on redhat 4.2 I found egcs producing code
>  which ran about the same as gcc 2.7.2.1, sometimes a
>  little slower (-O2 -mcpu=21164).  I tried to build
>  egcs-971225 & pre 1.0.1, but was unable to (because redhat
>  4.2's binutils (v 2.7.0.2-4) was too old, I guess).
>  Presumably, for the same reason I couldn't use
>  -mcpu=21164a with egcs-971225.  How much of a difference
>  does -mcpu=21164 vs -mcpu=21164a make?

Richard, are you aware of the following bug report [by  
kanazawa@flab.fujitsu.co.jp (Kanazawa Yuzi) to egcs-bugs, d.d. Wed,  
7 Jan 1998 20:25:05 +0900 (JST)]

As far as I can see, his criticism about TARGET_CPU_DEFAULT is  
right, although I'm not sure enough of my knowledge about the C  
preference rules for bit operations to say that his conclusions are  
correct.

Here is his report:

====>
  I compiled snapshot 971225 on RedHat 5.0 alpha
(alphaev5-unknown-linux-gnu-gcc). When I used the compiler, I noticed
that it generated code much slower than before. It appeared that the
compiler optimized the code for EV6, though the configuration said the
cpu is EV5.

  This problem was caused by `TARGET_CPU_DEFAULT' definition created
by gcc/configure.  In my case, TARGET_CPU_DEFAULT was defined like
this.

tm.h:
#define TARGET_CPU_DEFAULT MASK_CPU_EV5|MASK_GAS


  It makes `alpha_cpu' wrong because the variable is set by the
following statement.

config/alpha/alpha.c:
  alpha_cpu
    = TARGET_CPU_DEFAULT & MASK_CPU_EV6 ? PROCESSOR_EV6
      : (TARGET_CPU_DEFAULT & MASK_CPU_EV5 ? PROCESSOR_EV5 :  
PROCESSOR_EV4);


  Since TARGET_CPU_DEFAULT is not protected by parenthesis,
`TARGET_CPU_DEFAULT & MASK_CPU_EV6' is always true. Thus alpha_cpu is
set to PROCESSOR_EV6.

  Here is my patch. Note that with this fix rather ugly definition
like (MASK_SUPPORT_ARCH|((MASK_CPU_EV5|MASK_BWX|TASK_MAX)|MASK_GAS))
can be generated. Does anybody mind that?


Wed Jan  7 14:08:47 1998  Kanazawa Yuzi <kanazawa@flab.fujitsu.co.jp>
        * gcc/configure.in: Add parenthesis to some
target_cpu_default2 definitions.

--- gcc/configure.in.orig	Thu Dec 25 08:55:51 1997
+++ gcc/configure.in	Wed Jan  7 14:08:47 1998
@@ -2672,13 +2672,13 @@
 	alpha*-*-*)
 		case $machine in
 			alphaev6*)
-				 
target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
+				 
target_cpu_default2="(MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX)"
 				;;
 			alphapca56*)
-				 
target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
+				 
target_cpu_default2="(MASK_CPU_EV5|MASK_BWX|TASK_MAX)"
 				;;
 			alphaev56*)
-				 
target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
+				 
target_cpu_default2="(MASK_CPU_EV5|MASK_BWX)"
 				;;
 			alphaev5*)
 				target_cpu_default2="MASK_CPU_EV5"
@@ -2691,7 +2691,7 @@
 			then
 				target_cpu_default2="MASK_GAS"
 			else
-				 
target_cpu_default2="${target_cpu_default2}|MASK_GAS"
+				 
target_cpu_default2="(${target_cpu_default2}|MASK_GAS)"
 			fi
 		fi
 		;;
====>

The usage of explicit parentheses is consistent the default-default  
target ...

HTH,
Toon.

  parent reply	other threads:[~1998-01-20 14:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-12 20:31 Dave Steffen
1998-01-14  4:17 ` jbuck
1998-01-15 16:06   ` David Edelsohn
1998-01-15 16:30   ` Jeffrey A Law
1998-01-17 23:02     ` Marc Lehmann
1998-01-18 21:51     ` Harvey J. Stein
1998-01-18  0:13       ` Jeffrey A Law
1998-01-19 10:12       ` Richard Henderson
1998-01-20  2:21         ` Harvey J. Stein
1998-01-20 10:07           ` Richard Henderson
1998-01-20 14:54           ` Toon Moene [this message]
1998-01-20 14:54             ` Richard Henderson

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=9801202151.AA16863@moene.indiv.nluug.nl \
    --to=toon@moene.indiv.nluug.nl \
    --cc=egcs@cygnus.com \
    --cc=hjstein@bfr.co.il \
    --cc=rth@cygnus.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).