Commit 4e6c2193 by Bob Wilson Committed by Bob Wilson

xtensa.c (xtensa_expand_prologue): Put a REG_FRAME_RELATED_EXPR note on the last…

xtensa.c (xtensa_expand_prologue): Put a REG_FRAME_RELATED_EXPR note on the last insn that sets up the stack...

	* config/xtensa/xtensa.c (xtensa_expand_prologue): Put a
	REG_FRAME_RELATED_EXPR note on the last insn that sets up the stack
	pointer or frame pointer.
	* config/xtensa/xtensa.h (DWARF_UNWIND_INFO): Delete.
	(MUST_USE_SJLJ_EXCEPTIONS): Define.
	(DWARF2_UNWIND_INFO): Define.
	(INCOMING_RETURN_ADDR_RTX): Define.
	(DWARF_FRAME_RETURN_COLUMN): Define.

From-SVN: r129854
parent f6547b68
2007-11-02 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (xtensa_expand_prologue): Put a
REG_FRAME_RELATED_EXPR note on the last insn that sets up the stack
pointer or frame pointer.
* config/xtensa/xtensa.h (DWARF_UNWIND_INFO): Delete.
(MUST_USE_SJLJ_EXCEPTIONS): Define.
(DWARF2_UNWIND_INFO): Define.
(INCOMING_RETURN_ADDR_RTX): Define.
(DWARF_FRAME_RETURN_COLUMN): Define.
2007-11-02 Tom Tromey <tromey@redhat.com>
* varpool.c (dump_varpool): Use 'next', not 'next_needed' when
......@@ -2305,12 +2305,13 @@ xtensa_expand_prologue (void)
{
HOST_WIDE_INT total_size;
rtx size_rtx;
rtx insn, note_rtx;
total_size = compute_frame_size (get_frame_size ());
size_rtx = GEN_INT (total_size);
if (total_size < (1 << (12+3)))
emit_insn (gen_entry (size_rtx, size_rtx));
insn = emit_insn (gen_entry (size_rtx, size_rtx));
else
{
/* Use a8 as a temporary since a0-a7 may be live. */
......@@ -2318,14 +2319,14 @@ xtensa_expand_prologue (void)
emit_insn (gen_entry (size_rtx, GEN_INT (MIN_FRAME_SIZE)));
emit_move_insn (tmp_reg, GEN_INT (total_size - MIN_FRAME_SIZE));
emit_insn (gen_subsi3 (tmp_reg, stack_pointer_rtx, tmp_reg));
emit_move_insn (stack_pointer_rtx, tmp_reg);
insn = emit_insn (gen_movsi (stack_pointer_rtx, tmp_reg));
}
if (frame_pointer_needed)
{
if (cfun->machine->set_frame_ptr_insn)
{
rtx first, insn;
rtx first;
push_topmost_sequence ();
first = get_insns ();
......@@ -2347,8 +2348,20 @@ xtensa_expand_prologue (void)
}
}
else
emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx);
}
insn = emit_insn (gen_movsi (hard_frame_pointer_rtx,
stack_pointer_rtx));
}
/* Create a note to describe the CFA. Because this is only used to set
DW_AT_frame_base for debug info, don't bother tracking changes through
each instruction in the prologue. It just takes up space. */
note_rtx = gen_rtx_SET (VOIDmode, (frame_pointer_needed
? hard_frame_pointer_rtx
: stack_pointer_rtx),
plus_constant (stack_pointer_rtx, -total_size));
RTX_FRAME_RELATED_P (insn) = 1;
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
note_rtx, REG_NOTES (insn));
}
......
......@@ -1062,8 +1062,12 @@ typedef struct xtensa_args
/* How to start an assembler comment. */
#define ASM_COMMENT_START "#"
/* Exception handling TODO!! */
#define DWARF_UNWIND_INFO 0
/* Generate DWARF2 unwind info to get the DW_AT_frame_base set correctly,
even though we don't yet use it for unwinding. */
#define MUST_USE_SJLJ_EXCEPTIONS 1
#define DWARF2_UNWIND_INFO 1
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 0)
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (0)
/* Xtensa constant pool breaks the devices in crtstuff.c to control
section in where code resides. We have to write it as asm code. Use
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment