This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
powerpc64-linux altivec support
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 25 Aug 2002 15:20:31 +0930
- Subject: powerpc64-linux altivec support
Fixes lots of
.../linux64.h:80: warning: `ADJUST_FIELD_ALIGN' redefined
.../sysv4.h:387: warning: this is the location of the previous definition
when building powerpc64-linux mainline gcc, and adds the TARGET_ALTIVEC
values which were somehow left out.
* config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Undef before
defining. Handle TARGET_ALTIVEC too.
(ROUND_TYPE_ALIGN): Handle TARGET_ALTIVEC.
Index: gcc/config/rs6000/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux64.h,v
retrieving revision 1.25
diff -u -p -r1.25 linux64.h
--- gcc/config/rs6000/linux64.h 8 Aug 2002 17:55:37 -0000 1.25
+++ gcc/config/rs6000/linux64.h 24 Aug 2002 12:39:32 -0000
@@ -73,22 +73,28 @@ Boston, MA 02111-1307, USA. */
#define USER_LABEL_PREFIX ""
/* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints. */
-#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
- (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \
- ? get_inner_array_type (FIELD) \
- : TREE_TYPE (FIELD)) == DFmode \
- ? MIN ((COMPUTED), 32) : (COMPUTED))
+#undef ADJUST_FIELD_ALIGN
+#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
+ ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
+ ? 128 \
+ : TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \
+ ? get_inner_array_type (FIELD) \
+ : TREE_TYPE (FIELD)) == DFmode \
+ ? MIN ((COMPUTED), 32) \
+ : (COMPUTED))
/* AIX increases natural record alignment to doubleword if the first
field is an FP double while the FP fields remain word aligned. */
#undef ROUND_TYPE_ALIGN
-#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
- ((TREE_CODE (STRUCT) == RECORD_TYPE \
- || TREE_CODE (STRUCT) == UNION_TYPE \
- || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
- && TYPE_FIELDS (STRUCT) != 0 \
- && DECL_MODE (TYPE_FIELDS (STRUCT)) == DFmode \
- ? MAX (MAX ((COMPUTED), (SPECIFIED)), 64) \
+#define ROUND_TYPE_ALIGN(TYPE, COMPUTED, SPECIFIED) \
+ ((TARGET_ALTIVEC && TREE_CODE (TYPE) == VECTOR_TYPE) \
+ ? MAX (MAX ((COMPUTED), (SPECIFIED)), 128) \
+ : ((TREE_CODE (TYPE) == RECORD_TYPE \
+ || TREE_CODE (TYPE) == UNION_TYPE \
+ || TREE_CODE (TYPE) == QUAL_UNION_TYPE) \
+ && TYPE_FIELDS (TYPE) != 0 \
+ && DECL_MODE (TYPE_FIELDS (TYPE)) == DFmode) \
+ ? MAX (MAX ((COMPUTED), (SPECIFIED)), 64) \
: MAX ((COMPUTED), (SPECIFIED)))
/* Indicate that jump tables go in the text section. */
--
Alan Modra
IBM OzLabs - Linux Technology Centre