diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-13 08:43:41 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-13 08:43:41 +0000 |
commit | bef380a43668e9edeabe5587eb7b08fe02d43aab (patch) | |
tree | d9a896211b7b86323ca0988aebcee6681c40a375 /gcc/config/mmix | |
parent | cc9b8628228057b9b0ab5417b7d8deea36754e44 (diff) | |
download | gcc-bef380a43668e9edeabe5587eb7b08fe02d43aab.tar.gz |
* builtins.c (std_gimplify_va_arg_expr): Handle types passed
by reference.
(ind_gimplify_va_arg_expr): Remove.
* tree.h (ind_gimplify_va_arg_expr): Remove.
* config/pa/pa.c (hppa_gimplify_va_arg_expr): Don't use it.
* config/mmix/mmix.c (mmix_function_arg_pass_by_reference): Allow
argsp to be null.
* config/arc/arc.c (arc_gimplify_va_arg_expr): Remove.
(TARGET_GIMPLIFY_VA_ARG_EXPR): Remove.
* config/cris/cris.c, config/fr30/fr30.c, config/frv/frv.c,
config/iq2000/iq2000.c, config/m32r/m32r.c, config/mmix/mmix.c,
config/mn10300/mn10300.c, config/v850/v850.c: Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84608 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mmix')
-rw-r--r-- | gcc/config/mmix/mmix.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 569acc20183..4e1731bc29e 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -139,7 +139,6 @@ static void mmix_file_start (void); static void mmix_file_end (void); static bool mmix_rtx_costs (rtx, int, int, int *); static rtx mmix_struct_value_rtx (tree, int); -static tree mmix_gimplify_va_arg_expr (tree, tree, tree *, tree *); /* Target structure macros. Listed by node. See `Using and Porting GCC' @@ -205,8 +204,6 @@ static tree mmix_gimplify_va_arg_expr (tree, tree, tree *, tree *); #undef TARGET_SETUP_INCOMING_VARARGS #define TARGET_SETUP_INCOMING_VARARGS mmix_setup_incoming_varargs -#undef TARGET_GIMPLIFY_VA_ARG_EXPR -#define TARGET_GIMPLIFY_VA_ARG_EXPR mmix_gimplify_va_arg_expr struct gcc_target targetm = TARGET_INITIALIZER; @@ -601,11 +598,15 @@ mmix_function_arg_pass_by_reference (const CUMULATIVE_ARGS *argsp, { /* FIXME: Check: I'm not sure the must_pass_in_stack check is necessary. */ - return - targetm.calls.must_pass_in_stack (mode, type) - || (MMIX_FUNCTION_ARG_SIZE (mode, type) > 8 - && !TARGET_LIBFUNC - && !argsp->lib); + if (targetm.calls.must_pass_in_stack (mode, type)) + return true; + + if (MMIX_FUNCTION_ARG_SIZE (mode, type) > 8 + && !TARGET_LIBFUNC + && (!argsp || !argsp->lib)) + return true; + + return false; } /* Return nonzero if regno is a register number where a parameter is @@ -846,21 +847,6 @@ mmix_setup_incoming_varargs (CUMULATIVE_ARGS *args_so_farp, internal_error ("MMIX Internal: Last named vararg would not fit in a register"); } -/* Gimplify VA_ARG_EXPR. All we need to do is figure out if TYPE is - pass-by-reference and hand off to standard routines. */ - -static tree -mmix_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p) -{ - CUMULATIVE_ARGS cum; - cum.lib = 0; - - if (mmix_function_arg_pass_by_reference (&cum, TYPE_MODE (type), type, 0)) - return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p); - else - return std_gimplify_va_arg_expr (valist, type, pre_p, post_p); -} - /* TRAMPOLINE_SIZE. */ /* Four 4-byte insns plus two 8-byte values. */ int mmix_trampoline_size = 32; |