sparc.c (function_arg_partial_nregs): Never return 1 for complex integral modes whose size is lesser or equal to a word.
* config/sparc/sparc.c (function_arg_partial_nregs) [TARGET_ARCH64]: Never return 1 for complex integral modes whose size is lesser or equal to a word. (function_arg_pass_by_reference) [TARGET_ARCH64]: Mention CTImode in the comment. (function_arg_advance) [TARGET_ARCH64]: Don't special-case complex modes. (sparc_va_arg) [TARGET_ARCH64]: Handle any types whose is greater than 16 bytes by reference. From-SVN: r73044
This commit is contained in:
parent
2035efe7fb
commit
6949414817
@ -1,3 +1,15 @@
|
||||
2003-10-29 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* config/sparc/sparc.c (function_arg_partial_nregs) [TARGET_ARCH64]:
|
||||
Never return 1 for complex integral modes whose size is lesser or
|
||||
equal to a word.
|
||||
(function_arg_pass_by_reference) [TARGET_ARCH64]: Mention CTImode
|
||||
in the comment.
|
||||
(function_arg_advance) [TARGET_ARCH64]: Don't special-case complex
|
||||
modes.
|
||||
(sparc_va_arg) [TARGET_ARCH64]: Handle any types whose is greater
|
||||
than 16 bytes by reference.
|
||||
|
||||
2003-10-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* config/ia64/ia64.c (ia64_assemble_integer): Test POINTER_SIZE,
|
||||
|
@ -5429,7 +5429,8 @@ function_arg_partial_nregs (const struct sparc_args *cum,
|
||||
&& slotno == SPARC_INT_ARG_MAX - 1)
|
||||
return 1;
|
||||
}
|
||||
else if (GET_MODE_CLASS (mode) == MODE_COMPLEX_INT
|
||||
else if ((GET_MODE_CLASS (mode) == MODE_COMPLEX_INT
|
||||
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD)
|
||||
|| (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT
|
||||
&& ! (TARGET_FPU && named)))
|
||||
{
|
||||
@ -5476,7 +5477,8 @@ function_arg_pass_by_reference (const struct sparc_args *cum ATTRIBUTE_UNUSED,
|
||||
else
|
||||
{
|
||||
return ((type && TREE_CODE (type) == ARRAY_TYPE)
|
||||
/* Consider complex values as aggregates, so care for TCmode. */
|
||||
/* Consider complex values as aggregates, so care
|
||||
for CTImode and TCmode. */
|
||||
|| GET_MODE_SIZE (mode) > 16
|
||||
|| (type
|
||||
&& AGGREGATE_TYPE_P (type)
|
||||
@ -5521,14 +5523,6 @@ function_arg_advance (struct sparc_args *cum, enum machine_mode mode,
|
||||
else /* passed by reference */
|
||||
++cum->words;
|
||||
}
|
||||
else if (GET_MODE_CLASS (mode) == MODE_COMPLEX_INT)
|
||||
{
|
||||
cum->words += 2;
|
||||
}
|
||||
else if (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT)
|
||||
{
|
||||
cum->words += GET_MODE_SIZE (mode) / UNITS_PER_WORD;
|
||||
}
|
||||
else
|
||||
{
|
||||
cum->words += (mode != BLKmode
|
||||
@ -5661,17 +5655,19 @@ sparc_va_arg (tree valist, tree type)
|
||||
if (TYPE_ALIGN (type) >= 2 * (unsigned) BITS_PER_WORD)
|
||||
align = 2 * UNITS_PER_WORD;
|
||||
|
||||
if (AGGREGATE_TYPE_P (type))
|
||||
{
|
||||
/* Consider complex values as aggregates, so care
|
||||
for CTImode and TCmode. */
|
||||
if ((unsigned HOST_WIDE_INT) size > 16)
|
||||
{
|
||||
indirect = 1;
|
||||
size = rsize = UNITS_PER_WORD;
|
||||
align = 0;
|
||||
}
|
||||
/* SPARC v9 ABI states that structures up to 8 bytes in size are
|
||||
given one 8 byte slot. */
|
||||
else if (size == 0)
|
||||
else if (AGGREGATE_TYPE_P (type))
|
||||
{
|
||||
/* SPARC-V9 ABI states that structures up to 16 bytes in size
|
||||
are given whole slots as needed. */
|
||||
if (size == 0)
|
||||
size = rsize = UNITS_PER_WORD;
|
||||
else
|
||||
size = rsize;
|
||||
|
Loading…
Reference in New Issue
Block a user