This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: MIPS support for --with-arch-32 etc.
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 16 May 2009 16:59:39 +0100
- Subject: Re: MIPS support for --with-arch-32 etc.
- References: <Pine.LNX.4.64.0905161037080.6799@digraph.polyomino.org.uk>
Thanks for doing this. Looks good.
"Joseph S. Myers" <joseph@codesourcery.com> writes:
> This patch adds support for the --with-arch-32 --with-arch-64
> --with-tune-32 --with-tune-64 configure options for MIPS.
>
> Because of the multiple MIPS ABIs, the meaning of such options is
> perhaps less obvious than for other processors - the approach I chose
> is that the -64 options are for ABIs requiring a 64-bit processor
> (ABI_NEEDS_64BIT_REGS), as the intended purpose of these options is to
> specify a 32-bit default processor for multilibs that may be run on
> non-64-bit processors and a 64-bit default processor for multilibs
> that can't run on non-64-bit processors.
Agreed, but I think this means that the dependency is really on
-mgp rather than -mabi. This only makes a difference for -mabi=eabi,
because EABI has both 32-bit and 64-bit modes. "-mabi=eabi -mgp32"
and "-mabi=eabi -mgp64" are both valid.
Since the default specs are (rightly) processed before the
default specs, I think this just means:
> +#if MIPS_ABI_DEFAULT == ABI_O64 \
> + || MIPS_ABI_DEFAULT == ABI_N32 \
> + || MIPS_ABI_DEFAULT == ABI_64
> +#define OPT_ARCH64 "mabi=32|mabi=eabi:;"
> +#define OPT_ARCH32 "mabi=32|mabi=eabi"
s/mabi=eabi/mgp32/ here
> +#else
> +#define OPT_ARCH64 "mabi=o64|mabi=n32|mabi=64"
> +#define OPT_ARCH32 "mabi=o64|mabi=n32|mabi=64:;"
and adding "|mgp64" here.
OK with those changes, thanks.
Richard