firq-4.c
1.03 KB
-
[ARC] Refurbish and improve prologue/epilogue functions. · 90b48013
Reimplement how prologue and epilogue is emitted to accomodate enter/leave instructions, as well as improving the size of the existing techinques. The following modifications are added: - millicode thunk calls can be now selected regardless of the optimization level. However they are enabled for size optimizations by default. Also, the millicode optimization is turned off when we compile for long jumps. - the compiler is able to use enter/leave instructions for prologue and epilogue. As these instructions are not ABI compatible we gurad them under a switch (i.e., -mcode-density-frame). When this option is on, the compiler will try emitting enter/leave instructions, if not, then millicode thunk calls (if enabled), and latter the regular push/pop instructions. - The prologue/epilogue is now optimized to use pointer walks, hence improving the chance to have push_s/pop_s instructions emitted. It also tries to combine the stack adjustments with load/store operations. gcc/ xxxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com> * common/config/arc/arc-common.c (arc_option_optimization_table): Millicode optimization is default on for size optimizations. * config/arc/arc-protos.h (arc_check_multi): New function. * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange. (ENTER_LEAVE_START_REG): Define. (ENTER_LEAVE_END_REG): Likewise. (arc_override_options): Disable millicode when long calls option is on. (arc_frame_info): Change it from int to bool. (arc_compute_frame_size): Clean up. (arc_save_restore): Remove. (frame_save_reg): New function. (frame_restore_reg): Likewise. (arc_enter_leave_p): Likewise. (arc_save_callee_saves): Likewise. (arc_restore_callee_saves): Likewise. (arc_save_callee_enter): Likewise. (arc_restore_callee_leave): Likewise. (arc_save_callee_milli): Likewise. (arc_restore_callee_milli): Likewise. (arc_expand_prologue): Reimplement to emit enter/leave instructions. (arc_expand_epilogue): Likewise. (arc_check_multi): New function. * config/arc/arc.md (push_multi_fp): New pattern. (push_multi_fp_blink): Likewise. (pop_multi_fp): Likewise. (pop_multi_fp_blink): Likewise. (pop_multi_fp_ret): Likewise. (pop_multi_fp_blink_ret): Likewise. * config/arc/arc.opt (mmillicode): Update option. (mcode-density-frame): New option. * config/arc/predicates.md (push_multi_operand): New predicate. (pop_multi_operand): Likewise. * doc/invoke.texi (ARC): Update ARC options information. gcc/testsuite xxxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com> * gcc.target/arc/firq-1.c: Update test. * gcc.target/arc/firq-3.c: Likewise. * gcc.target/arc/firq-4.c: Likewise. * gcc.target/arc/interrupt-6.c: Likewise. From-SVN: r266065
Claudiu Zissulescu committed