aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorMo, Zewei <zewei.mo@intel.com>2023-03-06 10:42:32 +0800
committerHongyu Wang <hongyu.wang@intel.com>2023-10-12 11:28:57 +0800
commit180b08f64408be598b33b8830c52336abcb0c68a (patch)
tree02f4e6b581f3191c9f7ad982bbc004372f61c4f9 /libgcc
parentd6b7fe11efe9c7bf44dfe57ded6c86df5ec7e2c7 (diff)
downloadgcc-180b08f64408be598b33b8830c52336abcb0c68a.zip
gcc-180b08f64408be598b33b8830c52336abcb0c68a.tar.gz
gcc-180b08f64408be598b33b8830c52336abcb0c68a.tar.bz2
[APX] Support Intel APX PUSH2POP2
This feature requires stack to be aligned at 16byte, therefore in prologue/epilogue, a standalone push/pop will be emitted before any push2/pop2 if the stack was not aligned to 16byte. Also for current implementation we only support push2/pop2 usage in function prologue/epilogue for those callee-saved registers. gcc/ChangeLog: * config/i386/i386.cc (gen_push2): New function to emit push2 and adjust cfa offset. (ix86_pro_and_epilogue_can_use_push2_pop2): New function to determine whether push2/pop2 can be used. (ix86_compute_frame_layout): Adjust preferred stack boundary and stack alignment needed for push2/pop2. (ix86_emit_save_regs): Emit push2 when available. (ix86_emit_restore_reg_using_pop2): New function to emit pop2 and adjust cfa info. (ix86_emit_restore_regs_using_pop2): New function to loop through the saved regs and call above. (ix86_expand_epilogue): Call ix86_emit_restore_regs_using_pop2 when push2pop2 available. * config/i386/i386.md (push2_di): New pattern for push2. (pop2_di): Likewise for pop2. gcc/testsuite/ChangeLog: * gcc.target/i386/apx-push2pop2-1.c: New test. * gcc.target/i386/apx-push2pop2_force_drap-1.c: Likewise. * gcc.target/i386/apx-push2pop2_interrupt-1.c: Likewise. Co-authored-by: Hu Lin1 <lin1.hu@intel.com> Co-authored-by: Hongyu Wang <hongyu.wang@intel.com>
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions