[parisc-linux] libqthreads and hppa-linux
Alan Modra
amodra@bigpond.net.au
Thu, 2 Aug 2001 15:14:15 +0930
On Wed, Aug 01, 2001 at 10:49:45PM -0600, LaMont Jones wrote:
> > > So fix the assembler! gas/config/tc-hppa.c:pre_defined_registers
> > Dunno which regs they are, and don't have a current runtime arch doc at
> > home.
>
> This code seems to think that four args are passed in regs, but the code
> that cc generates appears to only pass two doubles in regs. Likewise,
> are the FR's numbered the same? (The names were rather funky on hp-ux,
> due to legacy issues...)
Hmm, I wonder if you've found a gcc bug?
#if 1
#define FP float
#else
#define FP double
#endif
extern FP f1 (FP a);
extern FP f2 (FP a, FP b);
extern FP f3 (FP a, FP b, FP c);
extern FP f4 (FP a, FP b, FP c, FP d);
int main (void)
{
return f1 (1.) + f2 (1., 2.) + f3 (1., 2., 3.) + f4 (1., 2., 3., 4.);
}
With FP as float, I get fr4L, fr5L, fr6L, fr7L used in that order for
floating point args. With FP as double, I get fr5, fr7, stack args.
Weird, but then the pa ABI _is_ weird. I think you do need to check
that ABI document.
Alan