On Sun, Jul 10, 2011 at 2:44 PM, Richard Henderson <r...@redhat.com> wrote: > On 07/10/2011 12:43 PM, H.J. Lu wrote: >> +/* Pointer function arguments and return values are promoted to Pmode. >> + If FOR_RETURN is 1, this function must behave in the same way with >> + regard to function returns as TARGET_FUNCTION_VALUE. */ >> + >> +static enum machine_mode >> +ix86_promote_function_mode (const_tree type, enum machine_mode mode, >> + int *punsignedp, const_tree fntype, >> + int for_return) >> +{ >> + if (for_return == 1) >> + /* Do not promote function return values. */ >> + ; >> + else if (type != NULL_TREE && POINTER_TYPE_P (type)) > > These two comments still conflict. And why wouldn't you want to > promote return values?
We only want to promote function parameters passed/returned in register. But I can't tell if a value will be passed in register or memory inside of TARGET_FUNCTION_VALUE. So when FOR_RETURN is 1, we don't promote. Even if we don't promote it explicitly, hardware still zero-extends it for us. So it isn't a real issue. -- H.J.