public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* output_func_start_profiler vs __bb_init_func
@ 2002-05-31 22:44 DJ Delorie
  0 siblings, 0 replies; only message in thread
From: DJ Delorie @ 2002-05-31 22:44 UTC (permalink / raw)
  To: gcc


It looks like there is an inconsistency in how the call to
__bb_init_func is created in profile.c.  Note the return mode as if
the function returned a GCOV_TYPE_SIZE int:

output_func_start_profiler ()
{
  enum machine_mode mode = mode_for_size (GCOV_TYPE_SIZE, MODE_INT, 0);
  ...
  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__bb_init_func"), LCT_NORMAL,
		     mode, 1, table_address, Pmode);
}

But in libgcc2.c:

void
__bb_init_func (struct bb *blocks)

On targets where 64-bit ints are returned by reference (like big
structs), the call to __bb_init_func will be corrupted by the
unexpected extra (zeroth) parameter.

A simple replacement of mode -> VOIDmode seems to work.  Does this
sound right?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-31 23:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-31 22:44 output_func_start_profiler vs __bb_init_func DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).