This is the mail archive of the gcc-patches@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]

Re: PATCH: C data layout tests for IA-64 ABI



  In message <u9g0xju9mi.fsf@yorick.cygnus.com>you write:
  > >>>>> Alex Samuel <samuel@codesourcery.com> writes:
  > 
  >  > We are creating tests for the IA-64 C++ ABI as a first step in
  >  > implementating it.  Sizes of basic types and the layout of C
  >  > aggregates is specified by the IA-64 `Runtime Architecture Guide'.
  >  > For these simplest types, the tests can't really be done in a totally
  >  > architecture-neutral way, so these tests are x86-specific.
  > 
  > This doesn't make sense to me.  The document you mention only applies to
  > ia64; sizes of basic types and layout of C aggregates on x86 are specified
  > by the x86 SVR4 ABI.  Changing them would be a Very Bad Idea.
  > 
  >  > Future tests will test C++ implementation features like vtable layout in
  >  > an architecture-neutral way by confirming the layouts are the same as
  >  > the equivalent C structs specified in the ABI definition.
  > 
  > Note that there is no way to write a C struct equivalent to an ia64 vtable,
  > since it contains function descriptors (what function pointers point to)
  > rather than actual function pointers.  We should probably do this for HPPA
  > under the new ABI, too, but the tests should work for other targets.
For PA64 (and I suspect ia64) when you take the address of a function, you
actually get a pointer to the official procedure descriptor.  The opd is
created by the linker/dynamic linker for PA64 and the dynamic linker for
ia64.

An entry in the vtable would be a pointer to the opd entry for that function,
not the actual contents of the opd entry.

Otherwise you would need two different call sequences for a normal indirect
call and a vtable call.

jeff


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