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: Fri, 6 Sep 2002 00:12:21 +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.1020905213559.7444Q-100000@delta.ds2.pg.gda.pl>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20020905174427.GU4194@rembrandt.csv.ica.uni-stuttgart.de> <Pine.GSO.3.96.1020905213559.7444Q-100000@delta.ds2.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4i
Maciej W. Rozycki wrote:
[snip]
> > Using the same data types allows at least to choose the appropriate
> > typedefs without caring about the underlying OS.
> 
>  It doesn't.  It is unsafe to assume it in general and it's even more
> unsafe for MIPS where we have at least three C models and you do not know
> in advance which one will a person doing a build choose. 

It's knowing the ABI vs. ABI + OS (or OS-specific ABI-variant, if you
want to call it different).

> > >  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".
> 
>  World isn't perfect, but it would be beneficial if at least we tried to
> keep it as good as we can.

I agree. And I believe in the "least surprise" principle, which means
we shouldn't deviate from widely known conventions without good reason.
I still don't see the advantage of a 64 bit long in n32.


Thiemo

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