aboutsummaryrefslogtreecommitdiff
path: root/sim/bfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-21 20:07:00 -0500
committerMike Frysinger <vapier@gentoo.org>2023-12-22 23:29:19 -0500
commit5f347a1106f5ca0924a47e4b1c652092c76abbb1 (patch)
tree05fa0f844dc9140b9111d8f3c2903ad969db5aa2 /sim/bfin
parent8ce49cf102519f42b6a5799ba30f408572ecb11e (diff)
downloadgdb-5f347a1106f5ca0924a47e4b1c652092c76abbb1.zip
gdb-5f347a1106f5ca0924a47e4b1c652092c76abbb1.tar.gz
gdb-5f347a1106f5ca0924a47e4b1c652092c76abbb1.tar.bz2
sim: bfin: fix -Wshadow=local warnings
Rename the shadowed var to avoid confusion with the function argument as to which address this code is using.
Diffstat (limited to 'sim/bfin')
-rw-r--r--sim/bfin/dv-bfin_mmu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/bfin/dv-bfin_mmu.c b/sim/bfin/dv-bfin_mmu.c
index c14e208..3d24434 100644
--- a/sim/bfin/dv-bfin_mmu.c
+++ b/sim/bfin/dv-bfin_mmu.c
@@ -144,7 +144,7 @@ bfin_mmu_io_write_buffer (struct hw *me, const void *source,
*valuep = value;
if (value)
{
- bu32 addr = mmu->sram_base_address |
+ bu32 sram_addr = mmu->sram_base_address |
((value >> (26 - 11)) & (1 << 11)) | /* addr bit 11 (Way0/Way1) */
((value >> (24 - 21)) & (1 << 21)) | /* addr bit 21 (Data/Inst) */
((value >> (23 - 15)) & (1 << 15)) | /* addr bit 15 (Data Bank) */
@@ -157,9 +157,9 @@ bfin_mmu_io_write_buffer (struct hw *me, const void *source,
hw_abort (me, "DTEST_COMMAND bits undefined");
if (value & TEST_WRITE)
- sim_write (hw_system (me), addr, mmu->dtest_data, 8);
+ sim_write (hw_system (me), sram_addr, mmu->dtest_data, 8);
else
- sim_read (hw_system (me), addr, mmu->dtest_data, 8);
+ sim_read (hw_system (me), sram_addr, mmu->dtest_data, 8);
}
break;
default: