linux-mips
[Top] [All Lists]

Re: 64-bit and N32 kernel interfaces

To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: Re: 64-bit and N32 kernel interfaces
From: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Date: Thu, 5 Sep 2002 19:44:27 +0200
Cc: Daniel Jacobowitz <dan@debian.org>, "Kevin D. Kissell" <kevink@mips.com>, Tor Arntsen <tor@spacetec.no>, Carsten Langgaard <carstenl@mips.com>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <Pine.GSO.3.96.1020905183617.7444J-100000@delta.ds2.pg.gda.pl>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20020905163051.GT4194@rembrandt.csv.ica.uni-stuttgart.de> <Pine.GSO.3.96.1020905183617.7444J-100000@delta.ds2.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4i
Maciej W. Rozycki wrote:
[snip]
> > So the linux n64 would be incompatible to SGI's, too? (It would be
> > weird if the n64 long long was smaller than the n32 one).
> 
>  Why would anyone care?  Do you want to run IRIX binaries on Linux?  And
> at the source level, you have autoconf or <stdint.h> as you can't
> arbitrarily assume any type sizes for any portable code. 

Not everyone uses autoconf, and if you call "long long" a recent
addition then the use of <stdint.h> isn't safe, too.

Using the same data types allows at least to choose the appropriate
typedefs without caring about the underlying OS.

> > It would mean to create two new ABIs, gaining little benefit but
> > being incompatible from a (C-)programmers POV. And we already have
> > too many MIPS ABIs.
> 
>  What programmer's POV?  Does a programmer write a program for MIPS?  No,
> unless he writes a kernel or a libc.  A normal programmer just codes a
> program in C for a *nix-type system and if he wants any portability, he
> needs to follow universal guidelines.

World isn't as perfect as you claim. And for non-broken code it's
nearly irrelevant if the 64 bit integer type is called "long" or
"long long".

About 128 bit integers: Most OS'es use "long long" already for
64 bit integers, which means there will be something like
"quad long" for 128 bit integers (if these are needed).


Thiemo

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