This is the mail archive of the gcc@gcc.gnu.org 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]

output_func_start_profiler vs __bb_init_func



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?


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