To: None <>
From: Jason R Thorpe <>
List: port-arm
Date: 08/27/2002 13:18:14
Our GCC 2.95.3 does:

/* We override the default here because the default is to follow the
   APCS rules and we want to follow the (simpler) ATPCS rules. */
	(AGGREGATE_TYPE_P (TYPE) && int_size_in_bytes (TYPE) > 4)

In GCC 3.x, int_size_in_bytes() returns -1 to indicate a variable-sized
type, and you would think that we would want to handle that case as a
return-in-memory, as well.  Therefore, I think we want to cast the return
value of int_size_in_bytes() to (unsigned int) before the comparison.

Agree?  Disagree?  (This is the chunk I've added to my local copy of
GCC 3.x's arm_return_in_memory()):

      /* ATPCS returns aggregate types in memory only if they are
         larger than a word (or are variable size).  */
      return (((unsigned int) int_size_in_bytes (type)) > UNITS_PER_WORD);

        -- Jason R. Thorpe <>