sim: frv: fix ambiguous else compiler warnings
[binutils-gdb.git] / sim / frv / profile-fr500.c
index c32af4e09f1684b73decc6be244399d566256033..e9cc49dc38d791f92feec223ae8ffe32bfdde579 100644 (file)
@@ -1,6 +1,6 @@
 /* frv simulator fr500 dependent profiling code.
 
-   Copyright (C) 1998-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-2021 Free Software Foundation, Inc.
    Contributed by Red Hat
 
 This file is part of the GNU simulators.
@@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* This must come before any other includes.  */
+#include "defs.h"
 
-*/
 #define WANT_CPU
 #define WANT_CPU_FRVBF
 
@@ -124,12 +126,14 @@ set_use_not_cc_complex (SIM_CPU *cpu, INT cc)
   d->cur_cc_complex &= ~(((DI)1) << (cc));
 }
 
+#if 0
 static int
 use_is_cc_complex (SIM_CPU *cpu, INT cc)
 {
   MODEL_FR500_DATA *d = CPU_MODEL_DATA (cpu);
   return d->prev_cc_complex &   (((DI)1) << (cc));
 }
+#endif
 
 void
 fr500_reset_fr_flags (SIM_CPU *cpu, INT fr)
@@ -154,22 +158,28 @@ adjust_float_register_busy (SIM_CPU *cpu, INT in_FRi, INT in_FRj, INT out_FRk,
      then their latency will be less than previously recorded.
      See Table 13-13 in the LSI.  */
   if (in_FRi >= 0)
-    if (use_is_fpop (cpu, in_FRi))
-      decrease_FR_busy (cpu, in_FRi, cycles);
-    else
-      enforce_full_fr_latency (cpu, in_FRi);
-  
+    {
+      if (use_is_fpop (cpu, in_FRi))
+       decrease_FR_busy (cpu, in_FRi, cycles);
+      else
+       enforce_full_fr_latency (cpu, in_FRi);
+    }
+
   if (in_FRj >= 0 && in_FRj != in_FRi)
-    if (use_is_fpop (cpu, in_FRj))
-      decrease_FR_busy (cpu, in_FRj, cycles);
-    else
-      enforce_full_fr_latency (cpu, in_FRj);
+    {
+      if (use_is_fpop (cpu, in_FRj))
+       decrease_FR_busy (cpu, in_FRj, cycles);
+      else
+       enforce_full_fr_latency (cpu, in_FRj);
+    }
 
   if (out_FRk >= 0 && out_FRk != in_FRi && out_FRk != in_FRj)
-    if (use_is_fpop (cpu, out_FRk))
-      decrease_FR_busy (cpu, out_FRk, cycles);
-    else
-      enforce_full_fr_latency (cpu, out_FRk);
+    {
+      if (use_is_fpop (cpu, out_FRk))
+       decrease_FR_busy (cpu, out_FRk, cycles);
+      else
+       enforce_full_fr_latency (cpu, out_FRk);
+    }
 }
 
 /* Latency of floating point registers may be less than recorded when followed