Hi, I am working on a GCC 4.3.3 port for a 32-bit architecture.
The machine has dedicated data (D) resp. address (A) registers.
A function shall pass addresses in A-registers and other stuff in
D-registers, Pmode = SImode.
Everything works fine except that for libcalls the target macros
FUNCTION_ARG, FUNCTION_ARG_ADVANCE, TARGET_PASS_BY_REFERENCE et al. are
called with TYPE=NULL_TREE, so that is is not possible to destinguish
between pointers and non-pointers.
If the call of memmove is done explicitely from the C source, then there
is a prototype and TYPE!=NULL_TREE so that I can provide correct
behaviour for the target hooks mentioned above.
But, if memmove is called implicitely to copy function args like large
structs that are passed in memory, then TYPE==NULL_TREE and the hooks
have no information about what they have to do. Neigher choosing an
A-reg not choosing a D-reg will yield a consistend calling conventions
in every case.
Did I miss something? Is there a way to retrieve the necessary
information without hacking calls.c, function.c, etc?
Why is this essential information cancelled in calls.c?
Obviously, calls.c has that information but hides it from the backend.
I do not consider to introduce Pmode = PSImode because that would result
in an exact clone of the SImode support in the backend.
Thanks for any hints,
Georg-Johann