* [parisc-linux] parsic function calling convention
@ 2002-05-17 1:52 James Mc Parlane
2002-05-17 4:07 ` Grant Grundler
0 siblings, 1 reply; 5+ messages in thread
From: James Mc Parlane @ 2002-05-17 1:52 UTC (permalink / raw)
To: parisc-linux
Does anyone please have info, or know where I can find info on the parisc2.0
calling convention under hpux and parisc-linux?
I am attempting to add parisc support to libffi.
Thankyou.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] parsic function calling convention
2002-05-17 1:52 [parisc-linux] parsic function calling convention James Mc Parlane
@ 2002-05-17 4:07 ` Grant Grundler
2002-05-17 6:36 ` Randolph Chung
0 siblings, 1 reply; 5+ messages in thread
From: Grant Grundler @ 2002-05-17 4:07 UTC (permalink / raw)
To: James Mc Parlane; +Cc: parisc-linux
James Mc Parlane wrote:
> Does anyone please have info, or know where I can find info on the parisc2.0
> calling convention under hpux and parisc-linux?
There's several calling conventions that can run under PA2.0 architecture.
HPUX supports PA1.1 SOM and PA2.0 64-bit ELF.
The 64-bit ELF is the same for both OSs.
parisc-linux kernel has limited support for PA1.1 SOM but everything for
debian-hppa is built using PA1.1 ELF (32-bit).
I'm not aware of any authoritative, detailed documentation for PA1.1 ELF.
Since PA1.1 (32-bit) ELF is hack from the existing 64-bit ELF,
You could start by looking at PA2.0 calling convention for HPUX.
Either docs.hp.com or www.parisc-linux.org should have that specification.
Otherwise, just write something in 'C' and see what gcc produces.
grant
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] parsic function calling convention
2002-05-17 4:07 ` Grant Grundler
@ 2002-05-17 6:36 ` Randolph Chung
2002-05-17 14:42 ` John David Anglin
0 siblings, 1 reply; 5+ messages in thread
From: Randolph Chung @ 2002-05-17 6:36 UTC (permalink / raw)
To: James Mc Parlane; +Cc: parisc-linux
> I'm not aware of any authoritative, detailed documentation for PA1.1 ELF.
> Since PA1.1 (32-bit) ELF is hack from the existing 64-bit ELF,
> You could start by looking at PA2.0 calling convention for HPUX.
> Either docs.hp.com or www.parisc-linux.org should have that specification.
> Otherwise, just write something in 'C' and see what gcc produces.
From what I have seen, the 32-bit elf conventions are quite similar to
the 32-bit som conventions. the biggest difference i know off the top
of my head is that we don't do fp argument relocation.
http://www.parisc-linux.org/documentation/index.html has some good
links for the 32-bit SOM and 64-bit ELF runtime architectures.
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] parsic function calling convention
2002-05-17 6:36 ` Randolph Chung
@ 2002-05-17 14:42 ` John David Anglin
2002-05-17 15:58 ` Carlos O'Donell Jr.
0 siblings, 1 reply; 5+ messages in thread
From: John David Anglin @ 2002-05-17 14:42 UTC (permalink / raw)
To: randolph; +Cc: james, parisc-linux
> > I'm not aware of any authoritative, detailed documentation for PA1.1 ELF.
> > Since PA1.1 (32-bit) ELF is hack from the existing 64-bit ELF,
> > You could start by looking at PA2.0 calling convention for HPUX.
> > Either docs.hp.com or www.parisc-linux.org should have that specification.
> > Otherwise, just write something in 'C' and see what gcc produces.
>
> From what I have seen, the 32-bit elf conventions are quite similar to
> the 32-bit som conventions. the biggest difference i know off the top
> of my head is that we don't do fp argument relocation.
Yes, that's the main difference. For the most part, argument relocation
does not affect the code generated except in special situations (e.g.,
varargs). Further, there are no differences in the calling conventions
for PA1.0, PA1.1 and PA2.0 in either runtime.
For embedded products, you should be aware of TARGET_PORTABLE_RUNTIME.
This affects the type of branch used for calls. It could be specified
under hpux or linux but I have no idea whether it would work.
I have wondered if parisc-linux actually supports the PA2.0 architecture
in the ELF32 runtime. I think that's there is more in the compiler that
could be done to take advantage of the 64-bit general registers and 64-bit
operations available under PA2.0.
There are some subtle differences between the SOM and ELF32 runtimes that
arise because of the different capabilities of the linkers. Long calls
are more likely to be needed with the GNU linker because it places stubs
at the beginning of translation units unless you compile with
-ffunction-sections.
There are differences in the assembly language output from the compiler
for hpux and linux. These mainly involve different directives. The linux
directives are similar to those for the i386 linux port.
You will probably need to understand stub generation to implement libffi
if I recall correctly.
Hpux uses a segmented memory model. Linux uses a flat model.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] parsic function calling convention
2002-05-17 14:42 ` John David Anglin
@ 2002-05-17 15:58 ` Carlos O'Donell Jr.
0 siblings, 0 replies; 5+ messages in thread
From: Carlos O'Donell Jr. @ 2002-05-17 15:58 UTC (permalink / raw)
To: james; +Cc: randolph, dave, parisc-linux
> You will probably need to understand stub generation to implement libffi
> if I recall correctly.
>
> Hpux uses a segmented memory model. Linux uses a flat model.
>
> Dave
Last I remember there was someone porting avcall.
They might be a good resource.
http://lists.debian.org/debian-hppa/2002/debian-hppa-200203/msg00073.html
Here is some general discussion on fp passing:
http://lists.parisc-linux.org/hypermail/parisc-linux/8277.html
c.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-05-17 15:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-17 1:52 [parisc-linux] parsic function calling convention James Mc Parlane
2002-05-17 4:07 ` Grant Grundler
2002-05-17 6:36 ` Randolph Chung
2002-05-17 14:42 ` John David Anglin
2002-05-17 15:58 ` Carlos O'Donell Jr.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.