mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
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: r129855
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
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-10-31 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* Makefile.in (targhooks.o): Add $(OPTABS_H) dependency.
|
||||
|
||||
@@ -1954,12 +1954,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. */
|
||||
@@ -1967,14 +1968,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 ();
|
||||
@@ -1993,8 +1994,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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1208,8 +1208,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
|
||||
|
||||
Reference in New Issue
Block a user