[RS6000] -mno-minimal-toc vs. power10 pcrelative

Segher Boessenkool segher@kernel.crashing.org
Thu Oct 1 22:16:18 GMT 2020


Hi Alan,

On Fri, Oct 02, 2020 at 07:06:46AM +0930, Alan Modra wrote:
> > > I was looking at it again today
> > > with the aim of converting this ugly macro to a function, and spotted
> > > the duplication in freebsd64.h.  Which has some bit-rot.
> > > 
> > > Do you like the following?  rs6000_linux64_override_options is
> > > functionally the same as what was in linux64.h.  I built various
> > > configurations to test the change, powerpc64-linux, powerpc64le-linux
> > > without any 32-bit targets enabled, powerpc64-freebsd12.0.
> > 
> > Please do this as two patches?  One the refactoring without any
> > functional changes (which is pre-approved -- the name "linux64" isn't
> > great if you use it in other OSes as well, but I cannot think of a
> > better name either),
> 
> The patch as posted has no functional changes.

Ah.  You said the freebsd one had some bitrot, and I couldn't spot that
easily.  But in the actual patch you are just throwing away all of the
freebsd stuff here, and the new, shared implementation is exactly what
the linux one was?  That is fine (I hope :-) ).

> I do have a followup patch..  Commit c6be439b37 wrongly left a block
> of code inside and "else" block, which changed the default for power10
> TARGET_NO_FP_IN_TOC accidentally.  We don't want FP constants in the
> TOC when -mcmodel=medium can address them just as efficiently outside
> the TOC.
> 
> 	* config/rs6000/rs6000.c (rs6000_linux64_override_options):
> 	Formatting.  Correct setting of TARGET_NO_FP_IN_TOC and
> 	TARGET_NO_SUM_IN_TOC.

Okay for trunk.  Thanks!


Segher


More information about the Gcc-patches mailing list