diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-06 06:38:29 -0700 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-07 21:41:27 -0700 |
commit | ee45e43358fdd19cbf061f813c8c544c5e225606 (patch) | |
tree | fb8ce09063e95acc2d2453ae8dda4f934e4fa9cc /sim/bfin | |
parent | 058d0bf5f09a4488b6d7f3d3aa5fa0958e886c3b (diff) | |
download | gdb-ee45e43358fdd19cbf061f813c8c544c5e225606.zip gdb-ee45e43358fdd19cbf061f813c8c544c5e225606.tar.gz gdb-ee45e43358fdd19cbf061f813c8c544c5e225606.tar.bz2 |
sim: bfin: fix -Wunused-but-set-variable warnings
Diffstat (limited to 'sim/bfin')
-rw-r--r-- | sim/bfin/bfin-sim.c | 9 | ||||
-rw-r--r-- | sim/bfin/dv-bfin_emac.c | 3 | ||||
-rw-r--r-- | sim/bfin/dv-bfin_mmu.c | 4 | ||||
-rw-r--r-- | sim/bfin/dv-bfin_pll.c | 2 | ||||
-rw-r--r-- | sim/bfin/dv-bfin_rtc.c | 2 | ||||
-rw-r--r-- | sim/bfin/dv-bfin_sic.c | 8 | ||||
-rw-r--r-- | sim/bfin/interp.c | 2 |
7 files changed, 7 insertions, 23 deletions
diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c index a9b8fd0..4fa5ccc 100644 --- a/sim/bfin/bfin-sim.c +++ b/sim/bfin/bfin-sim.c @@ -202,16 +202,18 @@ fmtconst_str (const_forms_t cf, bs32 x, bu32 pc) if (constant_formats[cf].reloc) { +#if 0 bu32 ea = (((constant_formats[cf].pcrel ? SIGNEXTEND (x, constant_formats[cf].nbits) : x) + constant_formats[cf].offset) << constant_formats[cf].scale); if (constant_formats[cf].pcrel) ea += pc; - /*if (outf->symbol_at_address_func (ea, outf) || !constant_formats[cf].exact) + if (outf->symbol_at_address_func (ea, outf) || !constant_formats[cf].exact) { outf->print_address_func (ea, outf); return ""; } - else*/ + else +#endif { sprintf (buf, "%#x", x); return buf; @@ -1592,7 +1594,8 @@ decode_macfunc (SIM_CPU *cpu, int which, int op, int h0, int h1, int src0, if (op != 3) { - bu8 sgn0 = (acc >> 31) & 1; + /* TODO: Figure out how the 32-bit sign is used. */ + ATTRIBUTE_UNUSED bu8 sgn0 = (acc >> 31) & 1; bu8 sgn40 = (acc >> 39) & 1; bu40 nosat_acc; diff --git a/sim/bfin/dv-bfin_emac.c b/sim/bfin/dv-bfin_emac.c index 0288b74..1ab7cd6 100644 --- a/sim/bfin/dv-bfin_emac.c +++ b/sim/bfin/dv-bfin_emac.c @@ -539,11 +539,8 @@ bfin_emac_tap_init (struct hw *me) { #if WITH_TUN struct bfin_emac *emac = hw_data (me); - const hw_unit *unit; int flags; - unit = hw_unit_address (me); - emac->tap = open ("/dev/net/tun", O_RDWR); if (emac->tap == -1) { diff --git a/sim/bfin/dv-bfin_mmu.c b/sim/bfin/dv-bfin_mmu.c index 71c7176..c14e208 100644 --- a/sim/bfin/dv-bfin_mmu.c +++ b/sim/bfin/dv-bfin_mmu.c @@ -451,7 +451,7 @@ _mmu_check_addr (SIM_CPU *cpu, bu32 addr, bool write, bool inst, int size) { SIM_DESC sd = CPU_STATE (cpu); struct bfin_mmu *mmu; - bu32 *fault_status, *fault_addr, *mem_control, *cplb_addr, *cplb_data; + bu32 *mem_control, *cplb_addr, *cplb_data; bu32 faults; bool supv, do_excp, dag1; int i, hits; @@ -469,8 +469,6 @@ _mmu_check_addr (SIM_CPU *cpu, bu32 addr, bool write, bool inst, int size) } mmu = MMU_STATE (cpu); - fault_status = inst ? &mmu->icplb_fault_status : &mmu->dcplb_fault_status; - fault_addr = inst ? &mmu->icplb_fault_addr : &mmu->dcplb_fault_addr; mem_control = inst ? &mmu->imem_control : &mmu->dmem_control; cplb_addr = inst ? &mmu->icplb_addr[0] : &mmu->dcplb_addr[0]; cplb_data = inst ? &mmu->icplb_data[0] : &mmu->dcplb_data[0]; diff --git a/sim/bfin/dv-bfin_pll.c b/sim/bfin/dv-bfin_pll.c index dd95013..863b07f 100644 --- a/sim/bfin/dv-bfin_pll.c +++ b/sim/bfin/dv-bfin_pll.c @@ -56,7 +56,6 @@ bfin_pll_io_write_buffer (struct hw *me, const void *source, bu32 mmr_off; bu32 value; bu16 *value16p; - bu32 *value32p; void *valuep; /* Invalid access mode is higher priority than missing register. */ @@ -71,7 +70,6 @@ bfin_pll_io_write_buffer (struct hw *me, const void *source, mmr_off = addr - pll->base; valuep = (void *)((uintptr_t)pll + mmr_base() + mmr_off); value16p = valuep; - value32p = valuep; HW_TRACE_WRITE (); diff --git a/sim/bfin/dv-bfin_rtc.c b/sim/bfin/dv-bfin_rtc.c index b6ae0a5..fdb63f3 100644 --- a/sim/bfin/dv-bfin_rtc.c +++ b/sim/bfin/dv-bfin_rtc.c @@ -59,7 +59,6 @@ bfin_rtc_io_write_buffer (struct hw *me, const void *source, bu32 mmr_off; bu32 value; bu16 *value16p; - bu32 *value32p; void *valuep; /* Invalid access mode is higher priority than missing register. */ @@ -74,7 +73,6 @@ bfin_rtc_io_write_buffer (struct hw *me, const void *source, mmr_off = addr - rtc->base; valuep = (void *)((uintptr_t)rtc + mmr_base() + mmr_off); value16p = valuep; - value32p = valuep; HW_TRACE_WRITE (); diff --git a/sim/bfin/dv-bfin_sic.c b/sim/bfin/dv-bfin_sic.c index 5210cf0..ac302a7 100644 --- a/sim/bfin/dv-bfin_sic.c +++ b/sim/bfin/dv-bfin_sic.c @@ -147,7 +147,6 @@ bfin_sic_52x_io_write_buffer (struct hw *me, const void *source, int space, struct bfin_sic *sic = hw_data (me); bu32 mmr_off; bu32 value; - bu16 *value16p; bu32 *value32p; void *valuep; @@ -162,7 +161,6 @@ bfin_sic_52x_io_write_buffer (struct hw *me, const void *source, int space, mmr_off = addr - sic->base; valuep = (void *)((uintptr_t)sic + mmr_base() + mmr_off); - value16p = valuep; value32p = valuep; HW_TRACE_WRITE (); @@ -261,7 +259,6 @@ bfin_sic_537_io_write_buffer (struct hw *me, const void *source, int space, struct bfin_sic *sic = hw_data (me); bu32 mmr_off; bu32 value; - bu16 *value16p; bu32 *value32p; void *valuep; @@ -276,7 +273,6 @@ bfin_sic_537_io_write_buffer (struct hw *me, const void *source, int space, mmr_off = addr - sic->base; valuep = (void *)((uintptr_t)sic + mmr_base() + mmr_off); - value16p = valuep; value32p = valuep; HW_TRACE_WRITE (); @@ -375,7 +371,6 @@ bfin_sic_54x_io_write_buffer (struct hw *me, const void *source, int space, struct bfin_sic *sic = hw_data (me); bu32 mmr_off; bu32 value; - bu16 *value16p; bu32 *value32p; void *valuep; @@ -390,7 +385,6 @@ bfin_sic_54x_io_write_buffer (struct hw *me, const void *source, int space, mmr_off = addr - sic->base; valuep = (void *)((uintptr_t)sic + mmr_base() + mmr_off); - value16p = valuep; value32p = valuep; HW_TRACE_WRITE (); @@ -482,7 +476,6 @@ bfin_sic_561_io_write_buffer (struct hw *me, const void *source, int space, struct bfin_sic *sic = hw_data (me); bu32 mmr_off; bu32 value; - bu16 *value16p; bu32 *value32p; void *valuep; @@ -497,7 +490,6 @@ bfin_sic_561_io_write_buffer (struct hw *me, const void *source, int space, mmr_off = addr - sic->base; valuep = (void *)((uintptr_t)sic + mmr_base() + mmr_off); - value16p = valuep; value32p = valuep; HW_TRACE_WRITE (); diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index 8ad6769..9a141a8 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -1011,7 +1011,6 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, if (auxvt) { # define AT_PUSH(at, val) \ - auxvt_size += 8; \ sp -= 4; \ auxvt = (val); \ sim_write (sd, sp, &auxvt, 4); \ @@ -1020,7 +1019,6 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, sim_write (sd, sp, &auxvt, 4) unsigned int egid = getegid (), gid = getgid (); unsigned int euid = geteuid (), uid = getuid (); - bu32 auxvt_size = 0; AT_PUSH (AT_NULL, 0); AT_PUSH (AT_SECURE, egid != gid || euid != uid); AT_PUSH (AT_EGID, egid); |