SSE types and structures

Jan Hubicka jh@suse.cz
Thu Jun 13 10:17:00 GMT 2002


> On Thu, Jun 13, 2002 at 06:40:09PM +0200, Jan Hubicka wrote:
> > If I get the type and computed alignment to be 64 or 128, how can I
> > easilly figure out whether this comes from double/long double and thus
> > should be lowered to 32 for ABI compatibility, or from MMX/SSE
> 
> >From the TREE_TYPE.
Bootstrapped/regtested i386/branch.
OK for mainline/branch?

Thu Jun 13 19:16:21 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* i386.h (BIGGEST_FIELD_ALIGNMENT): Kill.
	(ADJUST_FIELD_ALIGN): New macro.

Index: i386.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.272
diff -c -3 -p -r1.272 i386.h
*** i386.h	12 Jun 2002 14:51:09 -0000	1.272
--- i386.h	13 Jun 2002 17:16:18 -0000
*************** extern int x86_prefetch_sse;
*** 714,726 ****
  /* The published ABIs say that doubles should be aligned on word
     boundaries, so lower the aligment for structure fields unless
     -malign-double is set.  */
! /* BIGGEST_FIELD_ALIGNMENT is also used in libobjc, where it must be
!    constant.  Use the smaller value in that context.  */
! #ifndef IN_TARGET_LIBS
! #define BIGGEST_FIELD_ALIGNMENT (TARGET_64BIT ? 128 : (TARGET_ALIGN_DOUBLE ? 64 : 32))
! #else
! #define BIGGEST_FIELD_ALIGNMENT 32
! #endif
  
  /* If defined, a C expression to compute the alignment given to a
     constant that is being placed in memory.  EXP is the constant
--- 714,726 ----
  /* The published ABIs say that doubles should be aligned on word
     boundaries, so lower the aligment for structure fields unless
     -malign-double is set.  */
! 
! #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
!   (!TARGET_64BIT && !TARGET_ALIGN_DOUBLE && !DECL_USER_ALIGN (FIELD) \
!    && TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \
! 		 ? get_inner_array_type (FIELD) \
! 		 : TREE_TYPE (FIELD)) == DFmode \
!    ? MIN ((COMPUTED), 32) : COMPUTED)
  
  /* If defined, a C expression to compute the alignment given to a
     constant that is being placed in memory.  EXP is the constant



More information about the Gcc-patches mailing list