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]

Err, alignment_pad stuff




This has some problems.

Consider the following test for hppa1.1-hp-hpux:

void *__iob[3];
int all_time;

void
print_time (str, total)
     const char *str;
     int total;
{
  fprintf ((&__iob[1]) ,
           "time in %s: %d.%06d (%.0f%%)\n",
           str, total / 1000000, total % 1000000,
           (double)total / (double)all_time * 100.0);
}

We end up putting in a stack adjustment before the clal to fprintf.  This
is simply wrong:

[ ... ]
        ldo -4(%r30),%r30
[ ... ]
        bl fprintf,%r2

This can't work.  Two reasons.  First we're mis-aligning the stack.  The
stack must always stay 64bit aligned.  Second the PA is an
ACCUMULATE_OUTGOING_ARGS target -- meaning we should never do stack adjustments
around calls.  All stack space is allocated in the prologue.

I'm hoping the only problem is a missing #ifndef ACCUMULATE_OUTGOING_ARGS, but
I worry that we may be putting arguments in the wrong place.

jeff


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