On Wed, 2025-04-23 at 12:43 +0000, Aleksandar Rakic wrote:
> From 16b3207aed5e4846fde4f3ffa1253c65ef6ba056 Mon Sep 17 00:00:00 2001
> From: Aleksandar Rakic <[email protected]>
> Date: Wed, 23 Apr 2025 14:14:17 +0200
> Subject: [PATCH] Make MSA and microMIPS R5 unsupported
>
> There are no platforms nor simulators for MSA and microMIPS R5 so
> turning off this support for now.
>
> gcc/ChangeLog:
>
> * config/mips/mips.cc (mips_option_override): Error out for
> -mmicromips -mips32r5 -mmsa.
>
> Cherry-picked 1009d6ff7a8d3b56e0224a6b193c5a7b3c29aa5f
> from https://github.com/MIPS/gcc
>
> Signed-off-by: Matthew Fortune <[email protected]>
> Signed-off-by: Faraz Shahbazker <[email protected]>
> Signed-off-by: Aleksandar Rakic <[email protected]>
> ---
> gcc/config/mips/mips.cc | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
> index 0d3d0263f2d..23205dfb616 100644
> --- a/gcc/config/mips/mips.cc
> +++ b/gcc/config/mips/mips.cc
> @@ -20414,6 +20414,7 @@ static void
> mips_option_override (void)
> {
> int i, regno, mode;
> + unsigned int is_micromips;
>
> if (OPTION_SET_P (mips_isa_option))
> mips_isa_option_info = &mips_cpu_info_table[mips_isa_option];
> @@ -20434,6 +20435,7 @@ mips_option_override (void)
> /* Save the base compression state and process flags as though we
> were generating uncompressed code. */
> mips_base_compression_flags = TARGET_COMPRESSION;
> + is_micromips = TARGET_MICROMIPS;
> target_flags &= ~TARGET_COMPRESSION;
> mips_base_code_readable = mips_code_readable;
>
> @@ -20678,7 +20680,7 @@ mips_option_override (void)
> "-mcompact-branches=never");
> }
>
> - if (is_micromips && TARGET_MSA)
> + if (is_micromips && mips_isa_rev <= 5 && TARGET_MSA)
Why not just "TARGET_MICROMIPS && mips_isa_rev <= 5 && TARGET_MSA"?
> error ("unsupported combination: %s", "-mmicromips -mmsa");
And should this line be updated too like "-mmicromips -mmsa is only
supported for MIPSr6"?
Unfortunately the original patch is already applied and breaking even a
non-bootstrapping build for MIPS. Thus a fix is needed ASAP or we'd
revert the original patch.
--
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University