This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] MIPS gas/ld test suite portability fixes


Eric Christopher wrote:
> 
> > I meant something like:
> > 
> > --- tc-mips.c   18 Feb 2005 22:12:50 -0000      1.284
> > +++ tc-mips.c   22 Feb 2005 21:54:59 -0000
> > @@ -10652,7 +10694,11 @@ mips_after_parse_args (void)
> >      }
> > 
> >    if (arch_info == 0)
> > -    arch_info = mips_parse_cpu ("default CPU", MIPS_CPU_STRING_DEFAULT);
> > +    {
> > +      arch_info = mips_parse_cpu ("default CPU", MIPS_CPU_STRING_DEFAULT);
> > +      if (ABI_NEEDS_64BIT_REGS (mips_abi) && !ISA_HAS_64BIT_REGS (arch_info->isa))
> > +       arch_info->isa = ISA_MIPS3;
> > +    }
> > 
> >    if (ABI_NEEDS_64BIT_REGS (mips_abi) && !ISA_HAS_64BIT_REGS (arch_info->isa))
> >      as_bad ("-march=%s is not compatible with the selected ABI",
> > 
> > 
> > (This fails to compile because arch_info is a constant.)
> 
> No, I definitely don't like this. It's going back to the era when
> gcc/gas "guessed" what you meant.

It is not a guess in this case, and gcc uses the from-abi hack to
figure it out correctly. Without it, e.g.

	gcc -mabi=64

would behave differently depending on its configuration. That's surely
counterintuitive and adds e.g. more breakage potential to Makefile
portability.

> If we're passing an abi and don't have
> a required minimum ISA either passed or by default then we should error
> out.

I agree it makes the ABI/ISA/ARCH/TUNE handling even more difficult,
but I think it's worth to also handle this transparently in the
assembler.


Thiemo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]