* [parisc-linux] libqthreads and hppa-linux
@ 2001-08-02 4:04 LaMont Jones
2001-08-02 4:39 ` Alan Modra
2001-08-02 18:42 ` Matthew Wilcox
0 siblings, 2 replies; 8+ messages in thread
From: LaMont Jones @ 2001-08-02 4:04 UTC (permalink / raw)
To: parisc-linux; +Cc: LaMont Jones
I started to play with getting the hppa assembly code in guile-core to work
on pa-linux, but ran into challenges with %farg[0-3], which aren't defined
by the assembler...
I'm about to upload a source NMU of guile-core, which has qt/md/hppa*-linux.?
in it. If someone wanted to take that the rest of the way, I'd be happy to
upload it...
lamont
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] libqthreads and hppa-linux
2001-08-02 4:04 [parisc-linux] libqthreads and hppa-linux LaMont Jones
@ 2001-08-02 4:39 ` Alan Modra
2001-08-02 4:44 ` LaMont Jones
2001-08-02 18:42 ` Matthew Wilcox
1 sibling, 1 reply; 8+ messages in thread
From: Alan Modra @ 2001-08-02 4:39 UTC (permalink / raw)
To: LaMont Jones; +Cc: parisc-linux
On Wed, Aug 01, 2001 at 10:04:34PM -0600, LaMont Jones wrote:
> I started to play with getting the hppa assembly code in guile-core to work
> on pa-linux, but ran into challenges with %farg[0-3], which aren't defined
> by the assembler...
So fix the assembler! gas/config/tc-hppa.c:pre_defined_registers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] libqthreads and hppa-linux
2001-08-02 4:39 ` Alan Modra
@ 2001-08-02 4:44 ` LaMont Jones
2001-08-02 4:49 ` LaMont Jones
2001-08-02 5:00 ` Alan Modra
0 siblings, 2 replies; 8+ messages in thread
From: LaMont Jones @ 2001-08-02 4:44 UTC (permalink / raw)
To: Alan Modra; +Cc: LaMont Jones, parisc-linux, lamont
> On Wed, Aug 01, 2001 at 10:04:34PM -0600, LaMont Jones wrote:
> > I started to play with getting the hppa assembly code in guile-core to work
> > on pa-linux, but ran into challenges with %farg[0-3], which aren't defined
> > by the assembler...
> 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.
How close is the calling convention between hp-ux and pa-linux?
lamont
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] libqthreads and hppa-linux
2001-08-02 4:44 ` LaMont Jones
@ 2001-08-02 4:49 ` LaMont Jones
2001-08-02 5:44 ` Alan Modra
2001-08-02 5:00 ` Alan Modra
1 sibling, 1 reply; 8+ messages in thread
From: LaMont Jones @ 2001-08-02 4:49 UTC (permalink / raw)
To: LaMont Jones; +Cc: Alan Modra, parisc-linux, lamont
> > 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...)
lamont
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] libqthreads and hppa-linux
2001-08-02 4:44 ` LaMont Jones
2001-08-02 4:49 ` LaMont Jones
@ 2001-08-02 5:00 ` Alan Modra
1 sibling, 0 replies; 8+ messages in thread
From: Alan Modra @ 2001-08-02 5:00 UTC (permalink / raw)
To: LaMont Jones; +Cc: parisc-linux
On Wed, Aug 01, 2001 at 10:44:00PM -0600, LaMont Jones wrote:
> > On Wed, Aug 01, 2001 at 10:04:34PM -0600, LaMont Jones wrote:
> > > I started to play with getting the hppa assembly code in guile-core to work
> > > on pa-linux, but ran into challenges with %farg[0-3], which aren't defined
> > > by the assembler...
> > 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.
>
> How close is the calling convention between hp-ux and pa-linux?
Practically identical. farg0..3 is fr4..7 from memory, and I think they
are in that order. Test it out by writing a little C code, and
compiling with -S.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] libqthreads and hppa-linux
2001-08-02 4:49 ` LaMont Jones
@ 2001-08-02 5:44 ` Alan Modra
2001-08-02 6:48 ` Alan Modra
0 siblings, 1 reply; 8+ messages in thread
From: Alan Modra @ 2001-08-02 5:44 UTC (permalink / raw)
To: LaMont Jones; +Cc: parisc-linux
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] libqthreads and hppa-linux
2001-08-02 5:44 ` Alan Modra
@ 2001-08-02 6:48 ` Alan Modra
0 siblings, 0 replies; 8+ messages in thread
From: Alan Modra @ 2001-08-02 6:48 UTC (permalink / raw)
To: LaMont Jones, parisc-linux
On Thu, Aug 02, 2001 at 03:14:15PM +0930, Alan Modra wrote:
> Hmm, I wonder if you've found a gcc bug?
Curiousity got the better of me, and I dug up copy of the ABI. Looks
like gcc is doing the right thing.
"Floating-Point (32 Bits, single-precision): One word, callee cannot assume
a valid floating-point number.
Floating-Point (64 Bits, double-precision): Two words, double word aligned
(high order word in odd arg word). This may create a void in the argument
list. 64-bit floating-point value parameters mapped to the first and second
double-words of the argument list should be passed in farg1 and farg3,
respectively. farg0 and farg2 are never used for 64-bit floating-point
parameters. Callee cannot assume a valid floating-point number."
Makes a weird sort of sense when you realise that the register args have
a mapping to stack slots, and there are only 4x32 bits of stack space,
or 2 doubles.
Alan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] libqthreads and hppa-linux
2001-08-02 4:04 [parisc-linux] libqthreads and hppa-linux LaMont Jones
2001-08-02 4:39 ` Alan Modra
@ 2001-08-02 18:42 ` Matthew Wilcox
1 sibling, 0 replies; 8+ messages in thread
From: Matthew Wilcox @ 2001-08-02 18:42 UTC (permalink / raw)
To: LaMont Jones; +Cc: parisc-linux
On Wed, Aug 01, 2001 at 10:04:34PM -0600, LaMont Jones wrote:
> I started to play with getting the hppa assembly code in guile-core to work
> on pa-linux, but ran into challenges with %farg[0-3], which aren't defined
> by the assembler...
I already discussed this in detail with the maintainer; details of the
discussion can be found in the BTS. I'm disappointed you decided to
waste your time on this without reading that discussion or talking to me.
> I'm about to upload a source NMU of guile-core, which has qt/md/hppa*-linux.?
> in it. If someone wanted to take that the rest of the way, I'd be happy to
> upload it...
No, don't do this, it's completely unnecessary.
--
Revolutions do not require corporate support.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-08-02 18:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-02 4:04 [parisc-linux] libqthreads and hppa-linux LaMont Jones
2001-08-02 4:39 ` Alan Modra
2001-08-02 4:44 ` LaMont Jones
2001-08-02 4:49 ` LaMont Jones
2001-08-02 5:44 ` Alan Modra
2001-08-02 6:48 ` Alan Modra
2001-08-02 5:00 ` Alan Modra
2001-08-02 18:42 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox