This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Map r10000 to mips4 in MIPS_ISA_LEVEL_SPEC
"Maciej W. Rozycki" <macro@linux-mips.org> writes:
> On Sun, 16 Nov 2008, Kumba wrote:
>
>> Small patch; Probably should have been a part of the R10K scheduling patch.
>>
>> gcc/
>> 2008-11-16 Joshua Kinard <kumba@gentoo.org>
>>
>> * gcc/config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): march=r10000
>> to -mips4
>
> Hmm, I'm not sure what the policy is here, but I would have thought all
> of r1[0246]000 should be mapped to -mips4. What is it good for anyway? --
> reasonable versions of GAS understand -march= as it is and I gather GCC
> itself gets it from mips_cpu_info_table[], doesn't it?
Yeah, cc1 gets it from there. The problem is that the driver itself
(gcc, g++, etc.) doesn't, and the choice of multilib depends purely on
the command-line options that the driver can see. This includes
options added by DRIVER_SELF_SPECS.
On targets like mipsisa*-elfoabi and mips-sde-elf, which have a
large choice of multilibs, it's much easier to pick the right
one if we know that a -mips* option is present. It also makes
later specs easier to write. These targets therefore include
MIPS_ISA_LEVEL_SPEC in DRIVER_SELF_SPECS.
In other words, MIPS_ISA_LEVEL_SPEC is only used for a few
configurations, and is simply a convenience for the driver.
Richard