Re: [PATCH RFC v2 19/70] MIPS: Use the new "ZC" constraint for MIPS R6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20 Jan 2015, Maciej W. Rozycki wrote:

> > >> We have tools out there based on 4.9. If we make gcc < 5.0 to fail with
> > >> R6, then nobody will be able to build it until 5.0 is released.
> > >> Perhaps it makes sense to add some checks in arch/mips/Makefile, see if
> > >> our gcc supports -mips32r6 or something and then decide what to do.
> > > 
> > > Indeed, I think it is worthwhile supporting the use of tools which have R6
> > > backported to them owing to long lead times for new versions of GCC to be
> > > released.
> > > 
> > > I think you could actually just switch the check around and remove the
> > > check for micromips entirely, putting the GCC 4.9 check first:
> > > 
> > > #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
> > > #define GCC_OFF12_ASM() "ZC"
> > > #else
> > > #define GCC_OFF12_ASM() "R"
> > > #endif
> > > 
> > > From what I can see this is safe. It was presumably written with a micromips
> > > check out of caution to not change older non-micromips code-gen but that
> > > doesn't seem particularly important. It is an improvement to older code if
> > > anything.
> > 
> > For non-micromips kernel, this will start using "ZC" instead of "R",
> > whereas before, it only used "ZC" for micromips and "R" for everything
> > else. Is that safe? Maciej was the one committed this code, so if that's
> > still safe, then I will change it as requested.
> 
>  I'm fine with this proposal; a separate Makefile check for 
> `-march=mips32r6' support would be good too.

 With such an arrangement there is potential however that it'll break 
non-microMIPS builds for someone using a 4.9 prerelease that didn't yet 
have `ZC'.  This is why I arranged the macros like I did in the first 
place.  So if you are able to keep such an arrangement without 
complicating the structure too much, then it would be great.

  Maciej




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux