From: Aleksandar Rakic <aleksandar.ra...@htecgroup.com> 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 -mmsa for MIPSr5 and less. Cherry-picked 1009d6ff7a8d3b56e0224a6b193c5a7b3c29aa5f from https://github.com/MIPS/gcc Signed-off-by: Matthew Fortune <matthew.fort...@imgtec.com> Signed-off-by: Faraz Shahbazker <fshahbaz...@wavecomp.com> Signed-off-by: Aleksandar Rakic <aleksandar.ra...@htecgroup.com> --- gcc/config/mips/mips.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index 894baa2b7a1..538bf64e333 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -20983,6 +20983,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]; @@ -21003,6 +21004,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; @@ -21247,6 +21249,11 @@ mips_option_override (void) "-mcompact-branches=never"); } + if (is_micromips && mips_isa_rev <= 5 && TARGET_MSA) + error ("%qs is incompatible with %qs, %<-mmicromips -mmsa%> is " + "only supported for MIPSr6", mips_arch_info->name, + "-mmicromips -mmsa"); + /* Require explicit relocs for MIPS R6 onwards. This enables simplification of the compact branch and jump support through the backend. */ if (!TARGET_EXPLICIT_RELOCS && mips_isa_rev >= 6) -- 2.34.1