PPC64 Compiler bug !!

Alan Modra amodra at bigpond.net.au
Fri Jun 13 08:53:40 EST 2003


On Fri, Jun 13, 2003 at 08:25:56AM +1000, Anton Blanchard wrote:
> With lazy FP save/restore in Linux we have the extra cost of taking an
> exception the first time (after a context switch) we use an FP temporary.
> Im guessing AIX doesnt do this.

We could improve this by changing the register allocation order, so that
code doesn't tend to use fp regs for moves.  Something like the
following (untested!) patch.

Index: gcc/config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.278
diff -u -p -r1.278 rs6000.h
--- gcc/config/rs6000/rs6000.h	4 Jun 2003 17:50:43 -0000	1.278
+++ gcc/config/rs6000/rs6000.h	12 Jun 2003 22:47:16 -0000
@@ -881,17 +881,17 @@ extern int rs6000_alignment_flags;
 #endif

 #define REG_ALLOC_ORDER					\
-  {32, 							\
-   45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34,	\
-   33,							\
-   63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51,	\
-   50, 49, 48, 47, 46, 					\
-   75, 74, 69, 68, 72, 71, 70,				\
+  {75, 74, 69, 68, 72, 71, 70,				\
    0, MAYBE_R2_AVAILABLE				\
    9, 11, 10, 8, 7, 6, 5, 4,				\
    3,							\
    31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19,	\
    18, 17, 16, 15, 14, 13, 12,				\
+   32, 							\
+   45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34,	\
+   33,							\
+   63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51,	\
+   50, 49, 48, 47, 46, 					\
    64, 66, 65, 						\
    73, 1, MAYBE_R2_FIXED 67, 76,			\
    /* AltiVec registers.  */				\

--
Alan Modra
IBM OzLabs - Linux Technology Centre

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list