ia64.c (ia64_function_arg): Set up a PARALLEL for a big-endian unnamed __float80 value.
* config/ia64/ia64.c (ia64_function_arg): Set up a PARALLEL for a big-endian unnamed __float80 value. testsuite: * gcc.target/ia64/float80-varargs-1.c: New test. From-SVN: r101153
This commit is contained in:
parent
189ed82c09
commit
6d409ca872
@ -1,3 +1,8 @@
|
||||
2005-06-18 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* config/ia64/ia64.c (ia64_function_arg): Set up a PARALLEL for a
|
||||
big-endian unnamed __float80 value.
|
||||
|
||||
2005-06-18 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR tree-opt/22103
|
||||
|
@ -3822,6 +3822,19 @@ ia64_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
|
||||
gen_rtx_EXPR_LIST (VOIDmode,
|
||||
gen_rtx_REG (DImode, basereg + cum->words + offset),
|
||||
const0_rtx)));
|
||||
/* Similarly, an anonymous XFmode value must be split into two
|
||||
registers and padded appropriately. */
|
||||
else if (BYTES_BIG_ENDIAN && mode == XFmode)
|
||||
{
|
||||
rtx loc[2];
|
||||
loc[0] = gen_rtx_EXPR_LIST (VOIDmode,
|
||||
gen_rtx_REG (DImode, basereg + cum->words + offset),
|
||||
const0_rtx);
|
||||
loc[1] = gen_rtx_EXPR_LIST (VOIDmode,
|
||||
gen_rtx_REG (DImode, basereg + cum->words + offset + 1),
|
||||
GEN_INT (UNITS_PER_WORD));
|
||||
return gen_rtx_PARALLEL (mode, gen_rtvec_v (2, loc));
|
||||
}
|
||||
else
|
||||
return gen_rtx_REG (mode, basereg + cum->words + offset);
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-06-18 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* gcc.target/ia64/float80-varargs-1.c: New test.
|
||||
|
||||
2005-06-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
PR tree-opt/22035
|
||||
|
33
gcc/testsuite/gcc.target/ia64/float80-varargs-1.c
Normal file
33
gcc/testsuite/gcc.target/ia64/float80-varargs-1.c
Normal file
@ -0,0 +1,33 @@
|
||||
/* Test for a bug with passing __float80 in varargs. The __float80
|
||||
value was wrongly passed, leading to an abort. */
|
||||
/* Origin: Joseph Myers <joseph@codesourcery.com> */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "" } */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
extern void abort (void);
|
||||
extern void exit (int);
|
||||
|
||||
__float80 s = 1.234L;
|
||||
__float80 d;
|
||||
|
||||
void vf (int a0, ...);
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
vf (0, s);
|
||||
if (d != s)
|
||||
abort ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
void
|
||||
vf (int a0, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start (ap, a0);
|
||||
d = va_arg (ap, __float80);
|
||||
va_end (ap);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user