bfin.h (EH_RETURN_HANDLER_RTX): Use gen_frame_mem.

* config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Use gen_frame_mem.
	* config/bfin/bfin.md (UNSPEC_VOLATILE_STORE_EH_HANDLER): New constant.
	(eh_store_handler): New pattern.
	(eh_return): Emit it instead of a plain move.

From-SVN: r125681
This commit is contained in:
Bernd Schmidt 2007-06-13 17:41:07 +00:00 committed by Bernd Schmidt
parent 8d3641040c
commit 1ca950caf9
3 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2007-06-13 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Use gen_frame_mem.
* config/bfin/bfin.md (UNSPEC_VOLATILE_STORE_EH_HANDLER): New constant.
(eh_store_handler): New pattern.
(eh_return): Emit it instead of a plain move.
2007-06-13 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_init_mmx_sse_builtins)

View File

@ -813,7 +813,7 @@ typedef struct {
#define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) : INVALID_REGNUM)
#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, REG_P2)
#define EH_RETURN_HANDLER_RTX \
gen_rtx_MEM (Pmode, plus_constant (frame_pointer_rtx, UNITS_PER_WORD))
gen_frame_mem (Pmode, plus_constant (frame_pointer_rtx, UNITS_PER_WORD))
/* Addressing Modes */

View File

@ -144,7 +144,8 @@
[(UNSPEC_VOLATILE_EH_RETURN 0)
(UNSPEC_VOLATILE_CSYNC 1)
(UNSPEC_VOLATILE_SSYNC 2)
(UNSPEC_VOLATILE_LOAD_FUNCDESC 3)])
(UNSPEC_VOLATILE_LOAD_FUNCDESC 3)
(UNSPEC_VOLATILE_STORE_EH_HANDLER 4)])
(define_constants
[(MACFLAG_NONE 0)
@ -2687,12 +2688,20 @@
UNSPEC_VOLATILE_EH_RETURN)]
""
{
emit_move_insn (EH_RETURN_HANDLER_RTX, operands[0]);
emit_insn (gen_eh_store_handler (EH_RETURN_HANDLER_RTX, operands[0]));
emit_jump_insn (gen_eh_return_internal ());
emit_barrier ();
DONE;
})
(define_insn "eh_store_handler"
[(unspec_volatile [(match_operand:SI 1 "register_operand" "da")]
UNSPEC_VOLATILE_STORE_EH_HANDLER)
(clobber (match_operand:SI 0 "memory_operand" "=m"))]
""
"%0 = %1%!"
[(set_attr "type" "mcst")])
(define_insn_and_split "eh_return_internal"
[(set (pc)
(unspec_volatile [(reg:SI REG_P2)] UNSPEC_VOLATILE_EH_RETURN))]