On Wed, Oct 28, 2015 at 2:32 AM, Andrew Haley <a...@redhat.com> wrote:
> On 27/10/15 20:36, Martin Buchholz wrote: > > The world would be a better place if the current x86 32-bit ABI was > > replaced by "x32" > > https://en.wikipedia.org/wiki/X32_ABI > > but it's looking unlikely that we will get there. For starters, all > > compilers must be rewritten to target x32, and that includes the jdk > > jits. > > No they wouldn't. The jits don't have to be changed at all because we > already can handle compressed OOPs with no shift or base offset, > i.e. native 32-bit addresses. The Java calling convention would > therefore stay as it is. All that would have to be changed is the > native <-> Java interfaces and accesses to native pointer-sized fields > in C++ structures. It's not trivial, but neither is it a rewrite. > I'll buy that - it's an "easy" job, but still a job for a compiler writer. Perhaps x32 has less benefit for java programs because jits are already free to generate code that uses 32-bit pointers but takes advantage of the x86_64 instruction set?