diff options
author | Jakub Jelinek <jakub@redhat.com> | 1999-11-16 09:43:40 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-11-16 09:43:40 -0800 |
commit | 4dc07bd7c1dae4996da88b9d4114c954e5ace101 (patch) | |
tree | 1284fde2a9c3617cfa59b12813b42b4c31d7e35b /gcc | |
parent | 95a7b5548cdd92fffb080078fcbef56119410ba5 (diff) | |
download | gcc-4dc07bd7c1dae4996da88b9d4114c954e5ace101.zip gcc-4dc07bd7c1dae4996da88b9d4114c954e5ace101.tar.gz gcc-4dc07bd7c1dae4996da88b9d4114c954e5ace101.tar.bz2 |
explow.c (hard_function_value): Add outgoing argument.
* explow.c (hard_function_value): Add outgoing argument.
* expr.h (hard_function_value): Declare it.
* calls.c (expand_call, emit_library_call_value): Update callers.
* function.c (aggregate_value_p): Ditto.
(diddle_return_value): Must look at the outgoing registers
on archs with register windows.
From-SVN: r30550
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 35 | ||||
-rw-r--r-- | gcc/calls.c | 6 | ||||
-rw-r--r-- | gcc/explow.c | 16 | ||||
-rw-r--r-- | gcc/expr.h | 2 | ||||
-rw-r--r-- | gcc/function.c | 4 |
5 files changed, 41 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b137d7a..b03966b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +1999-11-16 Jakub Jelinek <jakub@redhat.com> + + * explow.c (hard_function_value): Add outgoing argument. + * expr.h (hard_function_value): Declare it. + * calls.c (expand_call, emit_library_call_value): Update callers. + * function.c (aggregate_value_p): Ditto. + (diddle_return_value): Must look at the outgoing registers + on archs with register windows. + Mon Nov 15 20:46:45 1999 Richard Henderson <rth@cygnus.com> * alpha.c (alpha_build_va_list): Use make_lang_type and @@ -35,7 +44,7 @@ Mon Nov 15 15:33:18 1999 Richard Henderson <rth@cygnus.com> Based on proposed addition from David Edelsohn. 1999-11-15 Robert Lipe <RobertLipe@usa.net> - Bruce Korb <autogen@linuxbox.com> + Bruce Korb <autogen@linuxbox.com> * fixinc/inclhack.def (AAB_svr4_replace_byteorder): added. Takes advantage of GCC features @@ -150,7 +159,7 @@ Fri Nov 12 08:54:22 1999 Mark Mitchell <mark@codesourcery.com> Fri Nov 12 08:04:45 1999 Catherine Moore <clm@cygnus.com> * defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Use - ASM_OUTPUT_LABEL. + ASM_OUTPUT_LABEL. Fri Nov 12 13:31:54 1999 Bernd Schmidt <bernds@cygnus.co.uk> @@ -222,15 +231,15 @@ Wed Nov 10 15:56:16 1999 Jeffrey A Law (law@cygnus.com) worklists. Fix boundary cases. Compute maximal solutions. (compute_laterin, compute_nearerout): Similarly. - * dwarf2out.c (add_AT_location_description): Allow - (mem (plus (pseudo) (...)) too. + * dwarf2out.c (add_AT_location_description): Allow + (mem (plus (pseudo) (...)) too. Wed Nov 10 10:52:42 1999 Tom Tromey <tromey@cygnus.com> * gcc.c (do_spec_1): Support text between `%u' and `%O'. Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be> - Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * cppinit.c: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. @@ -279,9 +288,9 @@ Wed Nov 10 04:58:09 1999 Alexandre Oliva <oliva@lsd.ic.unicamp.br> Wed Nov 10 00:02:53 1999 Jeffrey A Law (law@cygnus.com) - * flow.c (compute_flow_dominators): No longer treat basic block 0 - or (n_basic_blocks - 1) specially. Clear the AUX field before - starting computation of doms/pdoms. Fix initial state for pdoms. + * flow.c (compute_flow_dominators): No longer treat basic block 0 + or (n_basic_blocks - 1) specially. Clear the AUX field before + starting computation of doms/pdoms. Fix initial state for pdoms. Wed Nov 10 03:58:08 1999 Alexandre Oliva <oliva@lsd.ic.unicamp.br> @@ -445,8 +454,8 @@ Sun Nov 7 20:55:14 1999 Mark Mitchell <mark@codesourcery.com> Sun Nov 7 19:41:17 1999 Catherine Moore <clm@cygnus.com> - * config/elfos.h (ASM_DECLARE_FUNCTION_NAME): Conditionally define. - (ASM_DECLARE_FUNCTION_SIZE): Conditionally define. + * config/elfos.h (ASM_DECLARE_FUNCTION_NAME): Conditionally define. + (ASM_DECLARE_FUNCTION_SIZE): Conditionally define. Sun Nov 7 10:23:28 1999 Mark P. Mitchell <mark@codesourcery.com> @@ -512,9 +521,9 @@ Sat Nov 6 09:52:09 1999 Richard Henderson <rth@cygnus.com> Sat Nov 6 07:48:59 1999 Catherine Moore <clm@cygnus.com> - * config/svr4.h (ASM_DECLARE_FUNCTION): Check if already - defined. - (ASM_DECLARE_FUNCTION_SIZE): Likewise. + * config/svr4.h (ASM_DECLARE_FUNCTION): Check if already + defined. + (ASM_DECLARE_FUNCTION_SIZE): Likewise. Fri Nov 5 18:33:39 1999 J"orn Rennecke <amylaar@cygnus.co.uk> diff --git a/gcc/calls.c b/gcc/calls.c index 15b64e0e..48c0d5e 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2211,9 +2211,9 @@ expand_call (exp, target, ignore) { if (pcc_struct_value) valreg = hard_function_value (build_pointer_type (TREE_TYPE (exp)), - fndecl); + fndecl, 0); else - valreg = hard_function_value (TREE_TYPE (exp), fndecl); + valreg = hard_function_value (TREE_TYPE (exp), fndecl, 0); } /* Precompute all register parameters. It isn't safe to compute anything @@ -3138,7 +3138,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue, #ifdef PCC_STATIC_STRUCT_RETURN rtx pointer_reg = hard_function_value (build_pointer_type (type_for_mode (outmode, 0)), - 0); + 0, 0); mem_value = gen_rtx_MEM (outmode, pointer_reg); pcc_struct_value = 1; if (value == 0) diff --git a/gcc/explow.c b/gcc/explow.c index 857bcc6..437c935 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -1541,14 +1541,24 @@ probe_stack_range (first, size) in which a scalar value of data type VALTYPE was returned by a function call to function FUNC. FUNC is a FUNCTION_DECL node if the precise function is known, - otherwise 0. */ + otherwise 0. + OUTGOING is 1 if on a machine with register windows this function + should return the register in which the function will put its result + and 0 otherwise. */ rtx -hard_function_value (valtype, func) +hard_function_value (valtype, func, outgoing) tree valtype; tree func ATTRIBUTE_UNUSED; + int outgoing ATTRIBUTE_UNUSED; { - rtx val = FUNCTION_VALUE (valtype, func); + rtx val; +#ifdef FUNCTION_OUTGOING_VALUE + if (outgoing) + val = FUNCTION_OUTGOING_VALUE (valtype, func); + else +#endif + val = FUNCTION_VALUE (valtype, func); if (GET_CODE (val) == REG && GET_MODE (val) == BLKmode) { @@ -1067,7 +1067,7 @@ extern rtx trampoline_address PROTO((tree)); /* Return an rtx that refers to the value returned by a function in its original home. This becomes invalid if any more code is emitted. */ -extern rtx hard_function_value PROTO((tree, tree)); +extern rtx hard_function_value PROTO((tree, tree, int)); extern rtx prepare_call_address PROTO((rtx, tree, rtx *, int)); diff --git a/gcc/function.c b/gcc/function.c index 000ea2d..7c491df 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3992,7 +3992,7 @@ aggregate_value_p (exp) return 1; /* Make sure we have suitable call-clobbered regs to return the value in; if not, we must return it in memory. */ - reg = hard_function_value (type, 0); + reg = hard_function_value (type, 0, 0); /* If we have something other than a REG (e.g. a PARALLEL), then assume it is OK. */ @@ -6211,7 +6211,7 @@ diddle_return_value (code) /* Use hard_function_value to avoid creating a reference to a BLKmode register in the USE/CLOBBER insn. */ return_reg = hard_function_value (TREE_TYPE (decl_result), - current_function_decl); + current_function_decl, 1); REG_FUNCTION_VALUE_P (return_reg) = 1; emit_insn (gen_rtx_fmt_e (code, VOIDmode, return_reg)); } |