]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: frv: fix -Wunused-variable warnings
authorMike Frysinger <vapier@gentoo.org>
Sat, 16 Dec 2023 05:15:58 +0000 (00:15 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 19 Dec 2023 10:51:10 +0000 (05:51 -0500)
sim/frv/cache.c
sim/frv/frv.c
sim/frv/interrupts.c
sim/frv/mloop.in
sim/frv/profile-fr500.c
sim/frv/traps.c

index b4f33f1252d5eb0ffd11f60b6b071fc1e5bea55d..c2beb39d3ef86bf6997a460f3fa668b68dbe2153 100644 (file)
@@ -517,7 +517,6 @@ frv_cache_write (FRV_CACHE *cache, SI address, char *data, unsigned length)
 
   /* See if this data is already in the cache.  */
   SIM_CPU *current_cpu = cache->cpu;
-  USI hsr0 = GET_HSR0 ();
   FRV_CACHE_TAG *tag;
   int found;
 
@@ -851,7 +850,7 @@ pipeline_requeue_request (FRV_CACHE_PIPELINE *p)
 static int
 next_priority (FRV_CACHE *cache, FRV_CACHE_PIPELINE *pipeline)
 {
-  int i, j;
+  int i;
   int pipe;
   int lowest = 0;
   FRV_CACHE_REQUEST *req;
@@ -1155,7 +1154,6 @@ address_interference (FRV_CACHE *cache, SI address, FRV_CACHE_REQUEST *req,
 static void
 wait_for_WAR (FRV_CACHE* cache, int pipe, FRV_CACHE_REQUEST *req)
 {
-  FRV_CACHE_WAR war;
   FRV_CACHE_PIPELINE *pipeline = & cache->pipeline[pipe];
 
   if (! cache->BARS.valid)
@@ -1286,7 +1284,6 @@ static void
 handle_req_preload (FRV_CACHE *cache, int pipe, FRV_CACHE_REQUEST *req)
 {
   int found;
-  FRV_CACHE_WAR war;
   FRV_CACHE_TAG *tag;
   int length;
   int lock;
@@ -1462,7 +1459,6 @@ handle_req_unlock (FRV_CACHE *cache, int pipe, FRV_CACHE_REQUEST *req)
 static void
 handle_req_WAR (FRV_CACHE *cache, int pipe, FRV_CACHE_REQUEST *req)
 {
-  char *buffer;
   FRV_CACHE_TAG *tag;
   SI address = req->address;
 
index 676bc67950d6545c944183c614bf462547158e3e..c2f2f26b26df3c7fb8d5a17f852c332d3bfcd35d 100644 (file)
@@ -656,8 +656,6 @@ spr_ccr_get_handler (SIM_CPU *current_cpu)
 void
 spr_ccr_set_handler (SIM_CPU *current_cpu, USI newval)
 {
-  int ccr = newval;
-
   SET_H_ICCR (H_ICCR_ICC3, (newval >> 28) & 0xf);
   SET_H_ICCR (H_ICCR_ICC2, (newval >> 24) & 0xf);
   SET_H_ICCR (H_ICCR_ICC1, (newval >> 20) & 0xf);
@@ -715,8 +713,6 @@ spr_cccr_get_handler (SIM_CPU *current_cpu)
 void
 spr_cccr_set_handler (SIM_CPU *current_cpu, USI newval)
 {
-  int cccr = newval;
-
   SET_H_CCCR (H_CCCR_CC7, (newval >> 14) & 0x3);
   SET_H_CCCR (H_CCCR_CC6, (newval >> 12) & 0x3);
   SET_H_CCCR (H_CCCR_CC5, (newval >> 10) & 0x3);
index a0145770f90377421746d3746379f4cee3412812..baf058f18d4a3c5d4a36f2f1e4ded44990a11efa 100644 (file)
@@ -390,7 +390,6 @@ frv_detect_insn_access_interrupts (SIM_CPU *current_cpu, SCACHE *sc)
 {
 
   const CGEN_INSN *insn = sc->argbuf.idesc->idata;
-  SIM_DESC sd = CPU_STATE (current_cpu);
   FRV_VLIW *vliw = CPU_VLIW (current_cpu);
 
   /* Check for vliw constraints.  */
@@ -431,6 +430,7 @@ frv_detect_insn_access_interrupts (SIM_CPU *current_cpu, SCACHE *sc)
       /* Enter the halt state if FSR0.QNE is set and we are executing a
         floating point insn, a media insn or an insn which access a FR
         register.  */
+      SIM_DESC sd = CPU_STATE (current_cpu);
       SI fsr0 = GET_FSR (0);
       if (GET_FSR_QNE (fsr0)
          && (frv_is_float_insn (insn) || frv_is_media_insn (insn)
@@ -808,7 +808,6 @@ set_exception_status_registers (
 )
 {
   struct frv_interrupt *interrupt = & frv_interrupt_table[item->kind];
-  int slot = (item->vpc - previous_vliw_pc) / 4;
   int reg_index = -1;
   int set_ear = 0;
   int set_edr = 0;
index 9209e83b593a988531e63fad5282f22928e8cc47..dc77f06651dc82bc9da9ea96983cd38cbee6115c 100644 (file)
@@ -139,7 +139,6 @@ static void
 {
   int i;
 
-  FRV_VLIW *vliw = CPU_VLIW (current_cpu);
   CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (current_cpu);
 
   /* Loop over the queued writes, executing them. Set the pc to the address
index 0593aefd0dfbd447ccbf2353719206886753c2d8..cc992035da7e7773b2ca035d48838b3a17faddca 100644 (file)
@@ -2043,11 +2043,8 @@ frvbf_model_fr500_u_media (SIM_CPU *cpu, const IDESC *idesc,
 {
   int cycles;
   FRV_PROFILE_STATE *ps;
-  int is_media_s1;
-  int is_media_s2;
   int busy_adjustment[] = {0, 0, 0};
   int *fr;
-  int *acc;
 
   if (model_insn == FRV_INSN_MODEL_PASS_1)
     return 0;
index aee1f0e741ac22cb394267cb9a4e2c9f52a6a16c..a5f3a2e2da2b2703a4f6c1ce54ef1a5c9529b945 100644 (file)
@@ -172,7 +172,7 @@ frv_itrap (SIM_CPU *current_cpu, PCADDR pc, USI base, SI offset)
 #if TRAPDUMP || (defined (TRAP_REGDUMP1)) || (defined (TRAP_REGDUMP2))
       {
        char buf[256];
-       int i, j;
+       int i;
 
        buf[0] = 0;
        if (STATE_TEXT_SECTION (sd)
@@ -824,7 +824,6 @@ clear_ne_flags (
 )
 {
   SI NE_flags[2];
-  int exception;
 
   GET_NE_FLAGS (NE_flags, NE_base);
   if (target_index >= 0)
@@ -857,7 +856,6 @@ frvbf_clear_ne_flags (SIM_CPU *current_cpu, SI target_index, BI is_float)
 {
   int hi_available;
   int lo_available;
-  int exception;
   SI NE_base;
   USI necr;
   FRV_REGISTER_CONTROL *control;
@@ -897,7 +895,6 @@ frvbf_commit (SIM_CPU *current_cpu, SI target_index, BI is_float)
   SI NE_base;
   SI NE_flags[2];
   BI NE_flag;
-  int exception;
   int hi_available;
   int lo_available;
   USI necr;