This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch causes Thumb-2 epilogues to be generated in RTL. The work mostly involves new functions, but a few changes to existing code were required: * The load_multiple_operation predicate was found to be too restrictive for integer loads because it required consecutive destination regs, so this requirement was lifted. * Variations of load_multiple_operation were required to handle cases where SP must be the base register and where FP values were being loaded (which do require consecutive destination registers), so 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 and whether the base register has to be SP. * Some RTL patterns have been disabled for Thumb-2 because they interfere with correct pattern matching. Regression tests pass for bare-metal and linux. OK for trunk? -- Ian Bolton ARM. 2010-08-19 Ian Bolton <ian.bolton@arm.com> * config/arm/arm.c (load_multiple_operation_p): New function, called from predicates.md. (arm_output_epilogue): Added comments. (thumb2_emit_multi_reg_pop): New static function. (thumb2_emit_vfp_multi_reg_pop): New static function. (thumb1_unexpanded_epilogue): Was thumb_unexpanded_epilogue. (thumb1_expand_epilogue): Added comment. (thumb2_expand_epilogue): New function. (thumb2_output_return): New function. * config/arm/arm.md (*pop_multiple_with_stack_update): New pattern, matches RTL generated by thumb2_emit_multi_reg_pop. (return): Disabled for Thumb-2. (epilogue): Now calls thumb2_expand_epilogue for Thumb-2. (*floating_point_pop_multiple_with_stack_update): New pattern, matches RTL generated by thumb2_emit_vfp_multi_reg_pop. (*epilogue_insns): Disabled for Thumb-2. Calls renamed thumb1_unexpanded_epilogue for Thumb-1. * config/arm/predicates.md (load_multiple_operation): Factored out into load_multiple_operation_p function in arm.c. (load_multiple_operation_stack): Determines whether RTL matches that which is created in thumb2_emit_multi_reg_pop. (load_multiple_operation_stack_fp): Determines whether RTL matches that which is created in thumb2_emit_vfp_multi_reg_pop. * config/arm/thumb2.md (*thumb2_return): Disabled for Thumb-2. (*thumb2_rtl_epilogue_return): New pattern, to match return within RTL epilogue for Thumb-2. * config/arm/arm-protos.h (load_multiple_operation_p) (thumb2_expand_epilogue, thumb2_output_return): New prototypes. (thumb1_unexpanded_epilogue): Was thumb_unexpanded_epilogue.
Attachment:
rtl_epilogue_thumb2.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |