From: Richard Henderson Date: Fri, 3 Aug 2001 08:23:54 +0000 (-0700) Subject: alpha.md (force_movdi): New insn. X-Git-Tag: prereleases/libstdc++-3.0.95~2891 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54aaa4ea8d6157dd66ba01ed1d015b439d775378;p=thirdparty%2Fgcc.git alpha.md (force_movdi): New insn. * config/alpha/alpha.md (force_movdi): New insn. * config/alpha/alpha.c (alpha_expand_prologue): Use it. Tweek FRP marking of VMS prologue insns. * config/alpha/vms.h (EPILOGUE_USES): New. From-SVN: r44594 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3c9e19d09b00..b20204dd16bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-08-03 Richard Henderson + + * config/alpha/alpha.md (force_movdi): New insn. + * config/alpha/alpha.c (alpha_expand_prologue): Use it. + Tweek FRP marking of VMS prologue insns. + * config/alpha/vms.h (EPILOGUE_USES): New. + 2001-08-02 Richard Henderson * Makefile.in, mklibgcc.in: Revert mkinstalldirs change. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 92935e391173..2456e995977b 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -4855,13 +4855,14 @@ alpha_expand_prologue () if (TARGET_ABI_OPEN_VMS) { if (!vms_is_stack_procedure) - /* Register frame procedures fave the fp. */ - FRP (emit_move_insn (gen_rtx_REG (DImode, vms_save_fp_regno), - hard_frame_pointer_rtx)); + /* Register frame procedures save the fp. */ + /* ??? Ought to have a dwarf2 save for this. */ + emit_move_insn (gen_rtx_REG (DImode, vms_save_fp_regno), + hard_frame_pointer_rtx); if (vms_base_regno != REG_PV) - FRP (emit_move_insn (gen_rtx_REG (DImode, vms_base_regno), - gen_rtx_REG (DImode, REG_PV))); + emit_insn (gen_force_movdi (gen_rtx_REG (DImode, vms_base_regno), + gen_rtx_REG (DImode, REG_PV))); if (vms_unwind_regno == HARD_FRAME_POINTER_REGNUM) FRP (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx)); diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index b40811869a83..3e7d4f52dc3c 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -47,6 +47,7 @@ (UNSPECV_MCOUNT 8) (UNSPECV_LDGP1 9) (UNSPECV_LDGP2 10) + (UNSPECV_FORCE_MOV 11) ]) ;; Processor type -- this attribute must exactly match the processor_type @@ -4880,6 +4881,18 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" itoft %1,%0" [(set_attr "type" "ilog,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst,ftoi,itof")]) +;; VMS needs to set up "vms_base_regno" for unwinding. This move +;; often appears dead to the life analysis code, at which point we +;; abort for emitting dead prologue instructions. Force this live. + +(define_insn "force_movdi" + [(set (match_operand:DI 0 "register_operand" "=r") + (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "r")] + UNSPECV_FORCE_MOV))] + "" + "mov %1,%0" + [(set_attr "type" "ilog")]) + ;; We do three major things here: handle mem->mem, put 64-bit constants in ;; memory, and construct long 32-bit constants. diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h index 3f8fa0702140..d10a19df396f 100644 --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -111,6 +111,10 @@ Boston, MA 02111-1307, USA. */ #undef HARD_FRAME_POINTER_REGNUM #define HARD_FRAME_POINTER_REGNUM 29 +/* Define registers used by the epilogue and return instruction. */ +#undef EPILOGUE_USES +#define EPILOGUE_USES(REGNO) ((REGNO) == 26 || (REGNO) == 29) + #undef CAN_ELIMINATE #define CAN_ELIMINATE(FROM, TO) \ ((TO) != STACK_POINTER_REGNUM || ! alpha_using_fp ())