public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* PowerPC GNU Compiler question
@ 2002-03-27  9:20 Gafencu, Gheorghe-Costica
  2002-03-31 21:58 ` David Edelsohn
  0 siblings, 1 reply; 2+ messages in thread
From: Gafencu, Gheorghe-Costica @ 2002-03-27  9:20 UTC (permalink / raw)
  To: help-gcc

Hello!

I try for some time to find a documentation for gcc compiler, and I couldn't do it so far. There is an interface
convention for C style functions interfaced for assembly code for powerpc processors. For example, a C method call like
that:

class CPU
{
	public:
             		static void CDECL i2c_initialize(	bool enable);
}

has an entry point into another file, where the assembly code is developed, like that:

.global  i2c_initialize__3CPUb
.type    i2c_initialize__3CPUb,@function

i2c_initialize__3CPUb:
	//assembly code
             ......
             blr    //return

The two files are compiled separately, and they are linked together. The document "SYSTEM V APPLICATION BINARY INTERFACE
PowerPC Processor Supplement", states how this processor interface should work, from the point of view of the processor,
but doesn't give any indication on the interface of this method accordingly to any compiler, since this information
seems to be compiler dependent. 

What I didn't find is a description of the interface for gnu compiler. I know that i2c_initialize_3CPUb means the method
i2c_initialize of the class CPU, with a boolean as parameter. If instead of "b" I wanted an integer as parameter, it was
an "i" instead. 

But I don't know what are the specific interfaces for many other base types, or pointers, or even derived objects.

Could you help me telling me where I could find this kind of information, for PowerPC gnu?

Thanks,
***********************************************************
Gil Gafencu,
Staff Software Engineer,
Honeywell International,
23500, W. 105th Street, Mailstop 150,
Olathe, Kansas, 66061
tel. (913)-712-2082
mailto: Gheorghe-Costica.Gafencu@Honeywell.com
***********************************************************

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PowerPC GNU Compiler question
  2002-03-27  9:20 PowerPC GNU Compiler question Gafencu, Gheorghe-Costica
@ 2002-03-31 21:58 ` David Edelsohn
  0 siblings, 0 replies; 2+ messages in thread
From: David Edelsohn @ 2002-03-31 21:58 UTC (permalink / raw)
  To: Gafencu, Gheorghe-Costica; +Cc: help-gcc

	Are you asking about the C++ ABI and mangling conventions?  That
*is* compiler-dependent, but the system calling convention ABI is not
compiler-dependent.

	GCC 3 now uses the IA-64 C++ ABI across all architectures.  That
specifies how vtables are layed out and how C++ symbols are mangled, but
the details of how the parameters are passed to methods still follow the
system-specific ABI.

	The C++ ABI for Itanium (used by GCC for all architectures) is
detailed at: 

http://www.codesourcery.com/cxx-abi/

David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-01  5:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-27  9:20 PowerPC GNU Compiler question Gafencu, Gheorghe-Costica
2002-03-31 21:58 ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).