ld: Require GCC 5 for Build pr25749-1b (-pie -fPIE)
[deliverable/binutils-gdb.git] / sim / frv / reset.c
index 51c29fe754e5ed09815ceab17e3bdb0d9a618c55..46a8629e0fd196340efe60719c11ffc43756b50a 100644 (file)
@@ -1,22 +1,21 @@
 /* frv simulator support code
-   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999-2020 Free Software Foundation, Inc.
    Contributed by Red Hat.
 
 This file is part of the GNU simulators.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 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, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define WANT_CPU
 #define WANT_CPU_FRVBF
@@ -36,6 +35,10 @@ frv_initialize (SIM_CPU *current_cpu, SIM_DESC sd)
   int data_cache_enabled = CACHE_INITIALIZED (data_cache);
   USI hsr0;
 
+  /* Initialize the register control information first since some of the
+     register values are used in further configuration.  */
+  frv_register_control_init (current_cpu);
+
   /* We need to ensure that the caches are initialized even if they are not
      initially enabled (via commandline) because they can be enabled by
      software.  */
@@ -78,9 +81,6 @@ frv_initialize (SIM_CPU *current_cpu, SIM_DESC sd)
   cgen_init_accurate_fpu (current_cpu, CGEN_CPU_FPU (current_cpu),
                          frvbf_fpu_error);
 
-  /* Initialize the register control information.  */
-  frv_register_control_init (current_cpu);
-
   /* Now perform power-on reset.  */
   frv_power_on_reset (current_cpu);
 
@@ -105,7 +105,7 @@ frv_term (SIM_DESC sd)
      then turn it off again.  This is the only place we can currently gain
      control to do this.  */
   if (frv_interrupt_state.timer.enabled && ! frv_save_profile_model_p)
-    sim_profile_set_option (current_state, "-model", PROFILE_MODEL_IDX, "0");
+    sim_profile_set_option (sd, "-model", PROFILE_MODEL_IDX, "0");
 }
 
 /* Perform a power on reset.  */
This page took 0.025397 seconds and 4 git commands to generate.