[aarch64] Remove handling of ADR/ADRP from prologue analyzer
[binutils-gdb.git] / sim / cris / cris-tmpl.c
index 85a7aa9f762805c363b95aafe1cfaa91576b6c49..9f0c06e755e3119621cf0452962d5419260e7143 100644 (file)
@@ -1,5 +1,5 @@
 /* CRIS base simulator support code
-   Copyright (C) 2004-2019 Free Software Foundation, Inc.
+   Copyright (C) 2004-2022 Free Software Foundation, Inc.
    Contributed by Axis Communications.
 
 This file is part of the GNU simulators.
@@ -19,12 +19,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* The infrastructure is based on that of i960.c.  */
 
+/* This must come before any other includes.  */
+#include "defs.h"
+
 #define WANT_CPU
 
 #include "sim-main.h"
 #include "cgen-mem.h"
 #include "cgen-ops.h"
 
+#include <stdlib.h>
+
 #define MY(f) XCONCAT3(crisv,BASENUM,f)
 
 /* Dispatcher for break insn.  */
@@ -118,7 +123,7 @@ MY (f_model_insn_before) (SIM_CPU *current_cpu, int first_p ATTRIBUTE_UNUSED)
   {
     int i;
     char flags[7];
-    unsigned64 cycle_count;
+    uint64_t cycle_count;
 
     SIM_DESC sd = CPU_STATE (current_cpu);
 
@@ -191,6 +196,7 @@ MY (f_model_insn_after) (SIM_CPU *current_cpu, int last_p ATTRIBUTE_UNUSED,
 #endif
 }
 
+#if 0
 /* Initialize cycle counting for an insn.
    FIRST_P is non-zero if this is the first insn in a set of parallel
    insns.  */
@@ -213,7 +219,6 @@ MY (f_model_update_insn_cycles) (SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
   abort ();
 }
 
-#if 0
 void
 MY (f_model_record_cycles) (SIM_CPU *current_cpu, unsigned long cycles)
 {
@@ -235,7 +240,7 @@ MY (f_model_mark_set_h_gr) (SIM_CPU *current_cpu, ARGBUF *abuf)
 \f
 /* Set the thread register contents.  */
 
-void
+static void
 MY (set_target_thread_data) (SIM_CPU *current_cpu, USI val)
 {
   (CPU (XCONCAT2 (h_sr_v, BASENUM) [CRIS_TLS_REGISTER])) = val;
@@ -243,7 +248,7 @@ MY (set_target_thread_data) (SIM_CPU *current_cpu, USI val)
 
 /* Create the context for a thread.  */
 
-void *
+static void *
 MY (make_thread_cpu_data) (SIM_CPU *current_cpu, void *context)
 {
   void *info = xmalloc (current_cpu->thread_cpu_data_size);