This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: New C++ ABI: patches.


Alexandre Petit-Bianco writes:

> For some reasons, the first word of _Jv_intClass points in the
> middle of the vtbl instead pointing at its beginning.

I can see that the vtbl is ajusted before being stored:

  *     movl    _ZTVN4java4lang5ClassE@GOT(%ebx), %eax
        movl    $0, 8(%edi)
        movl    56(%esi), %ecx
        movl    $0, 20(%edi)
  *     addl    $8, %eax
        cmpw    $86, %dx
  *     movl    %eax, (%edi)

$edi contains `this.' I'm trying to understand why this code gets
generated. Note that if I introduce this in the copy constructor:

    void *p =  ((void **)this)[0];
    ((void **)this)[0] = (void *)((char *)p-2*sizeof (void *));

I can get `int.class' to work properly.

I did a build on Alpha: `Hellow World' crashes, but I'm having a hard
to time debuging it because of the shared libraries. When built with
`-static' `Hello World' just misbehaves but doesn't crash :-(

Did anyone get a chance to try on other platforms?

./A

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]