2011/10/27 Georg-Johann Lay <a...@gjlay.de>:
> This is support of a new option -maccumulate-args that implements
> ACCUMULATE_OUTGOING_ARGS as proposed by Richard.
>
> As 4.7 will be released very soon, I'd like to supply the documentation part
> later and use the remaining stage I time for extension/improvements.
>
> The tests ran 4 times with either combination of
>  -m[no-]call-prologues
>  -m[no-]accumulate-args
>
> The results for the C testsuite are:
>
> -maccumulate-args
>    PASS -> FAIL
>    gcc.dg/compat/struct-by-value-16a
>    gcc.dg/compat/struct-by-value-17a
>    gcc.dg/compat/struct-by-value-18a
>
> -maccumulate-args
> -mcall-prologues
>    PASS -> FAIL
>    gcc.dg/compat/struct-by-value-16a
>    gcc.dg/compat/struct-by-value-17a
>    gcc.dg/compat/struct-by-value-18a
>    gcc.dg/sibcall-3.c
>    gcc.dg/sibcall-4.c
>
>    FAIL -> PASS
>    gcc.dg/torture/pta-ptrarith-3.c
>
> -mcall-prologues
>    PASS -> FAIL
>    gcc.dg/sibcall-3.c
>    gcc.dg/sibcall-4.c
>
>    FAIL -> PASS
>    gcc.dg/torture/pta-ptrarith-3.c
>
> All FAILs runtime fails.
>  - struct-by-value-* use extrem RAM (overflow)
>  - sibcall-* fail because that optimization is off
>   with -mcall-prologues
>  - the FAILs of pta-ptrarith-3 are PR50063.
>
> There are no changes in the C++ testsuite.
>
> Ok for trunk?
>
> Johann
>
>        * config/avr/avr.opt (-maccumulate-args): New option.
>        * config/avr/avr.h (STARTING_FRAME_OFFSET): Redefine to
>        avr_starting_frame_offset.
>        (ACCUMULATE_OUTGOING_ARGS): Define to avr_accumulate_outgoing_args.
>        * config/avr/avr.md (UNSPECV_WRITE_SP_IRQ_ON): Remove.
>        (UNSPECV_WRITE_SP_IRQ_OFF): Remove.
>        (UNSPECV_WRITE_SP): New constant.
>        (*addhi3_sp_R): Rewrite to...
>        (*addhi3_sp): ...this new insn.
>        (movhi_sp_r_irq_off, movhi_sp_r_irq_on): Combine to...
>        (movhi_sp_r): ...this new insn.
>        * config/avr/avr-protos.h (avr_accumulate_outgoing_args): New.
>        (avr_starting_frame_offset): New.
>        * config/avr/avr.c (avr_accumulate_outgoing_args): New function.
>        (avr_starting_frame_offset): New function.
>        (avr_outgoing_args_size): New static function.
>        (avr_initial_elimination_offset): Use it.
>        (avr_simple_epilogue): Use it.
>        (avr_asm_function_end_prologue): Use it.
>        (expand_epilogue): Use it.
>        (expand_prologue): Use it.  Break out code to...
>        (avr_prologue_setup_frame): ...this new static function.
>        (avr_can_eliminate): Allow eliminating to frame pointer if there
>        is one.
>        (avr_frame_pointer_required_p): Use frame pointer if target has a
>        nonlocal label.
>        * config/avr/constraints.md (Csp): New constraint.
>        * config/avr/predicates.md (avr_sp_immediate_operand): Use it.
>


Please commit.

Denis.

Reply via email to