ia64.c (ia64_function_arg_pass_by_reference): New.
* config/ia64/ia64.c (ia64_function_arg_pass_by_reference): New. (ia64_va_arg): Expect variable sized types by reference. * config/ia64/ia64-protos.h: Update. * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use ia64_function_arg_pass_by_reference. From-SVN: r52494
This commit is contained in:
parent
a48632153d
commit
51dcde6f95
|
@ -1,3 +1,11 @@
|
||||||
|
2002-04-18 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* config/ia64/ia64.c (ia64_function_arg_pass_by_reference): New.
|
||||||
|
(ia64_va_arg): Expect variable sized types by reference.
|
||||||
|
* config/ia64/ia64-protos.h: Update.
|
||||||
|
* config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use
|
||||||
|
ia64_function_arg_pass_by_reference.
|
||||||
|
|
||||||
2002-04-18 Richard Henderson <rth@redhat.com>
|
2002-04-18 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* ifcvt.c: Include except.h.
|
* ifcvt.c: Include except.h.
|
||||||
|
|
|
@ -114,6 +114,9 @@ extern int ia64_function_arg_partial_nregs PARAMS((CUMULATIVE_ARGS *,
|
||||||
extern void ia64_function_arg_advance PARAMS((CUMULATIVE_ARGS *,
|
extern void ia64_function_arg_advance PARAMS((CUMULATIVE_ARGS *,
|
||||||
enum machine_mode,
|
enum machine_mode,
|
||||||
tree, int));
|
tree, int));
|
||||||
|
extern int ia64_function_arg_pass_by_reference PARAMS((CUMULATIVE_ARGS *,
|
||||||
|
enum machine_mode,
|
||||||
|
tree, int));
|
||||||
extern int ia64_return_in_memory PARAMS((tree));
|
extern int ia64_return_in_memory PARAMS((tree));
|
||||||
extern void ia64_asm_output_external PARAMS((FILE *, tree, const char *));
|
extern void ia64_asm_output_external PARAMS((FILE *, tree, const char *));
|
||||||
|
|
||||||
|
|
|
@ -3200,6 +3200,19 @@ ia64_function_arg_advance (cum, mode, type, named)
|
||||||
cum->int_regs = cum->words;
|
cum->int_regs = cum->words;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Variable sized types are passed by reference. */
|
||||||
|
/* ??? At present this is a GCC extension to the IA-64 ABI. */
|
||||||
|
|
||||||
|
int
|
||||||
|
ia64_function_arg_pass_by_reference (cum, mode, type, named)
|
||||||
|
CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED;
|
||||||
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
|
tree type;
|
||||||
|
int named ATTRIBUTE_UNUSED;
|
||||||
|
{
|
||||||
|
return TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST;
|
||||||
|
}
|
||||||
|
|
||||||
/* Implement va_start. */
|
/* Implement va_start. */
|
||||||
|
|
||||||
|
@ -3231,6 +3244,13 @@ ia64_va_arg (valist, type)
|
||||||
{
|
{
|
||||||
tree t;
|
tree t;
|
||||||
|
|
||||||
|
/* Variable sized types are passed by reference. */
|
||||||
|
if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
|
||||||
|
{
|
||||||
|
rtx addr = std_expand_builtin_va_arg (valist, build_pointer_type (type));
|
||||||
|
return gen_rtx_MEM (ptr_mode, force_reg (Pmode, addr));
|
||||||
|
}
|
||||||
|
|
||||||
/* Arguments with alignment larger than 8 bytes start at the next even
|
/* Arguments with alignment larger than 8 bytes start at the next even
|
||||||
boundary. */
|
boundary. */
|
||||||
if (TYPE_ALIGN (type) > 8 * BITS_PER_UNIT)
|
if (TYPE_ALIGN (type) > 8 * BITS_PER_UNIT)
|
||||||
|
|
|
@ -1268,7 +1268,8 @@ enum reg_class
|
||||||
pointer is passed in whatever way is appropriate for passing a pointer to
|
pointer is passed in whatever way is appropriate for passing a pointer to
|
||||||
that type. */
|
that type. */
|
||||||
|
|
||||||
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
|
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
|
||||||
|
ia64_function_arg_pass_by_reference (&CUM, MODE, TYPE, NAMED)
|
||||||
|
|
||||||
/* A C type for declaring a variable that is used as the first argument of
|
/* A C type for declaring a variable that is used as the first argument of
|
||||||
`FUNCTION_ARG' and other related values. For some target machines, the type
|
`FUNCTION_ARG' and other related values. For some target machines, the type
|
||||||
|
|
Loading…
Reference in New Issue