linux-mips
[Top] [All Lists]

Re: Indy 64 or 32 bit?

To: "J. Scott Kasten" <jsk@tetracon-eng.net>
Subject: Re: Indy 64 or 32 bit?
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Wed, 8 Aug 2001 17:18:06 +0200
Cc: Brandon Barker <bebarker@meginc.com>, "linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
In-reply-to: <Pine.SGI.4.33.0108081042090.23638-100000@thor.tetracon-eng.net>; from jsk@tetracon-eng.net on Wed, Aug 08, 2001 at 11:02:44AM -0400
References: <20010808121706.A602@bacchus.dhis.org> <Pine.SGI.4.33.0108081042090.23638-100000@thor.tetracon-eng.net>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
On Wed, Aug 08, 2001 at 11:02:44AM -0400, J. Scott Kasten wrote:

>    gcc -mips3 -mint64 test.c -o test
> 
> The file command says:
> 
>   test:           ELF N32 MSB mips-3 dynamic executable (not stripped) MIPS - 
> version 1
> 
> Run:
> 
>   sizeof(int) = 8, sizeof(*) = 8
>   Result: 11
> 
> If we look at the assembly, we see a sign extended 64 bit load, and a 64
> bit add.  So we are indeed generating 64 bit instructions, at least in
> some cases.
> 
>         dli $3,0xa # 10
>         <snip>
>         daddu $3,$2,1
> 
> Does N32 legitimately allow 64 bit instructions,

Yes.  Hey, that's the 80% of the purpose of N32!

> or is this an example of code that I've truely "munged" togeather?

Doubleplusyesyesyes :-)  -mint64 is not valid for any MIPS code model.  Gas
is royally b0rken for N32.  If you really want to read about N32 get the
respective docs from techpubs.sgi.com.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>