objective-C broken on PowerPC

Andrew Pinski pinskia@physics.uc.edu
Wed Aug 7 19:28:00 GMT 2002


Here is the patch I used, it is like this part in i386, I 
changed BIGGEST_FIELD_ALIGNMENT to be 64 for ppc though:

Index: gcc/config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.221
diff -u -r1.221 rs6000.h
--- gcc/config/rs6000/rs6000.h  7 Aug 2002 23:57:10 -0000       1.221
+++ gcc/config/rs6000/rs6000.h  8 Aug 2002 01:59:19 -0000
@@ -632,8 +632,15 @@
 #define PCC_BITFIELD_TYPE_MATTERS 1

 /* Most ABIs word-align FP doubles but doubleword-align 64-bit 
ints.  */
+/* ??? Blah -- this macro is used directly by libobjc.  Since it
+   supports no vector modes, cut out the complexity and fall back
+   on BIGGEST_FIELD_ALIGNMENT.  */
+#ifdef IN_TARGET_LIBS
+#define BIGGEST_FIELD_ALIGNMENT 64
+#else
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
   rs6000_field_alignment ((FIELD), (COMPUTED))
+#endif

 /* Make strings word-aligned so strcpy from constants will be faster.
    Make vector constants quadword aligned.  */


Thanks,
Andrew Pinski




More information about the Gcc-bugs mailing list