This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: New approach to --with-cpu, take 4


On Thu, Aug 01, 2002 at 02:41:22PM -0700, cgd@broadcom.com wrote:
> At Thu, 1 Aug 2002 20:19:26 +0000 (UTC), "Daniel Jacobowitz" wrote:
> > +/* This is not quite correct, because -mips16 will override a default
> > +   architecture.  This is an unfortunate consequence of -mips16 being
> > +   completely orthogonal to the other -mipsN switches, yet sometimes
> > +   overriding them on the command line.  */
> > +#define TARGET_DEFAULT_ARCH_P() \
> > +  (! option_present (*argcp, *argvp, "-march=") \
> > +   && (! option_present (*argcp, *argvp, "-mips") \
> > +       || option_present (*argcp, *argvp, "-mips16")))
> 
> Err, the comment here should be more clear.  (it looks like maybe you
> updated the code and not the comment?)
> 
> Also, the code isn't right: if you have -mips3 -mips16 on the command
> line, it looks like TARGET_DEFAULT_ARCH_P will be true.

See the earlier discussion with Richard about this.  Right now, if you
have -mips3 -mips16 on the command line, you won't get -mips3 code :)
At least that's what I was told.

The comment could use some thinking though.

> (This "adding an option if no override is specified" thing seems
> ... iffy to me.  it seems like the right thing to do would be have a
> common place in the confugury for *_DEFAULT macros to be set, then do
> the right thing w/ them in the MD code.  also, right now, you're

We've tried that.  In fact, we've tried it for years and years, and the
right thing has almost never been done in the MD code.  That's why I
want to do it this way; this way the default architecture isn't
"special" in any way.

> leaving all of the code in the MD bits which deal with the current
> default mechanism, too.  That seems undesirable.)

Yeah.  That I was going to clean up in a separate pass.

> (personally i dunno that i like the ability to set these via
> --with-xxx, but if others like it, "whatever."  8-)

I use it constantly; it's a real timesaver.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]