alpha.md (force_movdi): New insn.
authorRichard Henderson <rth@redhat.com>
Fri, 3 Aug 2001 08:23:54 +0000 (01:23 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 3 Aug 2001 08:23:54 +0000 (01:23 -0700)
        * 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

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.md
gcc/config/alpha/vms.h

index 3c9e19d09b00348774add93bdc032898472452d2..b20204dd16bb85726965130ca11ba7fb127c6bcc 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-03  Richard Henderson  <rth@redhat.com>
+
+       * 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  <rth@redhat.com>
 
        * Makefile.in, mklibgcc.in: Revert mkinstalldirs change.
index 92935e391173d39aae7059ec07ad468e6f35da5c..2456e995977beec1ca1e88d834006455d7b00925 100644 (file)
@@ -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));
index b40811869a8339e9c3e7ec4afe01f344d3ff6e5b..3e7d4f52dc3cb5087baa1a7cb1a7cdfe62c0e2b8 100644 (file)
@@ -47,6 +47,7 @@
    (UNSPECV_MCOUNT     8)
    (UNSPECV_LDGP1      9)
    (UNSPECV_LDGP2      10)
+   (UNSPECV_FORCE_MOV  11)
   ])
 \f
 ;; 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.
 
index 3f8fa0702140a1f47fc60961bcda663a6f2667f3..d10a19df396ffc1e86127f470f7fa2bd35436869 100644 (file)
@@ -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 ())