projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatic date update in version.in
[deliverable/binutils-gdb.git]
/
sim
/
bfin
/
dv-bfin_pfmon.c
diff --git
a/sim/bfin/dv-bfin_pfmon.c
b/sim/bfin/dv-bfin_pfmon.c
index 05eff5f644f11b7105c6ce6b85a73845e2803b97..443595f633f8bef33f62ad575204050139a8861b 100644
(file)
--- a/
sim/bfin/dv-bfin_pfmon.c
+++ b/
sim/bfin/dv-bfin_pfmon.c
@@
-1,6
+1,6
@@
/* Blackfin Performance Monitor model.
/* Blackfin Performance Monitor model.
- Copyright (C) 2010-20
15
Free Software Foundation, Inc.
+ Copyright (C) 2010-20
20
Free Software Foundation, Inc.
Contributed by Analog Devices, Inc.
This file is part of simulators.
Contributed by Analog Devices, Inc.
This file is part of simulators.
@@
-53,6
+53,10
@@
bfin_pfmon_io_write_buffer (struct hw *me, const void *source, int space,
bu32 value;
bu32 *valuep;
bu32 value;
bu32 *valuep;
+ /* Invalid access mode is higher priority than missing register. */
+ if (!dv_bfin_mmr_require_32 (me, addr, nr_bytes, true))
+ return 0;
+
value = dv_load_4 (source);
mmr_off = addr - pfmon->base;
valuep = (void *)((unsigned long)pfmon + mmr_base() + mmr_off);
value = dv_load_4 (source);
mmr_off = addr - pfmon->base;
valuep = (void *)((unsigned long)pfmon + mmr_base() + mmr_off);
@@
-68,7
+72,7
@@
bfin_pfmon_io_write_buffer (struct hw *me, const void *source, int space,
break;
default:
dv_bfin_mmr_invalid (me, addr, nr_bytes, true);
break;
default:
dv_bfin_mmr_invalid (me, addr, nr_bytes, true);
-
break
;
+
return 0
;
}
return nr_bytes;
}
return nr_bytes;
@@
-83,6
+87,10
@@
bfin_pfmon_io_read_buffer (struct hw *me, void *dest, int space,
bu32 value;
bu32 *valuep;
bu32 value;
bu32 *valuep;
+ /* Invalid access mode is higher priority than missing register. */
+ if (!dv_bfin_mmr_require_32 (me, addr, nr_bytes, false))
+ return 0;
+
mmr_off = addr - pfmon->base;
valuep = (void *)((unsigned long)pfmon + mmr_base() + mmr_off);
mmr_off = addr - pfmon->base;
valuep = (void *)((unsigned long)pfmon + mmr_base() + mmr_off);
@@
-96,9
+104,8
@@
bfin_pfmon_io_read_buffer (struct hw *me, void *dest, int space,
value = *valuep;
break;
default:
value = *valuep;
break;
default:
- while (1) /* Core MMRs -> exception -> doesn't return. */
- dv_bfin_mmr_invalid (me, addr, nr_bytes, false);
- break;
+ dv_bfin_mmr_invalid (me, addr, nr_bytes, false);
+ return 0;
}
dv_store_4 (dest, value);
}
dv_store_4 (dest, value);
This page took
0.023276 seconds
and
4
git commands to generate.