This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch: e500 v2: DI/DF disparity


DI/DF modes cause the same damage.

This patch gets us past newlib building.

Still to come:

	- Handle complex values in the ABI.
	- Various middle end changes handling parallels of floats.

Committed to mainline and 3.4-e500 branch.

Cheers.

	* config/rs6000/rs6000.h (MEMBER_TYPE_FORCES_BLK): Adjust for e500
	doubles.

Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.344
diff -c -p -r1.344 rs6000.h
*** config/rs6000/rs6000.h	26 Oct 2004 12:28:59 -0000	1.344
--- config/rs6000/rs6000.h	26 Oct 2004 17:28:18 -0000
*************** extern const char *rs6000_warn_altivec_l
*** 759,767 ****
     store_bit_field() will force (subreg:DI (reg:V2SI x))'s to the
     back-end.  Because a single GPR can hold a V2SI, but not a DI, the
     best thing to do is set structs to BLKmode and avoid Severe Tire
!    Damage.  */
  #define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) \
!   (TARGET_SPE && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
  
  /* A bit-field declared as `int' forces `int' alignment for the struct.  */
  #define PCC_BITFIELD_TYPE_MATTERS 1
--- 759,771 ----
     store_bit_field() will force (subreg:DI (reg:V2SI x))'s to the
     back-end.  Because a single GPR can hold a V2SI, but not a DI, the
     best thing to do is set structs to BLKmode and avoid Severe Tire
!    Damage.
! 
!    On e500 v2, DF and DI modes suffer from the same anomaly.  DF can
!    fit into 1, whereas DI still needs two.  */
  #define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) \
!   ((TARGET_SPE && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
!    || (TARGET_E500_DOUBLE && (MODE) == DFmode))
  
  /* A bit-field declared as `int' forces `int' alignment for the struct.  */
  #define PCC_BITFIELD_TYPE_MATTERS 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]