Commit 594a51fe by Stan Shebs Committed by Stan Shebs

Basic ABI changes for passing structs by value in 64-bit Darwin.

        * config/rs6000/rs6000.c (rs6000_darwin64_abi): New flag.
        (rs6000_override_options): Set it for 64-bit Darwin.
        (rs6000_parse_abi_options): Add testing options to change it.
        (rs6000_return_in_memory): Test whether the type is one
        that can be passed in registers.
        (darwin64_function_arg_advance): New.
        (function_arg_advance): Call it, plus add recursion depth
        argument and test when counting off arguments.
        (rs6000_darwin64_function_arg): New.
        (function_arg): Call it.
        (setup_incoming_varargs): Add argument to function_arg_advance.
        (rs6000_darwin64_function_value): New.
        (rs6000_function_value): Call it.
        * config/rs6000/rs6000.h (FUNCTION_ARG_ADVANCE): Pass depth arg.
        * config/rs6000/rs6000-protos.h: Update decl of
        function_arg_advance.

From-SVN: r90629
parent 1e1b8649
2004-11-14 Stan Shebs <shebs@apple.com>
Basic ABI changes for passing structs by value in 64-bit Darwin.
* config/rs6000/rs6000.c (rs6000_darwin64_abi): New flag.
(rs6000_override_options): Set it for 64-bit Darwin.
(rs6000_parse_abi_options): Add testing options to change it.
(rs6000_return_in_memory): Test whether the type is one
that can be passed in registers.
(darwin64_function_arg_advance): New.
(function_arg_advance): Call it, plus add recursion depth
argument and test when counting off arguments.
(rs6000_darwin64_function_arg): New.
(function_arg): Call it.
(setup_incoming_varargs): Add argument to function_arg_advance.
(rs6000_darwin64_function_value): New.
(rs6000_function_value): Call it.
* config/rs6000/rs6000.h (FUNCTION_ARG_ADVANCE): Pass depth arg.
* config/rs6000/rs6000-protos.h: Update decl of
function_arg_advance.
2004-11-14 Andrew Pinski <pinskia@physics.uc.edu>
PR c/17279
......
......@@ -156,7 +156,7 @@ extern rtx rs6000_machopic_legitimize_pic_address (rtx orig,
#ifdef TREE_CODE
extern unsigned int rs6000_special_round_type_align (tree, int, int);
extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
tree, int);
tree, int, int);
extern int function_arg_boundary (enum machine_mode, tree);
extern struct rtx_def *function_arg (CUMULATIVE_ARGS *,
enum machine_mode, tree, int);
......
......@@ -1713,7 +1713,7 @@ typedef struct rs6000_args
(TYPE is null for libcalls where that information may not be available.) */
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
function_arg_advance (&CUM, MODE, TYPE, NAMED)
function_arg_advance (&CUM, MODE, TYPE, NAMED, 0)
/* Determine where to put an argument to a function.
Value is zero to push the argument on the stack,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment