------- Additional Comments From fjahanian at apple dot com  2004-12-18 00:43 
-------
Followin patch fixes the alignment problem. But it cannot be applied because it 
breaks ABI
compatibilty. 

A possible solution is to relax alignment of the type in question (with 
alignment of 128) to that of the
PARM_BOUNDARY (32). This will not (should not ?) break the ABI compatibility 
(because it is currently 
on PARM_BOUNDARY). But it will prevent vector code to be generated (which is 
cause of the abort).
Comments are most welcome.


Index: rs6000.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.332.2.46.2.84
diff -c -p -r1.332.2.46.2.84 rs6000.c
*** rs6000.c    16 Dec 2004 03:23:30 -0000      1.332.2.46.2.84
--- rs6000.c    18 Dec 2004 00:20:54 -0000
*************** function_arg_boundary (enum machine_mode
*** 5190,5195 ****
--- 5190,5197 ----
           || (type && TREE_CODE (type) == VECTOR_TYPE
               && int_size_in_bytes (type) >= 16))
      return 128;
+   else if (DEFAULT_ABI == ABI_DARWIN && mode == BLKmode)
+     return MAX (TYPE_ALIGN (type), PARM_BOUNDARY);
    else
      return PARM_BOUNDARY;
  }

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18916

Reply via email to