Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: Dominic Sweetman <dom@mips.com>
Cc: Jun Sun <jsun@mvista.com>, linux-mips@linux-mips.org
Subject: Re: anybody tried NPTL?
Date: Thu, 19 Aug 2004 09:01:25 -0700	[thread overview]
Message-ID: <4124CED5.1020608@avtrex.com> (raw)
In-Reply-To: <16676.46694.564448.344602@arsenal.mips.com>

Dominic Sweetman wrote:
> So we're proposing:
> 
> o The register name<->number mapping is that of n64.
> 
> o Calling convention: register-, not slot-based. Each argument is
>   represented by a register value. Arguments 0-7 travel in registers
>   a0-7 (or fa0-7 as required for floating point types). If there are
>   more than eight arguments, further ones are formed as if put in a
>   register and then saved on the stack into a 64-bit slot (more than 8
>   arguments is rare enough that we can afford to standardise on the
>   big slots).
>   
> o Use floating point registers for double and float arguments, and
>   integer registers for all integer/pointer values which will
>   fit. Larger or structured data items are implicitly passed by
>   reference: to maintain pass-by-value semantics, the compiler uses a
>   copy-on-write trick if software writes a by-reference argument (or
>   takes its address).  I'm told gcc is happy enough to do that.
> 
> o The return value comes back in two registers, with the second
>   return-register used only when the return value consists of two
>   scalars (ie a complex or double-precision number). [Folklore insists
>   this is essential for Fortran support of complex numbers, and I
>   don't want to fight folklore].
> 
>   All other non-scalar return values are returned via a pointer
>   specified by the caller as an implicit first argument.
> 
> o Reserved registers: all the traditional ones. But now:
> 
>   - gp will be the GOT pointer in Linux, and should be defined as
>     saved (ie a function must preserve values in this registers, which
>     means it will need to save-and-restore the register if it is
>     written locally).
>     
>   - we'll define some other register as a per-thread data pointer.
> 
> Some details are still to be worked out.  But do you think this is on
> the right lines?  And who would like to take an active part in
> specifying or reviewing?
> 
All of this sounds good to me.  However my current concerns are how to
make my code run on a mips32[r2] core with no floating point.  We are
using several different systems with variations of this cpu type.

So for me, making sure that a soft-float variant of the ABI is well
specified is also important.  I suppose it would be to treat
float/double values as appropriate encoding of 32/64 bit integer values.

David Daney.

  parent reply	other threads:[~2004-08-19 16:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04 22:29 anybody tried NPTL? Jun Sun
2004-08-05  1:08 ` Kumba
2004-08-05 17:14   ` Jun Sun
2004-08-06  2:03   ` Ralf Baechle
2004-08-19 14:17 ` Dominic Sweetman
2004-08-19 14:31   ` Alec Voropay
2004-08-19 14:31     ` Alec Voropay
2004-08-20  6:07     ` Dominic Sweetman
2004-08-20  6:07       ` Dominic Sweetman
2004-08-23 12:28     ` Ralf Baechle
2004-08-23 15:09       ` Alec Voropay
2004-08-23 15:09         ` Alec Voropay
2004-08-23 17:19         ` Ralf Baechle
2004-08-19 16:01   ` David Daney [this message]
2004-08-20  6:19     ` Dominic Sweetman
2004-08-19 22:16   ` Jun Sun
2004-08-20 13:46     ` Dominic Sweetman
2004-08-23 13:28       ` Daniel Jacobowitz
2004-08-23 17:12         ` Ralf Baechle
2004-08-23 17:44           ` Daniel Jacobowitz
2004-08-23 19:13             ` Ralf Baechle
2004-08-23 17:37         ` Jun Sun
2004-08-23 19:25           ` Ralf Baechle
2004-08-20 13:12   ` Thiemo Seufer
2004-08-20 16:52     ` Dominic Sweetman
2004-09-01  9:17   ` Richard Sandiford

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=4124CED5.1020608@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=dom@mips.com \
    --cc=jsun@mvista.com \
    --cc=linux-mips@linux-mips.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox