[powerpc64] fix for PR9680
Aldy Hernandez
aldyh@redhat.com
Sun Jun 1 11:34:00 GMT 2003
I started to look at random PPC64 failures, and ran into this-- which
coincidentally is really an SPE bug.
On PPC64, GPRs are 64-bits. A GPR can therefore change modes from word
size to V2SI. The check in CANNOT_CHANGE_MODE_CLASS is for
SPE_VECTOR_MODE (V2SImode); it should also check for TARGET_SPE.
I'm surprised this hasn't caused any more problems.
Committed to mainline.
David, could you please close the PR which you hold?
2003-06-01 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Require
TARGET_SPE for SPE_VECTOR_MODE.
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.275
diff -c -p -r1.275 rs6000.h
*** config/rs6000/rs6000.h 19 May 2003 17:39:50 -0000 1.275
--- config/rs6000/rs6000.h 1 Jun 2003 11:22:55 -0000
*************** enum reg_class
*** 1406,1412 ****
#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \
(GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \
? reg_classes_intersect_p (FLOAT_REGS, CLASS) \
! : (SPE_VECTOR_MODE (FROM) + SPE_VECTOR_MODE (TO)) == 1 \
? reg_classes_intersect_p (GENERAL_REGS, CLASS) \
: 0)
--- 1406,1412 ----
#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \
(GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \
? reg_classes_intersect_p (FLOAT_REGS, CLASS) \
! : (TARGET_SPE && (SPE_VECTOR_MODE (FROM) + SPE_VECTOR_MODE (TO))
== 1) \
? reg_classes_intersect_p (GENERAL_REGS, CLASS) \
: 0)
More information about the Gcc-patches
mailing list