All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlos O'Donell Jr." <carlos@baldric.uwo.ca>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: parisc-linux@parisc-linux.org, will@misconception.org.uk
Subject: Re: [parisc-linux] Re: Fwd: Re: Any hppa gurus?
Date: Sat, 30 Mar 2002 15:11:30 -0500	[thread overview]
Message-ID: <20020330151130.B16616@systemhalted> (raw)
In-Reply-To: <200203301736.g2UHaAic028252@hiauly1.hia.nrc.ca>; from dave@hiauly1.hia.nrc.ca on Sat, Mar 30, 2002 at 12:36:09PM -0500

> 
> No.  Although it might seem that you could pass 4 floats and 4 ints, this
> is not done.  The 32-bit linux ABI is exactly the same as the 32-bit hpux ABI
> except that argument relocations aren't done.  There are situations (e.g.,
> indirect calls) where an argument is passed in both general and floating
> registers under hpux because the linker doesn't know how to relocate
> the arguments for the call.  Thus, you can't use gr24 for an int argument
> and fr5 for a different float argument.
> 
> This isn't going to change as changing the ABI would require recompilation
> of everthing, as well as modifications to gcc, binutils, gdb and the
> runtime documentation.  You can find the HP runtime documents here:
> <http://h21007.www2.hp.com/dspp/tech/tech_TechTypeListingPage_IDX/1,1704,10403,00.html>.
>

It's clear that you can't pass 8 words, since the 32-Bit ABI says that
only the first 4 words are passed in registers as parameters for a function (2-26).

I'm not sure what's implied by the need for 4 words of "spill over" in the stack
for the first 4 arguments to the function call.

int,int,float produces:

	Produced	Produced		Expected

	int	gr26	fr7	-----		===	float
	int	gr25	fr6	float		===	-----
	---	gr24	fr5	-----		---	-----
	---	gr23	fr4	-----		---	-----

int,float,int produces:

	Produced	Produced		Expected

	int	gr26	fr7	-----		===	float
	---	gr25	fr6	-----		int	-----
	int	gr24	fr5	float		---	-----
	---	gr23	fr4	-----		---	-----

int,float,double produces:

	Produced	Produced		Expected

	int	gr26	fr7	double		===	float
	---	gr25	fr6	+++		---	---
	---	gr24	fr5	float		---	double
	---	gr23	fr4	---		---	+++


I generally read from the 274 Page pdf HPUX 11.00 v1.0
 "The 32-Bit PARISC Run-Time Architecture Document"

It's become a little game lately ;) I build some code, and try to 
second guess what the .s file will contain... and I'm usually wrong.
Which just means that I need to start looking at more code to see
how things were implemented.


Lately I was thrown by the call to printf (vararg):

char*,int,double,int,float,int,float:

	Produced		Produced	

        char		gr26	fr7	doubleH
        int		gr25	fr6	doubleL
        doubleH		gr24	fr5	-----
        doubleL		gr23	fr4	-----

Which really leaves me scratching my head, since gr24 and gr23
shouldn't be used for relocation in this case? I guess varargs
are another cute case :}

--

Re: New ABI -> Possibly minimal perforamnce increase, and loss of HPUX compatibility.

  reply	other threads:[~2002-03-30 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E16qeEE-0000jh-00.2002-03-28-18-02-27@mail6.svr.pol.co.uk>
     [not found] ` <20020328143202.I12094@systemhalted>
     [not found]   ` <E16qkq2-0008AG-00.2002-03-29-01-05-55@mail7.svr.pol.co.uk>
2002-03-30 15:47     ` [parisc-linux] Re: Fwd: Re: Any hppa gurus? Carlos O'Donell Jr.
2002-03-30 17:36       ` John David Anglin
2002-03-30 20:11         ` Carlos O'Donell Jr. [this message]
2002-03-30 21:32           ` John David Anglin
2002-03-30 21:56             ` John David Anglin
2002-04-02 13:47             ` Carlos O'Donell Jr.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020330151130.B16616@systemhalted \
    --to=carlos@baldric.uwo.ca \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=parisc-linux@parisc-linux.org \
    --cc=will@misconception.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.