patch for expand_builtin_apply for sparc architecture

Richard Henderson rth@cygnus.com
Mon Feb 16 05:09:00 GMT 1998


In article <199802160833.JAA11275.cygnus.egcs.bugs@gargleblaster.cs.tu-berlin.de>,
Matthias Klose <Matthias.Klose@cs.tu-berlin.de> wrote:
>The following patch fixes the generation of an 'unimp 4095'
>instruction for the expansion of __builtin_apply on the sparc
>architecture; fix by Scott Christley (<scottc@net-community.com>), but
>doesn't seem to be submitted to the the egcs list.

You'll have to submit a test case and an explanation of why you think
this is correct.  The Sparc32 ABI calls for an unimp instruction to
be emitted following calls to functions that return structures.  The
0-4095 immediate is commentary, but that's all the room in that field
so we cannot simply remove the mask.

My guess is that it is yet another example of why __builtin_apply
is inadequate for the needs of all but completely stack-based calling
conventions and should not be used.


r~

>
>*** gcc/config/sparc/sparc.md.orig	Tue Feb 10 16:25:50 1998
>--- gcc/config/sparc/sparc.md	Mon Feb 16 09:09:47 1998
>***************
>*** 5368,5374 ****
>--- 5368,5378 ----
>      emit_call_insn
>        (gen_rtx (PARALLEL, VOIDmode,
>  		gen_rtvec (3, gen_rtx (CALL, VOIDmode, fn_rtx, nregs_rtx),
>+ #if 0
>  			   GEN_INT (INTVAL (operands[3]) & 0xfff),
>+ #else
>+ 			   operands[3],
>+ #endif
>  			   gen_rtx (CLOBBER, VOIDmode,
>  				    gen_rtx (REG, Pmode, 15)))));
>    else





More information about the Gcc-bugs mailing list