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]

x86_64 and variable sized objects


Hi,
I've commited the attached patch to make all varaiable sized objects
passed in memory.

Tue Aug 27 19:49:41 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* i386.c (classify_argument): Handle variable sized objects.

Index: i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.449
diff -c -3 -p -r1.449 i386.c
*** i386.c	27 Aug 2002 17:19:45 -0000	1.449
--- i386.c	27 Aug 2002 17:48:37 -0000
*************** classify_argument (mode, type, classes, 
*** 1593,1598 ****
--- 1597,1606 ----
    int bytes =
      (mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode);
    int words = (bytes + (bit_offset % 64) / 8 + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
+ 
+   /* Variable sized entities are always passed/returned in memory.  */
+   if (bytes < 0)
+     return 0;
  
    if (type && AGGREGATE_TYPE_P (type))
      {


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