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]

Small fix for AltiVec alignment


There were some misplaced parens in the PowerPC LOCAL_ALIGNMENT,
obvious once you see them, but crazy-making when you don't... :-)
Bootstrapped on powerpc-apple-darwin (also makes my nice new
vector constant test not get bad data - that AltiVec sure punishes
you for getting alignments wrong!), and committed.

Stan

2001-12-18  Stan Shebs  <shebs@apple.com>

        * rs6000.h (LOCAL_ALIGNMENT): Fix parens.

Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.161
diff -c -3 -p -r1.161 rs6000.h
*** rs6000.h    2001/12/17 19:11:13     1.161
--- rs6000.h    2001/12/19 03:36:22
*************** extern int rs6000_altivec_abi;
*** 639,646 ****
     local store.  TYPE is the data type, and ALIGN is the alignment
     that the object would ordinarily have.  */
  #define LOCAL_ALIGNMENT(TYPE, ALIGN)                          \
!       ((TARGET_ALTIVEC                                        \
!         && TREE_CODE (TYPE)) == VECTOR_TYPE ? 128 : ALIGN)
  
  /* Handle #pragma pack.  */
  #define HANDLE_PRAGMA_PACK 1
--- 639,645 ----
     local store.  TYPE is the data type, and ALIGN is the alignment
     that the object would ordinarily have.  */
  #define LOCAL_ALIGNMENT(TYPE, ALIGN)                          \
!   ((TARGET_ALTIVEC && TREE_CODE (TYPE) == VECTOR_TYPE) ? 128 : ALIGN)
  
  /* Handle #pragma pack.  */
  #define HANDLE_PRAGMA_PACK 1


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