* calls.c (emit_library_call): Check for null REG.

From-SVN: r32270
This commit is contained in:
Jason Merrill 2000-03-01 00:01:31 +00:00 committed by Jason Merrill
parent 1fcd0c12e3
commit 19e3f61a82
2 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2000-02-29 Jason Merrill <jason@casey.cygnus.com>
* calls.c (emit_library_call): Check for null REG.
2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
* c-decl.c (current_function_decl): Move to toplev.c.

View File

@ -3086,7 +3086,7 @@ emit_library_call VPARAMS((rtx orgfun, int no_queue, enum machine_mode outmode,
/* Handle calls that pass values in multiple non-contiguous
locations. The PA64 has examples of this for library calls. */
if (GET_CODE (reg) == PARALLEL)
if (reg != 0 && GET_CODE (reg) == PARALLEL)
emit_group_load (reg, val,
GET_MODE_SIZE (GET_MODE (val)),
GET_MODE_ALIGNMENT (GET_MODE (val)));
@ -3103,10 +3103,11 @@ emit_library_call VPARAMS((rtx orgfun, int no_queue, enum machine_mode outmode,
/* Any regs containing parms remain in use through the call. */
for (count = 0; count < nargs; count++)
{
if (GET_CODE (argvec[count].reg) == PARALLEL)
use_group_regs (&call_fusage, argvec[count].reg);
else if (argvec[count].reg != 0)
use_reg (&call_fusage, argvec[count].reg);
rtx reg = argvec[count].reg;
if (reg != 0 && GET_CODE (argvec[count].reg) == PARALLEL)
use_group_regs (&call_fusage, reg);
else if (reg != 0)
use_reg (&call_fusage, reg);
}
/* Don't allow popping to be deferred, since then
@ -3673,7 +3674,7 @@ emit_library_call_value VPARAMS((rtx orgfun, rtx value, int no_queue,
/* Handle calls that pass values in multiple non-contiguous
locations. The PA64 has examples of this for library calls. */
if (GET_CODE (reg) == PARALLEL)
if (reg != 0 && GET_CODE (reg) == PARALLEL)
emit_group_load (reg, val,
GET_MODE_SIZE (GET_MODE (val)),
GET_MODE_ALIGNMENT (GET_MODE (val)));
@ -3692,10 +3693,11 @@ emit_library_call_value VPARAMS((rtx orgfun, rtx value, int no_queue,
/* Any regs containing parms remain in use through the call. */
for (count = 0; count < nargs; count++)
{
if (GET_CODE (argvec[count].reg) == PARALLEL)
use_group_regs (&call_fusage, argvec[count].reg);
else if (argvec[count].reg != 0)
use_reg (&call_fusage, argvec[count].reg);
rtx reg = argvec[count].reg;
if (reg != 0 && GET_CODE (reg) == PARALLEL)
use_group_regs (&call_fusage, reg);
else if (reg != 0)
use_reg (&call_fusage, reg);
}
/* Pass the function the address in which to return a structure value. */