* [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings
@ 2023-12-19 10:51 Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 02/21] sim: aarch64: " Mike Frysinger
` (19 more replies)
0 siblings, 20 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/common/cgen-run.c | 3 +--
sim/common/cgen-scache.c | 12 ++++++++----
sim/common/sim-module.c | 2 --
sim/common/sim-options.c | 1 -
sim/common/sim-watch.c | 2 --
sim/common/syscall.c | 4 +---
6 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/sim/common/cgen-run.c b/sim/common/cgen-run.c
index 29578b0c57f2..b0b7cf1ed365 100644
--- a/sim/common/cgen-run.c
+++ b/sim/common/cgen-run.c
@@ -56,8 +56,7 @@ static void engine_run_n (SIM_DESC, int, int, int, int);
static int
cgen_get_fast_p (SIM_DESC sd)
{
- int i, c;
- int run_fast_p = 1;
+ int c;
for (c = 0; c < MAX_NR_PROCESSORS; ++c)
{
diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c
index c6de30e16575..46dada7e2564 100644
--- a/sim/common/cgen-scache.c
+++ b/sim/common/cgen-scache.c
@@ -276,7 +276,10 @@ scache_flush (SIM_DESC sd)
void
scache_flush_cpu (SIM_CPU *cpu)
{
- int i,n;
+ int i;
+#if WITH_SCACHE_PBB
+ int n;
+#endif
/* Don't bother if cache not in use. */
if (CPU_SCACHE_SIZE (cpu) == 0)
@@ -426,9 +429,6 @@ scache_print_profile (SIM_CPU *cpu, bool verbose)
unsigned long hits = CPU_SCACHE_HITS (cpu);
unsigned long misses = CPU_SCACHE_MISSES (cpu);
char buf[20];
- unsigned long max_val;
- unsigned long *lengths;
- int i;
if (CPU_SCACHE_SIZE (cpu) == 0)
return;
@@ -460,6 +460,10 @@ scache_print_profile (SIM_CPU *cpu, bool verbose)
if (verbose)
{
+ unsigned long max_val;
+ unsigned long *lengths;
+ int i;
+
sim_io_printf (sd, " Insn chain lengths:\n\n");
max_val = 0;
lengths = CPU_SCACHE_CHAIN_LENGTHS (cpu);
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index f03e4b774b75..ac8c9782f440 100644
--- a/sim/common/sim-module.c
+++ b/sim/common/sim-module.c
@@ -133,8 +133,6 @@ sim_module_install_list (SIM_DESC sd, MODULE_INSTALL_FN * const *modules,
SIM_RC
sim_module_install (SIM_DESC sd)
{
- MODULE_INSTALL_FN * const *modp;
-
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
SIM_ASSERT (STATE_MODULES (sd) == NULL);
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index a6cd0037d2aa..9f238339fb8f 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -1078,7 +1078,6 @@ complete_option_list (char **ret, size_t *cnt, const struct option_list *ol,
const char *text, const char *word)
{
const OPTION *opt = NULL;
- int argi;
size_t len = strlen (word);
for ( ; ol != NULL; ol = ol->next)
diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c
index 6f9a53ac3b19..3366257d3c1a 100644
--- a/sim/common/sim-watch.c
+++ b/sim/common/sim-watch.c
@@ -169,8 +169,6 @@ static SIM_RC
schedule_watchpoint (SIM_DESC sd,
sim_watch_point *point)
{
- sim_watchpoints *watch = STATE_WATCHPOINTS (sd);
-
switch (point->type)
{
case pc_watchpoint:
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index 96033db84c3b..9d08730fc739 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -213,9 +213,7 @@ cb_syscall (host_callback *cb, CB_SYSCALL *sc)
/* Buffer size. */
int bufsize = sc->arg2;
int written = 0;
- /* Q is the target address of where all the strings go. */
- TADDR q;
- int i, argc, envc, len, ret;
+ int argc, envc, len, ret;
char **argv = cb->argv;
char **envp = cb->envp;
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 02/21] sim: aarch64: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 03/21] sim: bfin: " Mike Frysinger
` (18 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/aarch64/simulator.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sim/aarch64/simulator.c b/sim/aarch64/simulator.c
index 4fc66c9188d5..3dba1b7f0dc7 100644
--- a/sim/aarch64/simulator.c
+++ b/sim/aarch64/simulator.c
@@ -5827,7 +5827,6 @@ do_vec_xtl (sim_cpu *cpu)
else if (INSTR (20, 20))
{
int32_t v[4];
- int32_t v1,v2,v3,v4;
shift = INSTR (19, 16);
bias *= 2;
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 03/21] sim: bfin: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 02/21] sim: aarch64: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 04/21] sim: bpf: " Mike Frysinger
` (17 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/bfin/interp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c
index 9a141a88a34b..df1d1b3f70f2 100644
--- a/sim/bfin/interp.c
+++ b/sim/bfin/interp.c
@@ -103,7 +103,6 @@ void
bfin_syscall (SIM_CPU *cpu)
{
SIM_DESC sd = CPU_STATE (cpu);
- char * const *argv = (void *)STATE_PROG_ARGV (sd);
host_callback *cb = STATE_CALLBACK (sd);
bu32 args[6];
CB_SYSCALL sc;
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 04/21] sim: bpf: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 02/21] sim: aarch64: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 03/21] sim: bfin: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2024-01-03 9:40 ` Jose E. Marchesi
2023-12-19 10:51 ` [PATCH/committed 05/21] sim: cr16: " Mike Frysinger
` (16 subsequent siblings)
19 siblings, 1 reply; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/bpf/bpf-sim.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sim/bpf/bpf-sim.c b/sim/bpf/bpf-sim.c
index a4af22b2308b..2939e8265f78 100644
--- a/sim/bpf/bpf-sim.c
+++ b/sim/bpf/bpf-sim.c
@@ -154,7 +154,6 @@ bpf_write_u64 (SIM_CPU *cpu, bfd_vma address, uint64_t value)
static int
bpf_trace_printk (SIM_CPU *cpu)
{
- va_list ap;
SIM_DESC sd = CPU_STATE (cpu);
bfd_vma fmt_address;
@@ -1328,7 +1327,6 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
char * const *argv, char * const *env)
{
SIM_CPU *cpu = STATE_CPU (sd, 0);
- host_callback *cb = STATE_CALLBACK (sd);
bfd_vma addr;
/* Determine the start address.
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 05/21] sim: cr16: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (2 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 04/21] sim: bpf: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 06/21] sim: cris: " Mike Frysinger
` (15 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/cr16/interp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c
index d45fa6349d3e..9a2363a6d528 100644
--- a/sim/cr16/interp.c
+++ b/sim/cr16/interp.c
@@ -67,7 +67,7 @@ struct hash_entry hash_table[MAX_HASH+1];
INLINE static long
hash(unsigned long long insn, int format)
{
- unsigned int i = 4, tmp;
+ unsigned int i = 4;
if (format)
{
while ((insn >> i) != 0) i +=4;
@@ -113,7 +113,7 @@ INLINE static void
get_operands (operand_desc *s, uint64_t ins, int isize, int nops)
{
uint32_t i, opn = 0, start_bit = 0, op_type = 0;
- int32_t op_size = 0, mask = 0;
+ int32_t op_size = 0;
if (isize == 1) /* Trunkcate the extra 16 bits of INS. */
ins = ins >> 16;
@@ -397,7 +397,6 @@ sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb,
struct simops *s;
struct hash_entry *h;
static int init_p = 0;
- char **p;
int i;
SIM_DESC sd = sim_state_alloc (kind, cb);
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 06/21] sim: cris: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (3 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 05/21] sim: cr16: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 07/21] sim: erc32: " Mike Frysinger
` (14 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/cris/crisv10f.c | 1 -
sim/cris/dv-rv.c | 3 ---
sim/cris/sim-if.c | 2 --
3 files changed, 6 deletions(-)
diff --git a/sim/cris/crisv10f.c b/sim/cris/crisv10f.c
index ed4f26cdb904..7c461756d563 100644
--- a/sim/cris/crisv10f.c
+++ b/sim/cris/crisv10f.c
@@ -58,7 +58,6 @@ MY (deliver_interrupt) (SIM_CPU *current_cpu,
unsigned int vec)
{
unsigned char entryaddr_le[4];
- int was_user;
SIM_DESC sd = CPU_STATE (current_cpu);
uint32_t entryaddr;
diff --git a/sim/cris/dv-rv.c b/sim/cris/dv-rv.c
index 9142b88f7d7f..6927012a5291 100644
--- a/sim/cris/dv-rv.c
+++ b/sim/cris/dv-rv.c
@@ -443,11 +443,9 @@ hw_rv_send (struct hw *me,
void *msg,
unsigned int len_noheader)
{
- hw_rv_device *rv = (hw_rv_device *) hw_data (me);
uint8_t buf[32+3];
uint8_t *bufp;
unsigned int len = len_noheader + 3;
- int ret;
buf[0] = len & 255;
buf[1] = (len >> 8) & 255;
@@ -1048,7 +1046,6 @@ static void
hw_rv_finish (struct hw *me)
{
hw_rv_device *rv = HW_ZALLOC (me, hw_rv_device);
- int i;
const struct hw_property *mem_prop;
const struct hw_property *dummy_prop;
const struct hw_property *mbox_prop;
diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c
index 12baafbf323d..06803687ec7c 100644
--- a/sim/cris/sim-if.c
+++ b/sim/cris/sim-if.c
@@ -338,7 +338,6 @@ static void
cris_offset_sections (SIM_DESC sd, int offset)
{
struct bfd *abfd = STATE_PROG_BFD (sd);
- asection *text;
struct offsetinfo oi;
/* Only happens for usage error. */
@@ -499,7 +498,6 @@ static bfd_boolean
cris_handle_interpreter (SIM_DESC sd, struct bfd *abfd)
{
int i, n_hdrs;
- bfd_byte buf[4];
char *interp = NULL;
struct bfd *ibfd;
bfd_boolean ok = FALSE;
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 07/21] sim: erc32: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (4 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 06/21] sim: cris: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 08/21] sim: frv: " Mike Frysinger
` (13 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/erc32/erc32.c | 3 ---
sim/erc32/func.c | 2 ++
sim/erc32/interf.c | 4 ++--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/sim/erc32/erc32.c b/sim/erc32/erc32.c
index 32c45bddb680..c4abab2889c5 100644
--- a/sim/erc32/erc32.c
+++ b/sim/erc32/erc32.c
@@ -1632,10 +1632,7 @@ memory_read(int32_t asi, uint32_t addr, void *data, int32_t sz, int32_t *ws)
int
memory_write(int32_t asi, uint32_t addr, uint32_t *data, int32_t sz, int32_t *ws)
{
- uint32_t byte_addr;
- uint32_t byte_mask;
uint32_t waddr;
- uint32_t *ram;
int32_t mexc;
int i;
int wphit[2];
diff --git a/sim/erc32/func.c b/sim/erc32/func.c
index f1b230a8f918..3d1296ba230d 100644
--- a/sim/erc32/func.c
+++ b/sim/erc32/func.c
@@ -614,7 +614,9 @@ reset_stat(struct pstate *sregs)
void
show_stat(struct pstate *sregs)
{
+#ifdef STAT
uint32_t iinst;
+#endif
uint32_t stime;
if (sregs->tottime == 0.0)
diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index b487c7ca2309..79f01473565a 100644
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -332,7 +332,7 @@ sim_fetch_register(SIM_DESC sd, int regno, void *buf, int length)
uint64_t
sim_write (SIM_DESC sd, uint64_t mem, const void *buffer, uint64_t length)
{
- int i, len;
+ int i;
const unsigned char *data = buffer;
for (i = 0; i < length; i++) {
@@ -344,7 +344,7 @@ sim_write (SIM_DESC sd, uint64_t mem, const void *buffer, uint64_t length)
uint64_t
sim_read (SIM_DESC sd, uint64_t mem, void *buffer, uint64_t length)
{
- int i, len;
+ int i;
unsigned char *data = buffer;
for (i = 0; i < length; i++) {
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 08/21] sim: frv: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (5 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 07/21] sim: erc32: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 09/21] sim: ft32: " Mike Frysinger
` (12 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/frv/cache.c | 6 +-----
sim/frv/frv.c | 4 ----
sim/frv/interrupts.c | 3 +--
sim/frv/mloop.in | 1 -
sim/frv/profile-fr500.c | 3 ---
sim/frv/traps.c | 5 +----
6 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/sim/frv/cache.c b/sim/frv/cache.c
index b4f33f1252d5..c2beb39d3ef8 100644
--- a/sim/frv/cache.c
+++ b/sim/frv/cache.c
@@ -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;
diff --git a/sim/frv/frv.c b/sim/frv/frv.c
index 676bc67950d6..c2f2f26b26df 100644
--- a/sim/frv/frv.c
+++ b/sim/frv/frv.c
@@ -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);
diff --git a/sim/frv/interrupts.c b/sim/frv/interrupts.c
index a0145770f903..baf058f18d4a 100644
--- a/sim/frv/interrupts.c
+++ b/sim/frv/interrupts.c
@@ -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;
diff --git a/sim/frv/mloop.in b/sim/frv/mloop.in
index 9209e83b593a..dc77f06651dc 100644
--- a/sim/frv/mloop.in
+++ b/sim/frv/mloop.in
@@ -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
diff --git a/sim/frv/profile-fr500.c b/sim/frv/profile-fr500.c
index 0593aefd0dfb..cc992035da7e 100644
--- a/sim/frv/profile-fr500.c
+++ b/sim/frv/profile-fr500.c
@@ -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;
diff --git a/sim/frv/traps.c b/sim/frv/traps.c
index aee1f0e741ac..a5f3a2e2da2b 100644
--- a/sim/frv/traps.c
+++ b/sim/frv/traps.c
@@ -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;
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 09/21] sim: ft32: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (6 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 08/21] sim: frv: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 10/21] sim: h8300: " Mike Frysinger
` (11 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/ft32/interp.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c
index 146c88a3bcd5..9f880ab404b2 100644
--- a/sim/ft32/interp.c
+++ b/sim/ft32/interp.c
@@ -116,8 +116,6 @@ ft32_read_item (SIM_DESC sd, int dw, uint32_t ea)
{
sim_cpu *cpu = STATE_CPU (sd, 0);
address_word cia = CPU_PC_GET (cpu);
- uint8_t byte[4];
- uint32_t r;
ea = ft32_align (dw, ea);
@@ -139,7 +137,6 @@ ft32_write_item (SIM_DESC sd, int dw, uint32_t ea, uint32_t v)
{
sim_cpu *cpu = STATE_CPU (sd, 0);
address_word cia = CPU_PC_GET (cpu);
- uint8_t byte[4];
ea = ft32_align (dw, ea);
@@ -166,8 +163,6 @@ static uint32_t cpu_mem_read (SIM_DESC sd, uint32_t dw, uint32_t ea)
sim_cpu *cpu = STATE_CPU (sd, 0);
struct ft32_cpu_state *ft32_cpu = FT32_SIM_CPU (cpu);
uint32_t insnpc = ft32_cpu->pc;
- uint32_t r;
- uint8_t byte[4];
ea &= 0x1ffff;
if (ea & ~0xffff)
@@ -327,7 +322,6 @@ step_once (SIM_DESC sd)
{
sim_cpu *cpu = STATE_CPU (sd, 0);
struct ft32_cpu_state *ft32_cpu = FT32_SIM_CPU (cpu);
- address_word cia = CPU_PC_GET (cpu);
uint32_t inst;
uint32_t dw;
uint32_t cb;
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 10/21] sim: h8300: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (7 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 09/21] sim: ft32: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 11/21] sim: iq2000: " Mike Frysinger
` (10 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/h8300/compile.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 51ad66df6810..8ae7757ee1b1 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -735,7 +735,6 @@ decode (SIM_DESC sd, sim_cpu *cpu, int addr, unsigned char *data, decoded_inst *
/* Fill in the args. */
{
const op_type *args = q->args.nib;
- int hadone = 0;
int nargs;
for (nargs = 0;
@@ -1625,7 +1624,6 @@ static void
sort_opcodes_and_setup_nibble_indices (struct h8_opcode *ops)
{
const struct h8_opcode *q;
- int *indices;
int i;
/* First sort the OPS array. */
@@ -1771,7 +1769,6 @@ step_once (SIM_DESC sd, SIM_CPU *cpu)
int trace = 0;
int intMask = 0;
int oldmask;
- const struct h8300_sim_state *state = H8300_SIM_STATE (sd);
host_callback *sim_callback = STATE_CALLBACK (sd);
init_pointers (sd);
@@ -2573,8 +2570,6 @@ step_once (SIM_DESC sd, SIM_CPU *cpu)
int no_of_args = 0; /* The no. or cmdline args. */
int current_location = 0; /* Location of string. */
int old_sp = 0; /* The Initial Stack Pointer. */
- int no_of_slots = 0; /* No. of slots required on the stack
- for storing cmdline args. */
int sp_move = 0; /* No. of locations by which the stack needs
to grow. */
int new_sp = 0; /* The final stack pointer location passed
@@ -4578,7 +4573,6 @@ void
sim_info (SIM_DESC sd, bool verbose)
{
sim_cpu *cpu = STATE_CPU (sd, 0);
- const struct h8300_sim_state *state = H8300_SIM_STATE (sd);
double timetaken = (double) h8_get_ticks (cpu) / (double) now_persec ();
double virttime = h8_get_cycles (cpu) / 10.0e6;
@@ -4880,7 +4874,6 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
{
SIM_CPU *cpu = STATE_CPU (sd, 0);
int i = 0;
- int len_arg = 0;
int no_of_args = 0;
if (abfd != NULL)
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 11/21] sim: iq2000: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (8 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 10/21] sim: h8300: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 12/21] sim: lm32: " Mike Frysinger
` (9 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/iq2000/iq2000.c | 1 -
sim/iq2000/sim-if.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/sim/iq2000/iq2000.c b/sim/iq2000/iq2000.c
index 1b43c1295734..087646b59b00 100644
--- a/sim/iq2000/iq2000.c
+++ b/sim/iq2000/iq2000.c
@@ -58,7 +58,6 @@ do_syscall (SIM_CPU *current_cpu, PCADDR pc)
int syscall = H2T_4 (iq2000bf_h_gr_get (current_cpu, 11));
#endif
int syscall_function = iq2000bf_h_gr_get (current_cpu, 4);
- int i;
char *buf;
int PARM1 = iq2000bf_h_gr_get (current_cpu, 5);
int PARM2 = iq2000bf_h_gr_get (current_cpu, 6);
diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c
index a2331a1e2fdf..3fe3bbf1ae48 100644
--- a/sim/iq2000/sim-if.c
+++ b/sim/iq2000/sim-if.c
@@ -59,7 +59,6 @@ SIM_DESC
sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
char * const *argv)
{
- char c;
int i;
SIM_DESC sd = sim_state_alloc (kind, callback);
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 12/21] sim: lm32: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (9 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 11/21] sim: iq2000: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 13/21] sim: m32r: " Mike Frysinger
` (8 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/lm32/dv-lm32cpu.c | 3 ---
sim/lm32/dv-lm32timer.c | 1 -
sim/lm32/dv-lm32uart.c | 1 -
sim/lm32/traps.c | 11 +----------
4 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/sim/lm32/dv-lm32cpu.c b/sim/lm32/dv-lm32cpu.c
index 5f123e605c41..e8b3ce839715 100644
--- a/sim/lm32/dv-lm32cpu.c
+++ b/sim/lm32/dv-lm32cpu.c
@@ -143,8 +143,6 @@ deliver_lm32cpu_interrupt (struct hw *me, void *data)
struct lm32cpu *controller = hw_data (me);
SIM_DESC sd = hw_system (me);
sim_cpu *cpu = STATE_CPU (sd, 0); /* NB: fix CPU 0. */
- address_word cia = CPU_PC_GET (cpu);
- int interrupt = (uintptr_t) data;
HW_TRACE ((me, "interrupt-check event"));
@@ -198,7 +196,6 @@ lm32cpu_port_event (struct hw *me,
struct lm32cpu *controller = hw_data (me);
SIM_DESC sd = hw_system (me);
sim_cpu *cpu = STATE_CPU (sd, 0); /* NB: fix CPU 0. */
- address_word cia = CPU_PC_GET (cpu);
HW_TRACE ((me, "interrupt event on port %d, level %d", my_port, level));
diff --git a/sim/lm32/dv-lm32timer.c b/sim/lm32/dv-lm32timer.c
index 0f823c041fe5..b22595017261 100644
--- a/sim/lm32/dv-lm32timer.c
+++ b/sim/lm32/dv-lm32timer.c
@@ -199,7 +199,6 @@ static void
lm32timer_finish (struct hw *me)
{
struct lm32timer *timers;
- int i;
timers = HW_ZALLOC (me, struct lm32timer);
set_hw_data (me, timers);
diff --git a/sim/lm32/dv-lm32uart.c b/sim/lm32/dv-lm32uart.c
index 99715825ca99..709102ac1e77 100644
--- a/sim/lm32/dv-lm32uart.c
+++ b/sim/lm32/dv-lm32uart.c
@@ -292,7 +292,6 @@ static void
lm32uart_finish (struct hw *me)
{
struct lm32uart *uart;
- int i;
uart = HW_ZALLOC (me, struct lm32uart);
set_hw_data (me, uart);
diff --git a/sim/lm32/traps.c b/sim/lm32/traps.c
index d07713add44f..18e26f0449be 100644
--- a/sim/lm32/traps.c
+++ b/sim/lm32/traps.c
@@ -48,7 +48,6 @@ USI
lm32bf_divu_insn (SIM_CPU * current_cpu, IADDR pc, USI r0, USI r1, USI r2)
{
SIM_DESC sd = CPU_STATE (current_cpu);
- host_callback *cb = STATE_CALLBACK (sd);
/* Check for divide by zero */
if (GET_H_GR (r1) == 0)
@@ -76,7 +75,6 @@ USI
lm32bf_modu_insn (SIM_CPU * current_cpu, IADDR pc, USI r0, USI r1, USI r2)
{
SIM_DESC sd = CPU_STATE (current_cpu);
- host_callback *cb = STATE_CALLBACK (sd);
/* Check for divide by zero. */
if (GET_H_GR (r1) == 0)
@@ -106,7 +104,7 @@ USI
lm32bf_break_insn (SIM_CPU * current_cpu, IADDR pc)
{
SIM_DESC sd = CPU_STATE (current_cpu);
- host_callback *cb = STATE_CALLBACK (sd);
+
/* Breakpoint. */
if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
{
@@ -130,7 +128,6 @@ USI
lm32bf_scall_insn (SIM_CPU * current_cpu, IADDR pc)
{
SIM_DESC sd = CPU_STATE (current_cpu);
- host_callback *cb = STATE_CALLBACK (sd);
if ((STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
|| (GET_H_GR (8) == TARGET_NEWLIB_SYS_exit))
@@ -167,9 +164,6 @@ lm32bf_scall_insn (SIM_CPU * current_cpu, IADDR pc)
USI
lm32bf_b_insn (SIM_CPU * current_cpu, USI r0, USI f_r0)
{
- SIM_DESC sd = CPU_STATE (current_cpu);
- host_callback *cb = STATE_CALLBACK (sd);
-
/* Restore interrupt enable. */
if (f_r0 == 30)
SET_H_CSR (LM32_CSR_IE, (GET_H_CSR (LM32_CSR_IE) & 2) >> 1);
@@ -183,9 +177,6 @@ lm32bf_b_insn (SIM_CPU * current_cpu, USI r0, USI f_r0)
void
lm32bf_wcsr_insn (SIM_CPU * current_cpu, USI f_csr, USI r1)
{
- SIM_DESC sd = CPU_STATE (current_cpu);
- host_callback *cb = STATE_CALLBACK (sd);
-
/* Writing a 1 to IP CSR clears a bit, writing 0 has no effect. */
if (f_csr == LM32_CSR_IP)
SET_H_CSR (f_csr, GET_H_CSR (f_csr) & ~r1);
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 13/21] sim: m32r: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (10 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 12/21] sim: lm32: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 14/21] sim: mcore: " Mike Frysinger
` (7 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/m32r/dv-m32r_uart.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sim/m32r/dv-m32r_uart.c b/sim/m32r/dv-m32r_uart.c
index 6c8785881dea..761b4e8edbda 100644
--- a/sim/m32r/dv-m32r_uart.c
+++ b/sim/m32r/dv-m32r_uart.c
@@ -36,7 +36,6 @@ m32r_uart_io_write_buffer (struct hw *me, const void *source,
int space, address_word addr, unsigned nr_bytes)
{
SIM_DESC sd = hw_system (me);
- struct m32r_uart *uart = hw_data (me);
int status = dv_sockser_status (sd);
switch (addr)
@@ -65,7 +64,6 @@ m32r_uart_io_read_buffer (struct hw *me, void *dest,
int space, address_word addr, unsigned nr_bytes)
{
SIM_DESC sd = hw_system (me);
- struct m32r_uart *uart = hw_data (me);
int status = dv_sockser_status (sd);
switch (addr)
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 14/21] sim: mcore: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (11 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 13/21] sim: m32r: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 15/21] sim: microblaze: " Mike Frysinger
` (6 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/mcore/interp.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index 94e0a1675be7..b0c2cc2b3177 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -303,9 +303,8 @@ step_once (SIM_DESC sd, SIM_CPU *cpu)
int memops;
int bonus_cycles;
int insts;
- int w;
- int cycs;
#ifdef WATCHFUNCTIONS
+ int w;
int32_t WLhash;
#endif
@@ -356,8 +355,8 @@ step_once (SIM_DESC sd, SIM_CPU *cpu)
if ((WLincyc == 1) && (pc == WLendpc))
{
- cycs = (mcore_cpu->cycles + (insts + bonus_cycles +
- (memops * memcycles)) - WLbcyc);
+ int cycs = (mcore_cpu->cycles + (insts + bonus_cycles +
+ (memops * memcycles)) - WLbcyc);
if (WLcnts[WLW] == 1)
{
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 15/21] sim: microblaze: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (12 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 14/21] sim: mcore: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 16/21] sim: mips: " Mike Frysinger
` (5 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/microblaze/interp.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c
index 5e701e56d40c..009643861565 100644
--- a/sim/microblaze/interp.c
+++ b/sim/microblaze/interp.c
@@ -97,7 +97,6 @@ static void
set_initial_gprs (SIM_CPU *cpu)
{
int i;
- long space;
/* Set up machine just out of reset. */
PC = 0;
@@ -120,19 +119,14 @@ sim_engine_run (SIM_DESC sd,
int siggnal) /* ignore */
{
SIM_CPU *cpu = STATE_CPU (sd, 0);
- int needfetch;
signed_4 inst;
enum microblaze_instr op;
int memops;
int bonus_cycles;
int insts;
- int w;
- int cycs;
- signed_4 WLhash;
unsigned_1 carry;
bool imm_unsigned;
short ra, rb, rd;
- long immword;
unsigned_4 oldpc, newpc;
short delay_slot_enable;
short branch_taken;
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 16/21] sim: mips: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (13 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 15/21] sim: microblaze: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 17/21] sim: mn10300: " Mike Frysinger
` (4 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/mips/cp1.c | 3 ---
sim/mips/dsp.igen | 2 --
sim/mips/dsp2.igen | 5 ++---
sim/mips/interp.c | 2 --
sim/mips/mips.igen | 21 ++++++++++-----------
5 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/sim/mips/cp1.c b/sim/mips/cp1.c
index aa8b05a836c5..3e2d5d9f474d 100644
--- a/sim/mips/cp1.c
+++ b/sim/mips/cp1.c
@@ -630,7 +630,6 @@ fp_rint (sim_cpu *cpu,
FP_formats fmt)
{
sim_fpu wop = {0}, wtemp = {0}, wmagic = {0}, wans = {0};
- int64_t intermediate;
int status = 0;
sim_fpu_round round = rounding_mode (GETRM());
@@ -743,7 +742,6 @@ fp_r6_cmp (sim_cpu *cpu,
{
sim_fpu wop1, wop2;
int result = 0;
- int signalling = cond & 0x8;
switch (fmt)
{
@@ -1556,7 +1554,6 @@ fpu_inv1(sim_fpu *f, const sim_fpu *l)
sim_fpu_class_number, 0, IMPLICIT_1, 0
};
int status = 0;
- sim_fpu t;
if (sim_fpu_is_zero (l))
{
diff --git a/sim/mips/dsp.igen b/sim/mips/dsp.igen
index 5f60194eeeb0..d825e2d8a61a 100644
--- a/sim/mips/dsp.igen
+++ b/sim/mips/dsp.igen
@@ -66,7 +66,6 @@
int32_t h1, h2;
uint32_t v1 = GPR[rs];
uint32_t v2 = GPR[rt];
- uint32_t result = 0;
h1 = (int32_t)v1;
h2 = (int32_t)v2;
if (op == 0) // ADD
@@ -1888,7 +1887,6 @@
:function:::void:do_h_extr:int rt, int ac, int shift
{
- int i;
uint32_t lo = DSPLO(ac);
uint32_t hi = DSPHI(ac);
uint64_t prod = (((uint64_t)hi) << 32) + (uint64_t)lo;
diff --git a/sim/mips/dsp2.igen b/sim/mips/dsp2.igen
index 4fd588017ee4..3c6e4b227695 100644
--- a/sim/mips/dsp2.igen
+++ b/sim/mips/dsp2.igen
@@ -195,7 +195,7 @@
// round: 0 = no rounding, 1 = rounding
:function:::void:do_qb_shra:int rd, int rt, int shift, int round
{
- int i, j;
+ int i;
int8_t q0;
uint32_t v1 = GPR[rt];
uint32_t result = 0;
@@ -216,7 +216,7 @@
:function:::void:do_ph_shrl:int rd, int rt, int shift
{
- int i, j;
+ int i;
uint16_t h0;
uint32_t v1 = GPR[rt];
uint32_t result = 0;
@@ -260,7 +260,6 @@
// round: 0 = no rounding, 1 = rounding
:function:::void:do_qh_w_op:int rd, int rs, int rt, int op, int round
{
- int i;
int64_t v0;
int32_t v1 = (int32_t)GPR[rs];
int32_t v2 = (int32_t)GPR[rt];
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 18ccef8bb38a..cb650a552483 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -400,8 +400,6 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb,
/* If we find an entry at address 0, then we will end up
allocating a new buffer in the "memory alias" command
below. The region at address 0 will be deleted. */
- address_word size = (entry->modulo != 0
- ? entry->modulo : entry->nr_bytes);
if (entry->addr == 0
&& (!match || entry->level < match->level))
match = entry;
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index 0746a52d5ab1..09f82aa1dfd3 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -1133,18 +1133,17 @@
:function:::void:do_pref:int hint, int insn_offset, int insn_base
{
+ /*
address_word base = GPR[insn_base];
address_word offset = EXTEND16 (insn_offset);
- {
- address_word vaddr = loadstore_ea (SD_, base, offset);
- address_word paddr = vaddr;
- /* Prefetch (paddr, vaddr, isDATA, hint); */
- }
+ address_word vaddr = loadstore_ea (SD_, base, offset);
+ address_word paddr = vaddr;
+ Prefetch (paddr, vaddr, isDATA, hint);
+ */
}
:function:::void:do_sc:int rt, int offsetarg, int basereg, address_word instruction_0, int store_ll_bit
{
- uint32_t instruction = instruction_0;
address_word base = GPR[basereg];
address_word offset = EXTEND16 (offsetarg);
{
@@ -1684,13 +1683,13 @@
:function:::void:do_prefx:int hint, int rindex, int rbase
{
+ /*
address_word base = GPR[rbase];
address_word index = GPR[rindex];
- {
- address_word vaddr = loadstore_ea (SD_, base, index);
- address_word paddr = vaddr;
- /* Prefetch (paddr, vaddr, isDATA, hint); */
- }
+ address_word vaddr = loadstore_ea (SD_, base, index);
+ address_word paddr = vaddr;
+ Prefetch (paddr, vaddr, isDATA, hint);
+ */
}
:function:::void:do_sdc1:int ft, int offset, int base
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 17/21] sim: mn10300: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (14 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 16/21] sim: mips: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 18/21] sim: msp430: " Mike Frysinger
` (3 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/mn10300/dv-mn103tim.c | 6 ------
sim/mn10300/interp.c | 3 ---
2 files changed, 9 deletions(-)
diff --git a/sim/mn10300/dv-mn103tim.c b/sim/mn10300/dv-mn103tim.c
index 60cfbf8f898c..95ebc82b9e04 100644
--- a/sim/mn10300/dv-mn103tim.c
+++ b/sim/mn10300/dv-mn103tim.c
@@ -474,8 +474,6 @@ read_special_timer6_reg (struct hw *me,
void *dest,
unsigned nr_bytes)
{
- uint32_t val;
-
switch (nr_bytes) {
case 1:
{
@@ -612,7 +610,6 @@ do_counter6_event (struct hw *me,
{
struct mn103tim *timers = hw_data(me);
long timer_nr = (uintptr_t) data;
- int next_timer;
/* Check if counting is still enabled. */
if ( (timers->reg[timer_nr].mode & count_mask) != 0 )
@@ -641,7 +638,6 @@ write_base_reg (struct hw *me,
const void *source,
unsigned nr_bytes)
{
- unsigned i;
const uint8_t *buf8 = source;
const uint16_t *buf16 = source;
@@ -931,8 +927,6 @@ write_special_timer6_reg (struct hw *me,
const void *source,
unsigned nr_bytes)
{
- uint32_t val;
-
switch (nr_bytes) {
case 1:
{
diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c
index 91b742c72766..8a3f73c9aa43 100644
--- a/sim/mn10300/interp.c
+++ b/sim/mn10300/interp.c
@@ -35,7 +35,6 @@ mn10300_option_handler (SIM_DESC sd,
char *arg,
int is_command)
{
- int cpu_nr;
switch (opt)
{
case OPTION_BOARD:
@@ -392,8 +391,6 @@ program_interrupt (SIM_DESC sd,
sim_cia cia,
SIM_SIGNAL sig)
{
- int status;
- struct hw *device;
static int in_interrupt = 0;
#ifdef SIM_CPU_EXCEPTION_TRIGGER
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 18/21] sim: msp430: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (15 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 17/21] sim: mn10300: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 19/21] sim: moxie: " Mike Frysinger
` (2 subsequent siblings)
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/msp430/msp430-sim.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c
index b34d23e8e84d..ee5a6544f2f4 100644
--- a/sim/msp430/msp430-sim.c
+++ b/sim/msp430/msp430-sim.c
@@ -796,13 +796,12 @@ msp430_cio (SIM_DESC sd)
perform. */
sim_cpu *cpu = STATE_CPU (sd, 0);
struct msp430_cpu_state *msp430_cpu = MSP430_SIM_CPU (cpu);
- unsigned char raw_parms[13];
unsigned char parms[8];
long length;
int command;
unsigned char buffer[512];
long ret_buflen = 0;
- long fd, addr, len, rv;
+ long fd, len, rv;
sim_core_read_buffer (sd, cpu, 0, parms, msp430_cpu->cio_buffer, 5);
length = CIO_I (0);
@@ -1045,7 +1044,6 @@ msp430_step_once (SIM_DESC sd)
sim_cpu *cpu = STATE_CPU (sd, 0);
struct msp430_cpu_state *msp430_cpu = MSP430_SIM_CPU (cpu);
Get_Byte_Local_Data ld;
- unsigned char buf[100];
int i;
int opsize;
unsigned int opcode_pc;
@@ -1053,8 +1051,7 @@ msp430_step_once (SIM_DESC sd)
MSP430_Opcode_Decoded *opcode = &opcode_buf;
int s1, s2, result;
int u1 = 0, u2, uresult;
- int c = 0, reg;
- int sp;
+ int c = 0;
int carry_to_use;
int n_repeats;
int rept;
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 19/21] sim: moxie: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (16 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 18/21] sim: msp430: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 20/21] sim: sh: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 21/21] sim: v850: " Mike Frysinger
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/moxie/interp.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c
index ff41e85a184e..214af57daf93 100644
--- a/sim/moxie/interp.c
+++ b/sim/moxie/interp.c
@@ -91,11 +91,6 @@ moxie_store_unsigned_integer (unsigned char *addr, int len, unsigned long val)
}
}
-/* moxie register names. */
-static const char *reg_names[16] =
- { "$fp", "$sp", "$r0", "$r1", "$r2", "$r3", "$r4", "$r5",
- "$r6", "$r7", "$r8", "$r9", "$r10", "$r11", "$r12", "$r13" };
-
/* The machine state.
This state is maintained in host byte order. The fetch/store
@@ -137,7 +132,6 @@ static void
set_initial_gprs (void)
{
int i;
- long space;
/* Set up machine just out of reset. */
cpu.asregs.regs[PC_REGNO] = 0;
@@ -944,7 +938,6 @@ sim_engine_run (SIM_DESC sd,
{
char fname[1024];
int mode = (int) convert_target_flags ((unsigned) cpu.asregs.regs[3]);
- int perm = (int) cpu.asregs.regs[4];
int fd;
sim_core_read_buffer (sd, scpu, read_map, fname,
cpu.asregs.regs[2], 1024);
@@ -1297,7 +1290,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd,
char * const *argv, char * const *env)
{
char * const *avp;
- int l, argc, i, tp;
+ int argc, i, tp;
sim_cpu *scpu = STATE_CPU (sd, 0); /* FIXME */
if (prog_bfd != NULL)
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 20/21] sim: sh: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (17 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 19/21] sim: moxie: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 21/21] sim: v850: " Mike Frysinger
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/sh/interp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 1982b7f17a7c..01d7a1c7be91 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -822,7 +822,7 @@ static int
strswaplen (int str)
{
unsigned char *memory = saved_state.asregs.memory;
- int start, end;
+ int end;
int endian = endianb;
if (! endian)
@@ -1499,8 +1499,6 @@ get_loop_bounds (int rs, int re, unsigned char *memory, unsigned char *mem_end,
static void *
mcalloc (size_t nmemb, size_t size)
{
- void *page;
-
if (nmemb != 1)
size *= nmemb;
return mmap (0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS,
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH/committed 21/21] sim: v850: fix -Wunused-variable warnings
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
` (18 preceding siblings ...)
2023-12-19 10:51 ` [PATCH/committed 20/21] sim: sh: " Mike Frysinger
@ 2023-12-19 10:51 ` Mike Frysinger
19 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2023-12-19 10:51 UTC (permalink / raw)
To: gdb-patches
---
sim/v850/simops.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 05770a946ea1..97948f75f92d 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -2455,7 +2455,6 @@ OP_28007E0 (void)
signed long int remainder;
signed long int divide_by;
signed long int divide_this;
- int overflow = 0;
trace_input ("divh", OP_REG_REG_REG, 0);
--
2.43.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH/committed 04/21] sim: bpf: fix -Wunused-variable warnings
2023-12-19 10:51 ` [PATCH/committed 04/21] sim: bpf: " Mike Frysinger
@ 2024-01-03 9:40 ` Jose E. Marchesi
0 siblings, 0 replies; 22+ messages in thread
From: Jose E. Marchesi @ 2024-01-03 9:40 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches
Thanks for fixing this.
> ---
> sim/bpf/bpf-sim.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/sim/bpf/bpf-sim.c b/sim/bpf/bpf-sim.c
> index a4af22b2308b..2939e8265f78 100644
> --- a/sim/bpf/bpf-sim.c
> +++ b/sim/bpf/bpf-sim.c
> @@ -154,7 +154,6 @@ bpf_write_u64 (SIM_CPU *cpu, bfd_vma address, uint64_t value)
> static int
> bpf_trace_printk (SIM_CPU *cpu)
> {
> - va_list ap;
> SIM_DESC sd = CPU_STATE (cpu);
>
> bfd_vma fmt_address;
> @@ -1328,7 +1327,6 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
> char * const *argv, char * const *env)
> {
> SIM_CPU *cpu = STATE_CPU (sd, 0);
> - host_callback *cb = STATE_CALLBACK (sd);
> bfd_vma addr;
>
> /* Determine the start address.
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-01-03 9:40 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19 10:51 [PATCH/committed 01/21] sim: common: fix -Wunused-variable warnings Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 02/21] sim: aarch64: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 03/21] sim: bfin: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 04/21] sim: bpf: " Mike Frysinger
2024-01-03 9:40 ` Jose E. Marchesi
2023-12-19 10:51 ` [PATCH/committed 05/21] sim: cr16: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 06/21] sim: cris: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 07/21] sim: erc32: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 08/21] sim: frv: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 09/21] sim: ft32: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 10/21] sim: h8300: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 11/21] sim: iq2000: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 12/21] sim: lm32: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 13/21] sim: m32r: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 14/21] sim: mcore: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 15/21] sim: microblaze: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 16/21] sim: mips: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 17/21] sim: mn10300: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 18/21] sim: msp430: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 19/21] sim: moxie: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 20/21] sim: sh: " Mike Frysinger
2023-12-19 10:51 ` [PATCH/committed 21/21] sim: v850: " Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).