Ping! http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01854.html
On Wed, 2011-09-28 at 17:15 +0100, Sameera Deshpande wrote: > Hi! > > This patch generates Thumb2 epilogues in RTL form. > > The work involves defining new functions, predicates and patterns along with > few changes in existing code: > * The load_multiple_operation predicate was found to be too restrictive for > integer loads as it required consecutive destination regs, so this > restriction was lifted. > * Variations of load_multiple_operation were required to handle cases > - where SP must be the base register > - where FP values were being loaded (which do require consecutive > destination registers) > - where PC can be in register-list (which requires return pattern along > with register loads). > Hence, the common code was factored out into a new function in arm.c and > parameterised to show > - whether consecutive destination regs are needed > - the data type being loaded > - whether the base register has to be SP > - whether PC is in register-list > > The patch is tested with arm-eabi with no regressions. > > ChangeLog: > > 2011-09-28 Ian Bolton <ian.bol...@arm.com> > Sameera Deshpande <sameera.deshpa...@arm.com> > > * config/arm/arm-protos.h (load_multiple_operation_p): New > declaration. > (thumb2_expand_epilogue): Likewise. > (thumb2_output_return): Likewise > (thumb2_expand_return): Likewise. > (thumb_unexpanded_epilogue): Rename to... > (thumb1_unexpanded_epilogue): ...this > * config/arm/arm.c (load_multiple_operation_p): New function. > (thumb2_emit_multi_reg_pop): Likewise. > (thumb2_emit_vfp_multi_reg_pop): Likewise. > (thumb2_expand_return): Likewise. > (thumb2_expand_epilogue): Likewise. > (thumb2_output_return): Likewise > (thumb_unexpanded_epilogue): Rename to... > ( thumb1_unexpanded_epilogue): ...this > * config/arm/arm.md (pop_multiple_with_stack_update): New pattern. > (pop_multiple_with_stack_update_and_return): Likewise. > (thumb2_ldr_with_return): Likewise. > (floating_point_pop_multiple_with_stack_update): Likewise. > (return): Update condition and code for pattern. > (arm_return): Likewise. > (epilogue_insns): Likewise. > * config/arm/predicates.md (load_multiple_operation): Update > predicate. > (load_multiple_operation_stack_and_return): New predicate. > (load_multiple_operation_stack): Likewise. > (load_multiple_operation_stack_fp): Likewise. > * config/arm/thumb2.md (thumb2_return): Remove. > (thumb2_rtl_epilogue_return): New pattern. > > > - Thanks and regards, > Sameera D. --