]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix sh problems at -O0
authorBernd Schmidt <bernds@redhat.co.uk>
Mon, 20 Nov 2000 14:17:59 +0000 (14:17 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Mon, 20 Nov 2000 14:17:59 +0000 (14:17 +0000)
From-SVN: r37582

gcc/ChangeLog
gcc/config/sh/sh.c
gcc/toplev.c

index 958880dc38c242310a9486244fab2e46103c66e0..a7c688a556407bfd5de6cde0b06f19ef74f0dbb9 100644 (file)
@@ -1,3 +1,9 @@
+2000-11-20  Bernd Schmidt  <bernds@redhat.co.uk>
+
+       * toplev.c (rest_of_compilation): Run optimize_mode_switching even
+       if not optimizing.
+       * sh.c (emit_sf_insn, emit_df_insn): Just call emit_insn.
+
 2000-11-19  Richard Henderson  <rth@redhat.com>
 
        * crtstuff.c (force_to_data): Use array size 1 not 0.
index 4a03dd8423509f3f00911b09da1f4d91f02cc811..675920fdd13332c4bac8f84e1905169033cf25cc 100644 (file)
@@ -5014,38 +5014,14 @@ void
 emit_sf_insn (pat)
      rtx pat;
 {
-  rtx addr;
-  /* When generating reload insns,  we must not create new registers.  FPSCR
-     should already have the correct value, so do nothing to change it.  */
-  if (! TARGET_FPU_SINGLE && ! reload_in_progress && optimize < 1)
-    {
-      addr = gen_reg_rtx (SImode);
-      emit_insn (gen_fpu_switch0 (addr));
-    }
   emit_insn (pat);
-  if (! TARGET_FPU_SINGLE && ! reload_in_progress && optimize < 1)
-    {
-      addr = gen_reg_rtx (SImode);
-      emit_insn (gen_fpu_switch1 (addr));
-    }
 }
 
 void
 emit_df_insn (pat)
      rtx pat;
 {
-  rtx addr;
-  if (TARGET_FPU_SINGLE && ! reload_in_progress && optimize < 1)
-    {
-      addr = gen_reg_rtx (SImode);
-      emit_insn (gen_fpu_switch0 (addr));
-    }
   emit_insn (pat);
-  if (TARGET_FPU_SINGLE && ! reload_in_progress && optimize < 1)
-    {
-      addr = gen_reg_rtx (SImode);
-      emit_insn (gen_fpu_switch1 (addr));
-    }
 }
 
 void
index de74f28968c94ad4bd2338f49b9c636b1d45951e..536e496daed2d5995ef4a12658edd7318dce36e0 100644 (file)
@@ -3345,20 +3345,17 @@ rest_of_compilation (decl)
     register_life_up_to_date = 0;
 
 #ifdef OPTIMIZE_MODE_SWITCHING
-  if (optimize)
-    {
-      timevar_push (TV_GCSE);
-
-      if (optimize_mode_switching (NULL_PTR))
-       {
-         /* We did work, and so had to regenerate global life information.
-            Take advantage of this and don't re-recompute register life
-            information below.  */
-         register_life_up_to_date = 1;
-       }
+  timevar_push (TV_GCSE);
 
-      timevar_pop (TV_GCSE);
+  if (optimize_mode_switching (NULL_PTR))
+    {
+      /* We did work, and so had to regenerate global life information.
+        Take advantage of this and don't re-recompute register life
+        information below.  */
+      register_life_up_to_date = 1;
     }
+
+  timevar_pop (TV_GCSE);
 #endif
 
 #ifdef INSN_SCHEDULING