public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Matt Thomas <matt@3am-software.com>
Cc: GCC <gcc@gcc.gnu.org>, binutils <binutils@sourceware.org>,
	 Prasun Kapoor <prasun.kapoor@caviumnetworks.com>
Subject: Re: RFC: A new MIPS64 ABI
Date: Tue, 15 Feb 2011 17:41:00 -0000	[thread overview]
Message-ID: <4D5ABAD7.6030901@caviumnetworks.com> (raw)
In-Reply-To: <CFAB1AFC-3E14-4A56-934A-DE40094A8249@3am-software.com>

On 02/14/2011 07:00 PM, Matt Thomas wrote:
>
> On Feb 14, 2011, at 6:50 PM, David Daney wrote:
>
>> On 02/14/2011 06:33 PM, Matt Thomas wrote:
>>>
>>> On Feb 14, 2011, at 6:22 PM, David Daney wrote:
>>>
>>>> On 02/14/2011 04:15 PM, Matt Thomas wrote:
>>>>>
>>>>> I have to wonder if it's worth the effort.  The primary problem I see
>>>>> is that this new ABI requires a 64bit kernel since faults through the
>>>>> upper 2G will go through the XTLB miss exception vector.
>>>>>
>>>>
>>>> Yes, that is correct.  It is a 64-bit ABI, and like the existing n32 ABI requires a 64-bit kernel.
>>>
>>> N32 doesn't require a LP64 kernel, just a 64-bit register aware kernel.
>>> Your N32-big does require a LP64 kernel.
>>>
>>
>> But using 'official' kernel sources the only way to get a 64-bit register aware kernel is for it to also be LP64.  So effectively, you do in fact need a 64-bit kernel to run n32 userspace code.
>
> Not all the world is Linux. :)  NetBSD supports N32 kernels.
>

Use of LP32 in the kernel is only really appropiate in systems with a 
small amount of memory.  The proposed n32-big would run on such systems, 
but would probably *not* have an advantage over standard n32.



>> My proposed ABI would need trivial kernel changes:
>>
>> o Fix a couple of places where pointers are sign extended instead of zero extended.
>
> I think you'll find there are more of these than you'd expect.

You could be right, but to date in auditing the Linux kernel, 
sigaction() is the only place I have found.


>
>> o Change the stack address and address ranges returned by mmap().
>
> My biggest concern is that many many mips opcodes expect properly
> sign-extended value for registers.  Thusly N32-big will require
> using daddu/dadd/dsub/dsubu for addresses.  So that's yet another
> departure from N32 which can use addu/add/sub/subu.


That's right.  Which is why I said...

>
>> The main work would be in the compiler toolchain and runtime libraries.
>
> You'd also need to update gas for la and dla expansion.
>

I am counting gas, ld and libc as part of the 'compiler toolchain'

David Daney

  reply	other threads:[~2011-02-15 17:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 20:29 David Daney
2011-02-15  0:15 ` Matt Thomas
2011-02-15  1:57   ` Paul Koning
2011-02-15  2:15     ` Joe Buck
2011-02-15  2:16       ` Paul Koning
2011-02-15  2:26       ` David Daney
2011-02-15  2:35         ` Matt Thomas
2011-02-15  2:43           ` David Daney
2011-02-15 17:33       ` Joseph S. Myers
2011-02-15 18:15         ` David Daney
2011-02-15  2:22   ` David Daney
2011-02-15  2:33     ` Matt Thomas
2011-02-15  2:50       ` David Daney
2011-02-15  3:02         ` Matt Thomas
2011-02-15 17:41           ` David Daney [this message]
2011-02-15 17:48             ` Paul Koning
2011-02-15 17:56 ` Alexandre Oliva
2011-02-15 18:08   ` David Daney
2011-05-06  8:31     ` Alexandre Oliva
2011-05-06 17:00       ` David Daney
2011-02-18  1:02 ` David Daney
     [not found] <4D5990A4.2050308__41923.1521235362$1297715435$gmane$org@caviumnetworks.com>
2011-02-21 19:45 ` Richard Sandiford
2011-05-09 14:27   ` Ralf Baechle
2011-05-09 17:47     ` David Daney

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=4D5ABAD7.6030901@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=binutils@sourceware.org \
    --cc=gcc@gcc.gnu.org \
    --cc=matt@3am-software.com \
    --cc=prasun.kapoor@caviumnetworks.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).