This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Fix PR target/14454

On Sun, Oct 10, 2004 at 08:10:53PM +0200, Eric Botcazou wrote:
> 	* config/sparc/sparc.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Set to true.
> 	(sparc_output_mi_thunk): Simplify handling of delta offset.  Add
> 	handling of vcall offset.
> 	* doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Document VCALL_OFFSET.
> 	(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New target hook.

Looks good, except,

> ! 	  /* VCALL_OFFSET is a negative number whose typical range can be
> ! 	     estimated as -32768..0 in 32-bit mode.  In almost all cases
> ! 	     it is therefore cheaper to emit multiple add insns than
> ! 	     spilling and loading the constant into a register (at least
> ! 	     6 insns).  */
> ! 	  while (! SPARC_SIMM13_P (vcall_offset))
> ! 	    {
> ! 	      emit_insn (gen_add2_insn (scratch, increment));
> ! 	      vcall_offset += 4096;

You may want to bound this loop.  One can fairly easilly generate
artificial test cases for which this number is arbitrarily large.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]