diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-11-12 03:46:21 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-11-11 20:46:21 -0700 |
commit | d3f2edaeb9b41c23c6beeaeff944c0acb3c83658 (patch) | |
tree | fc45fad29345a93f5e7087cab7d4f1a66a3f74ad /gcc/function.c | |
parent | 35908e55886597894ddf26cf656546f718f5a5c5 (diff) | |
download | gcc-d3f2edaeb9b41c23c6beeaeff944c0acb3c83658.zip gcc-d3f2edaeb9b41c23c6beeaeff944c0acb3c83658.tar.gz gcc-d3f2edaeb9b41c23c6beeaeff944c0acb3c83658.tar.bz2 |
function.c (diddle_return_value): Use hard_function_value to get an rtx suitable for use in the USE/CLOBBER insn.
* function.c (diddle_return_value): Use hard_function_value to
get an rtx suitable for use in the USE/CLOBBER insn.
From-SVN: r30494
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c index edf979f..a8ed54c 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6200,10 +6200,16 @@ void diddle_return_value (code) enum rtx_code code; { - rtx return_reg = DECL_RTL (DECL_RESULT (current_function_decl)); + rtx return_reg; + tree decl_result = DECL_RESULT (current_function_decl); - if (return_reg) + if (DECL_RTL (decl_result)) { + /* 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); + if (GET_CODE (return_reg) == REG && REGNO (return_reg) < FIRST_PSEUDO_REGISTER) emit_insn (gen_rtx_fmt_e (code, VOIDmode, return_reg)); |