diff options
author | J"orn Rennecke <amylaar@redhat.com> | 2001-01-04 23:28:00 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2001-01-04 23:28:00 +0000 |
commit | e2a5f96bbfae7b9b30d76246c1cd58fe80dddd2c (patch) | |
tree | 3ff38e446f960e5596f4f68082e401c9737766e4 /gcc | |
parent | e9049f5741d04553d9a5de0ddc003c05048ee823 (diff) | |
download | gcc-e2a5f96bbfae7b9b30d76246c1cd58fe80dddd2c.zip gcc-e2a5f96bbfae7b9b30d76246c1cd58fe80dddd2c.tar.gz gcc-e2a5f96bbfae7b9b30d76246c1cd58fe80dddd2c.tar.bz2 |
integrate.c (expand_inline_function): Don't put a virtual register into the reg map.
* integrate.c (expand_inline_function): Don't put a virtual
register into the reg map.
* function.c (fixup_var_refs_1): If force_operand didn't put
the address into the target, move it there.
From-SVN: r38694
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/function.c | 4 | ||||
-rw-r--r-- | gcc/integrate.c | 11 |
3 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d422a7b..ac4f2e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Thu Jan 4 21:09:47 2001 J"orn Rennecke <amylaar@redhat.com> + + * integrate.c (expand_inline_function): Don't put a virtual + register into the reg map. + + * function.c (fixup_var_refs_1): If force_operand didn't put + the address into the target, move it there. + 2001-01-04 Mark Mitchell <mark@codesourcery.com> Special-case tree_decl/tree_list allocations. diff --git a/gcc/function.c b/gcc/function.c index bbd7ecc..90ca36a 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1916,7 +1916,9 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements) /* That failed. Fall back on force_operand and hope. */ start_sequence (); - force_operand (sub, y); + sub = force_operand (sub, y); + if (sub != y) + emit_insn (gen_move_insn (y, sub)); seq = gen_sequence (); end_sequence (); } diff --git a/gcc/integrate.c b/gcc/integrate.c index 30e1340..f6e4302 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1,6 +1,6 @@ /* Procedure integration for GNU CC. Copyright (C) 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GNU CC. @@ -989,6 +989,15 @@ expand_inline_function (fndecl, parms, target, ignore, type, { temp = force_operand (structure_value_addr, NULL_RTX); temp = force_reg (Pmode, temp); + /* A virtual register might be invalid in an insn, because + it can cause trouble in reload. Since we don't have access + to the expanders at map translation time, make sure we have + a proper register now. + If a virtual register is actually valid, cse or combine + can put it into the mapped insns. */ + if (REGNO (temp) >= FIRST_VIRTUAL_REGISTER + && REGNO (temp) <= LAST_VIRTUAL_REGISTER) + temp = copy_to_mode_reg (Pmode, temp); map->reg_map[REGNO (XEXP (loc, 0))] = temp; if (CONSTANT_P (structure_value_addr) |