diff options
author | Richard Henderson <rth@redhat.com> | 2005-11-02 17:40:33 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-11-02 17:40:33 -0800 |
commit | 150cdc9e16e86173fe7116e12dbcc4cc8fb6b789 (patch) | |
tree | 6cea9b2ad7c60bdcd1ca27428519046f1cb9729f /gcc/dwarf2out.c | |
parent | 3a0588c4e01a7cbeaf3a54360ffaba27fc8caf25 (diff) | |
download | gcc-150cdc9e16e86173fe7116e12dbcc4cc8fb6b789.zip gcc-150cdc9e16e86173fe7116e12dbcc4cc8fb6b789.tar.gz gcc-150cdc9e16e86173fe7116e12dbcc4cc8fb6b789.tar.bz2 |
re PR target/9350 (-fomit-frame-pointer does not work for main)
PR target/9350
PR target/24374
* dwarf2out.c (dwarf2out_reg_save_reg): New.
(dwarf2out_frame_debug_expr): Return after dwarf_handle_frame_unspec.
* function.c (assign_parms): Use calls.internal_arg_pointer.
(expand_main_function): Remove FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN
code.
* target-def.h (TARGET_INTERNAL_ARG_POINTER): New.
(TARGET_CALLS): Add it.
* target.h (struct gcc_target): Add calls.internal_arg_pointer.
* targhooks.c (default_internal_arg_pointer): New.
* targhooks.h (default_internal_arg_pointer): Declare.
* tree.h (dwarf2out_reg_save_reg): Declare.
* doc/tm.texi (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Remove.
* config/i386/i386.c (dbx_register_map): Add return column.
(dbx64_register_map, svr4_dbx_register_map): Likewise.
(TARGET_INTERNAL_ARG_POINTER, ix86_internal_arg_pointer): New.
(TARGET_DWARF_HANDLE_FRAME_UNSPEC, ix86_dwarf_handle_frame_unspec): New. (ix86_function_ok_for_sibcall): Disable if force_align_arg_pointer.
(ix86_save_reg): Save force_align_arg_pointer.
(ix86_emit_save_regs): Make regno unsigned.
(ix86_emit_save_regs_using_mov): Likewise.
(ix86_expand_prologue): Handle force_align_arg_pointer.
(ix86_expand_epilogue): Likewise.
* config/i386/i386.h: (dbx_register_map): Update.
(dbx64_register_map, svr4_dbx_register_map): Update.
(struct machine_function): Add force_align_arg_pointer.
* config/i386/i386.md (UNSPEC_REG_SAVE, UNSPEC_DEF_CFA): New.
(UNSPEC_TP, UNSPEC_TLS_GD, UNSPEC_TLS_LD_BASE): Renumber.
(TARGET_PUSH_MEMORY peepholes): Disable if RTX_FRAME_RELATED_P.
From-SVN: r106420
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index d780914..314652b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1271,6 +1271,30 @@ clobbers_queued_reg_save (rtx insn) return false; } +/* Entry point for saving the first register into the second. */ + +void +dwarf2out_reg_save_reg (const char *label, rtx reg, rtx sreg) +{ + size_t i; + unsigned int regno, sregno; + + for (i = 0; i < num_regs_saved_in_regs; i++) + if (REGNO (regs_saved_in_regs[i].orig_reg) == REGNO (reg)) + break; + if (i == num_regs_saved_in_regs) + { + gcc_assert (i != ARRAY_SIZE (regs_saved_in_regs)); + num_regs_saved_in_regs++; + } + regs_saved_in_regs[i].orig_reg = reg; + regs_saved_in_regs[i].saved_in_reg = sreg; + + regno = DWARF_FRAME_REGNUM (REGNO (reg)); + sregno = DWARF_FRAME_REGNUM (REGNO (sreg)); + reg_save (label, regno, sregno, 0); +} + /* What register, if any, is currently saved in REG? */ static rtx @@ -1659,7 +1683,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) case UNSPEC_VOLATILE: gcc_assert (targetm.dwarf_handle_frame_unspec); targetm.dwarf_handle_frame_unspec (label, expr, XINT (src, 1)); - break; + return; default: gcc_unreachable (); |