OSDN Git Service

* calls.c (emit_library_call_value_1): Handle partial registers
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Feb 2007 00:37:09 +0000 (00:37 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Feb 2007 00:37:09 +0000 (00:37 +0000)
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

gcc/ChangeLog
gcc/calls.c

index 888ac2e..a8f4170 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-28  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+       * calls.c (emit_library_call_value_1): Handle partial registers
+       correctly when building up CALL_INSN_FUNCTION_USAGE.
+       
 2007-02-27  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa/predicates.md (move_src_operand): Allow zero for mode.
index d9ba08c..8723e1f 100644 (file)
@@ -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.  */