[RFC PATCH 1/2]powerpc: foundation code to handle CR5 for local_t

Segher Boessenkool segher at kernel.crashing.org
Sat Nov 29 02:57:20 AEDT 2014


On Fri, Nov 28, 2014 at 12:58:55PM +1100, Benjamin Herrenschmidt wrote:
> > Have you tested this with (upcoming) GCC 5.0?  GCC now uses CR5,
> > and it likes to use it very much, it might be more convenient to
> > use e.g. CR1 (which is allocated almost last, only before CR0).
> 
> We use CR1 all over the place in your asm code. Any other suggestion ?
> 
> What's the damage of -ffixed-cr5 on gcc5 ? won't it just use CR4 or 6
> instead ?

Oh, it will work fine.  Not using CR5 would be more convenient so that
the register allocation for most code would not change when you use or
not use -ffixed-cr5, making code easier to read.  But your point about
asm code already using the other CR fields makes CR5 a better choice
actually, because people avoided it (because the compiler did) :-)


Segher


More information about the Linuxppc-dev mailing list