[patch] PR target/21128

Josh Conner jconner@apple.com
Wed Apr 27 17:43:00 GMT 2005


On Apr 22, 2005, at 4:58 AM, Paul Brook wrote:

> On Friday 22 April 2005 02:37, Josh Conner wrote:
>> On Apr 21, 2005, at 5:37 PM, Paul Brook wrote:
>>>> 	else
>>>> 		return in memory
>>>
>>> You are changing the ABI for vector types under the APCS. Given we
>>> already do
>>> complex types "wrong" it may be desirable to preserve this behaviour
>>> for
>>> vectors < 4 words.
>>
>> Makes sense.  Did you mean <= 4 words, by any chance?
>
> Yes, I did.
>
> Paul

Whoops - I forgot to include an updated ChangeLog entry last time...

Thanks -

Josh
~~~~

2005-04-20	Josh Conner <jconner@apple.com>

	PR target/21128
	* arm.c (arm_return_in_memory): Add handling for vector
	return types.

Index: arm.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.444
diff -c -3 -p -r1.444 arm.c
*** arm.c       19 Apr 2005 22:12:59 -0000      1.444
--- arm.c       23 Apr 2005 00:54:37 -0000
*************** arm_return_in_memory (tree type)
*** 2338,2343 ****
--- 2338,2344 ----
     HOST_WIDE_INT size;

     if (!AGGREGATE_TYPE_P (type) &&
+       (TREE_CODE (type) != VECTOR_TYPE) &&
         !(TARGET_AAPCS_BASED && TREE_CODE (type) == COMPLEX_TYPE))
       /* All simple types are returned in registers.
          For AAPCS, complex types are treated the same as aggregates.  
*/
*************** arm_return_in_memory (tree type)
*** 2352,2357 ****
--- 2353,2363 ----
         return (size < 0 || size > UNITS_PER_WORD);
       }

+   /* To maximize backwards compatibility with previous versions of 
gcc,
+      return vectors up to 4 words in registers.  */
+   if (TREE_CODE (type) == VECTOR_TYPE)
+     return (size < 0 || size > (4 * UNITS_PER_WORD));
+
     /* For the arm-wince targets we choose to be compatible with 
Microsoft's
        ARM and Thumb compilers, which always return aggregates in 
memory.  */
   #ifndef ARM_WINCE



More information about the Gcc-patches mailing list