This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Err, alignment_pad stuff
- To: clm at cygnus dot com
- Subject: Err, alignment_pad stuff
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 04 Nov 1999 07:14:27 -0700
- Cc: rth at cygnus dot com, gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
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