Hi! This patch generates LDRD instead of POP for Thumb2 epilogue in A15. For optimize_size, original epilogue is generated for A15. The work involves defining new functions, predicates and patterns. As LDRD cannot be generated for PC, if PC is in register-list, LDRD is generated for all other registers in the list which can form register pair. Then LDR with return is generated if PC is the only register left to be popped, otherwise POP with return is generated. The patch is tested with check-gcc, check-gdb and bootstrap with no regression. Changelog entry for Patch to emit LDRD for thumb2 epilogue in A15: 2011-10-11 Sameera Deshpande * config/arm/arm-protos.h (bad_reg_pair_for_thumb_ldrd_strd): New declaration. * config/arm/arm.c (bad_reg_pair_for_thumb_ldrd_strd): New helper function. (thumb2_emit_ldrd_pop): New static function. (thumb2_expand_epilogue): Update functions. * config/arm/constraints.md (Pz): New constraint. * config/arm/ldmstm.md (thumb2_ldrd_base): New pattern. (thumb2_ldrd): Likewise. * config/arm/predicates.md (ldrd_immediate_operand): New predicate. --