diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-05 17:08:52 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-05 17:08:52 +0000 |
commit | 4a5b1b884e5234916575637f2d5aabe2308261a7 (patch) | |
tree | 3365e8fcc1131c939c3e2b950c3d6669eca6b9ab /gcc/config/ia64/ia64.c | |
parent | dd5e37462f15d20ebabb519f02450d0dd275723e (diff) | |
download | gcc-4a5b1b884e5234916575637f2d5aabe2308261a7.tar.gz |
ia64: Use pc_rtx to save the return address.
When actually emitting dwarf2, this now produces proper results.
When emitting ia64 unwind info, this removes a hard-coded assumption.
* config/ia64/ia64.c (ia64_expand_prologue): Use pc_rtx to
indicate the return address save.
(process_cfa_register): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175873 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ia64/ia64.c')
-rw-r--r-- | gcc/config/ia64/ia64.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index bb3fc4d7e92..b37919c9574 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -3444,7 +3444,8 @@ ia64_expand_prologue (void) reg_emitted (reg_save_b0); insn = emit_move_insn (alt_reg, reg); RTX_FRAME_RELATED_P (insn) = 1; - add_reg_note (insn, REG_CFA_REGISTER, NULL_RTX); + add_reg_note (insn, REG_CFA_REGISTER, + gen_rtx_SET (VOIDmode, alt_reg, pc_rtx)); /* Even if we're not going to generate an epilogue, we still need to save the register so that EH works. */ @@ -9737,20 +9738,22 @@ process_cfa_register (FILE *asm_out_file, rtx pat, bool unwind) { rtx dest = SET_DEST (pat); rtx src = SET_SRC (pat); - int dest_regno = REGNO (dest); - int src_regno = REGNO (src); + int src_regno; - switch (src_regno) + if (src == pc_rtx) { - case BR_REG (0): /* Saving return address pointer. */ - gcc_assert (dest_regno == current_frame_info.r[reg_save_b0]); if (unwind) fprintf (asm_out_file, "\t.save rp, r%d\n", ia64_dbx_register_number (dest_regno)); - break; + return; + } + + src_regno = REGNO (src); + switch (src_regno) + { case PR_REG (0): gcc_assert (dest_regno == current_frame_info.r[reg_save_pr]); if (unwind) |