From: bernds Date: Wed, 28 Feb 2007 00:37:09 +0000 (+0000) Subject: * calls.c (emit_library_call_value_1): Handle partial registers X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c6f16e501532212d779795772f8264f849447ab;p=thirdparty%2Fgcc.git * calls.c (emit_library_call_value_1): Handle partial registers correctly when building up CALL_INSN_FUNCTION_USAGE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122396 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 888ac2e61941..a8f41702d313 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-02-28 Bernd Schmidt + + * calls.c (emit_library_call_value_1): Handle partial registers + correctly when building up CALL_INSN_FUNCTION_USAGE. + 2007-02-27 John David Anglin * pa/predicates.md (move_src_operand): Allow zero for mode. diff --git a/gcc/calls.c b/gcc/calls.c index d9ba08c0ddb2..8723e1f4fae8 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -3774,7 +3774,18 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, if (reg != 0 && GET_CODE (reg) == PARALLEL) use_group_regs (&call_fusage, reg); else if (reg != 0) - use_reg (&call_fusage, reg); + { + int partial = argvec[count].partial; + if (partial) + { + int nregs; + gcc_assert (partial % UNITS_PER_WORD == 0); + nregs = partial / UNITS_PER_WORD; + use_regs (&call_fusage, REGNO (reg), nregs); + } + else + use_reg (&call_fusage, reg); + } } /* Pass the function the address in which to return a structure value. */