diff options
author | Jeffrey A Law <law@cygnus.com> | 2000-02-29 22:42:58 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-02-29 15:42:58 -0700 |
commit | bf44874ee34bf00934f59c3b014d757da0e79523 (patch) | |
tree | 2ed463184749db51d465363650fc6c6718454a2f /gcc | |
parent | a7a1d2701f5d7e496d53fa19708219d192df91ba (diff) | |
download | gcc-bf44874ee34bf00934f59c3b014d757da0e79523.zip gcc-bf44874ee34bf00934f59c3b014d757da0e79523.tar.gz gcc-bf44874ee34bf00934f59c3b014d757da0e79523.tar.bz2 |
calls.c (emit_library_call): Do not abort if FUNCTION_ARG returns a PARALLEL.
* calls.c (emit_library_call): Do not abort if FUNCTION_ARG
returns a PARALLEL. Use emit_group_load and use_group_regs
as needed.
(emit_library_call_value): Similarly.
From-SVN: r32267
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/calls.c | 40 |
2 files changed, 35 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1d3567e..ccf6ea4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -5,6 +5,11 @@ Tue Feb 29 14:07:04 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Tue Feb 29 10:45:59 2000 Jeffrey A Law (law@cygnus.com) + * calls.c (emit_library_call): Do not abort if FUNCTION_ARG + returns a PARALLEL. Use emit_group_load and use_group_regs + as needed. + (emit_library_call_value): Similarly. + * pa/t-pa: Use quadlib.c instead of quadlib.asm. * pa/quadlib.asm: Remove. * pa/quadlib.c: New file. diff --git a/gcc/calls.c b/gcc/calls.c index dfa52e0..c4e6039 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2804,8 +2804,7 @@ emit_library_call VPARAMS((rtx orgfun, int no_queue, enum machine_mode outmode, argvec[count].mode = mode; argvec[count].reg = FUNCTION_ARG (args_so_far, mode, NULL_TREE, 1); - if (argvec[count].reg && GET_CODE (argvec[count].reg) == PARALLEL) - abort (); + #ifdef FUNCTION_ARG_PARTIAL_NREGS argvec[count].partial = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, mode, NULL_TREE, 1); @@ -3085,8 +3084,15 @@ emit_library_call VPARAMS((rtx orgfun, int no_queue, enum machine_mode outmode, rtx reg = argvec[argnum].reg; int partial = argvec[argnum].partial; - if (reg != 0 && partial == 0) + /* Handle calls that pass values in multiple non-contiguous + locations. The PA64 has examples of this for library calls. */ + if (GET_CODE (reg) == PARALLEL) + emit_group_load (reg, val, + GET_MODE_SIZE (GET_MODE (val)), + GET_MODE_ALIGNMENT (GET_MODE (val))); + else if (reg != 0 && partial == 0) emit_move_insn (reg, val); + NO_DEFER_POP; } @@ -3096,8 +3102,12 @@ 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 (argvec[count].reg != 0) - use_reg (&call_fusage, argvec[count].reg); + { + 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); + } /* Don't allow popping to be deferred, since then cse'ing of library calls could delete a call and leave the pop. */ @@ -3382,8 +3392,7 @@ emit_library_call_value VPARAMS((rtx orgfun, rtx value, int no_queue, argvec[count].mode = mode; argvec[count].reg = FUNCTION_ARG (args_so_far, mode, NULL_TREE, 1); - if (argvec[count].reg && GET_CODE (argvec[count].reg) == PARALLEL) - abort (); + #ifdef FUNCTION_ARG_PARTIAL_NREGS argvec[count].partial = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, mode, NULL_TREE, 1); @@ -3662,8 +3671,15 @@ emit_library_call_value VPARAMS((rtx orgfun, rtx value, int no_queue, rtx reg = argvec[argnum].reg; int partial = argvec[argnum].partial; - if (reg != 0 && partial == 0) + /* Handle calls that pass values in multiple non-contiguous + locations. The PA64 has examples of this for library calls. */ + if (GET_CODE (reg) == PARALLEL) + emit_group_load (reg, val, + GET_MODE_SIZE (GET_MODE (val)), + GET_MODE_ALIGNMENT (GET_MODE (val))); + else if (reg != 0 && partial == 0) emit_move_insn (reg, val); + NO_DEFER_POP; } @@ -3675,8 +3691,12 @@ 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 (argvec[count].reg != 0) - use_reg (&call_fusage, argvec[count].reg); + { + 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); + } /* Pass the function the address in which to return a structure value. */ if (mem_value != 0 && struct_value_rtx != 0 && ! pcc_struct_value) |