This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: binary compatibility ABI (was: Re: [boehm-gc] Import 6.3 alpha1)
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Bryce McKinlay <bryce at mckinlay dot net dot nz>, Ranjit Mathew <rmathew at hotmail dot com>, <java at gcc dot gnu dot org>
- Date: Thu, 14 Aug 2003 13:21:06 -0400 (EDT)
- Subject: Re: binary compatibility ABI (was: Re: [boehm-gc] Import 6.3 alpha1)
On Thu, 14 Aug 2003, Andrew Haley wrote:
> > static int a, b;
> > ...
> > return a + b;
> >
> > Does this require 2, 3 or 4 memory loads?
> >
> > (I believe 2 is the answer for non-PIC, 4 for PIC. If we take advantage
> > of the fact that static fields are at a fixed offset from the class
> > record, it can be done in three, while preserving position independence.)
>
> Unless a and b are in the exact same class as the 'return a + b'
> statment, the positions of a and b relative to the class record may
> change.
Right. Well, provided they are in the same compilation unit anyway, not
necessarily the same class. And if the class/method symbols do become
non-public in the new ABI that'll be enforced.
> I guess this isn't true if the whole application is compiled
> and we give up on binary compatibility.
Suppose gcj defaults to binary compability between compilation units, but
relaxes all the rules within a single compilation unit.
The nice thing about that is a "compilation unit" can be a whole package
or even an entire application if you like.
Jeff