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

register parameter passing and library calls



I'm working with a machine that has separate address and data registers
and evaluating changing the calling conventions to pass pointers
directly in the pointer registers instead of moving them into the
normal data-registers and then moving them back into address
registers in the callee.

	This is kinda like some calling conventions on the Motorola
	68k, which had A and D registers.  Unfortunately, gcc doesn't
	seem to support these conventions.

The problem I've run into is that memcpy() is called for block moves
and emit_library_call() ends up without the parameter type information
needed to know that the first two parameters are "void *" and should
be passed in ptr1 and ptr2.  Of course, when the function is compiled,
it has a function-prototype that tells the compiler to expect the
source and destination addresses to be passed in the pointer
registers.

Anybody else have a solution to this?

I suppose I could replace ALL the library functions with hand-compiled
assembler language (and change the names of the library functions),
but that would not be a very palatable strategy IMHO.

Al Lehotsky

	


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