PATCH] PPC: Correct SYSV ABI libcall handling
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Tue Jun 17 20:30:00 GMT 2003
On Tuesday 17 June 2003 21:52, David Edelsohn wrote:
> @@ -3470,7 +3471,8 @@ function_arg (cum, mode, type, named)
> {
> if (abi == ABI_V4
> && cum->nargs_prototype < 0
> - && type && (cum->prototype || TARGET_NO_PROTOTYPE))
> + && (cum->call_cookie & CALL_LIBCALL) == 0
> + && (cum->prototype || TARGET_NO_PROTOTYPE))
> {
> /* For the SPE, we need to crxor CR6 always. */
> if (TARGET_SPE_ABI)
>
> Why is it safe to remove the test of "type" above? It is completely
> subsumed by call_cookie?
Yes, the doc for the FUNCTION_ARG macro says TYPE is only zero for libcalls,
and not even that is always true (only for the first round of FUNCTION_ARG
calls). That is also what the old comment above function_arg suggested.
So the test for "type" was only there to rule out libcalls.
Franz.
More information about the Gcc-patches
mailing list