Possible bug in PowerPC structure passing
Turly O'Connor
turly@apple.com
Tue Apr 4 18:09:00 GMT 2000
On 4/4/2000 17:31, David Edelsohn (dje@watson.ibm.com) wrote:
> The failure does not involve string instructions. I actually
>tried using -mstring to see if that helped, but it did not.
This problem is connected with the notion of REG_PARM_STACK_SPACE,
which for PPC is a 32-byte area on the stack. REG_PARM_STACK_SPACE
is the amount of stack space allocated for function arguments even
when their values are passed in registers.
When we pass a struct which is bigger than 32 bytes by value, the
compiler generates a call to memcpy() which is supposed to copy
the struct to this area.
To stop this memcpy() libcall from furtling with the 32-byte area on
the stack, code in store_one_arg() in calls.c marks the 32-byte area
as being "dirty". emit_library_call() will then save and restore
the area in use around the call to memcpy(), which is bad news as
the destination of the memcpy() *IS* the 32-byte area.
--turly
More information about the Gcc
mailing list