[ColdFire 9/63] Add -mcpu, -march, -mtune, and related options

Roman Zippel zippel@linux-m68k.org
Thu Apr 19 13:22:00 GMT 2007


Hi,

On Thu, 19 Apr 2007, Richard Sandiford wrote:

> Roman Zippel <zippel@linux-m68k.org> writes:
> > 4.1 has a TARGET_OS_CPP_BUILTINS in linux.h which defines it 
> > unconditionally (so it's even defined with -m68000 :) ).
> 
> OK, feel free to add that back from my point of view.
> 
> I think what m68k.h itself now does is the same as what it used to do
> (for the option combinations that were available in older compilers).
> It sounds like you might disagree with that behaviour.  If so, feel free
> to change it from my point of view: I don't have an opinion either way.
> We already have a set of macros for ColdFire that provide the
> architecture and tuning info we need.

Well, I just think there are pretty useless. It would be nice to have 
something that maps more directly to -march, I'll have to think about it.

> I meant off-list discussions, sorry.  It was being suggested that ARM
> was the correct way for these things to be handled (and that, for example,
> MIPS ought to have a -mcpu option.)

I looked over the other ports and ARM is quite unique in this behaviour. 
i386 is unique in that -mcpu maps to -mtune (historical reasons I guess).
Everything else has -mcpu and/or -march with an optional -mtune and I 
would strongly tend to do the same (with the weak tendency to just use 
-march).

> > Well, that's the simple case, it gets more complicated if you want to 
> > optimize for a range of cpus via march/mtune.
> 
> As far as I know, there was no intention of optimising for a _range_ of
> ColdFire CPUs.
> 
> We only have single-processor -mtune settings on MIPS, and I've never
> seen any complaints about that.  Trying to support -mtune settings for a
> range of processors, making decisions that offset one against the other,
> sounds far too complicated in general.  I realise that's what 68020-40
> and 68020-60 do, but that's thankfully a small set.

There is maybe a little misunderstanding, I don't care about arbitrary 
ranges. I'd like something closer to primary targets like ppc/sparc or 
mips, where one option defines the basic instruction set and another 
option defines how they are used.
-m68020-[46]0 could IMO just map to -mtune=generic.

>  (And it sounds like
> there's doubt about what even those two combined tuning settings should
> mean.)

Well, -m68020-60 would just disable a few more instructions, which are 
emulated on a 68060.

bye, Roman



More information about the Gcc-patches mailing list