This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Gcc-4.0 vtable layout on IA64


Hi,

While trying to get the MaxDB sources compiled with gcc 4.0 on an IA64 machine I stumbled over the following comment describing the vtable layout:

 *  gcc 3.1 on ia64 uses new c++ abi (without runtime type info):
 *
 *  pInterface -> 0  -----------        0  -----------------------
 *                  ! virt.Meth ! ------->| gp0        | Method 0 |
 *                   -----------          |------------|          |
 *                  !     :     !       8 | offset0    |          |
 *                                         ------------+----------|
 *                                     16 | gp1        | Method 1 |
 *                                         ------------|          |
 *                                     24 | offset1    |          |
 *                                         ------------+----------|
 *                                        |      :     |    :     |
 *                                               :
 *                                        |      :     |    :     |
 *                                         ------------+----------|
 *                             16*(n-1)+0 | gp n       | Method n |
 *                                         ------------|          |
 *                             16*(n-1)+8 | offset n   |          |
 *                                         ------------+----------

I was wondering if this is still correct with gcc 4.0 or whether there the formula should be 8*(n-1) to access method n (as that seems to correspond to what you have on i386)?


Thanks for any help,


Martin.


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