On 11/11/13 07:33, Ulrich Weigand wrote:
Hello,

this is another tweak to the middle-end to help support the new
powerpc64le-linux ABI.

In the new ABI, we make a distinction between functions that pass
all arguments solely in registers, and those that do not.  Only when
calling one the latter type (or a varags routine) does the caller
need to provide REG_PARM_STACK_SPACE; in the former case, this can
be omitted to save stack space.

This leads to a definition of REG_PARM_STACK_SPACE that is a lot
more complex than usual, which means it would be helpful if the
middle-end were to evaluate it sparingly (e.g. once per function
definition / call).

The middle-end already does cache REG_PARM_STACK_SPACE results,
however, this cache it not consistently used.  In particular,
the locate_and_pad_parm routine will re-evaluate the macro
every time it is called, even though all callers of the routine
already have a cached copy.

This patch adds a new argument to locate_and_pad_parm which is
used instead of evaluating REG_PARM_STACK_SPACE, and updates
the callers to pass in the correct value.

There should be no change in generated code on any platform.

Tested on powerpc64-linux and powerpc64le-linux.

OK for mainline?

Bye,
Ulrich

2013-11-11  Ulrich Weigand  <ulrich.weig...@de.ibm.com>
            Alan Modra  <amo...@gmail.com>

ChangeLog:

        * function.c (assign_parms): Use all.reg_parm_stack_space instead
        of re-evaluating REG_PARM_STACK_SPACE target macro.
        (locate_and_pad_parm): New parameter REG_PARM_STACK_SPACE.  Use it
        instead of evaluating target macro REG_PARM_STACK_SPACE every time.
        (assign_parm_find_entry_rtl): Update call.
        * calls.c (initialize_argument_information): Update call.
        (emit_library_call_value_1): Likewise.
        * expr.h (locate_and_pad_parm): Update prototype.
This is fine for the trunk.  Please go ahead and install.

Thanks,
Jeff

Reply via email to