aboutsummaryrefslogtreecommitdiff
path: root/sim/microblaze/microblaze.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-12 05:49:31 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-17 03:15:43 -0400
commitc85fc61074e9fab1bafbae97ea4628c7bffaaf76 (patch)
tree26ee2dd43eb6779e09657ada35d32e650af29b7c /sim/microblaze/microblaze.h
parent034685f9ce92cf6dfb6656745365b6a5904a8e84 (diff)
downloadgdb-c85fc61074e9fab1bafbae97ea4628c7bffaaf76.zip
gdb-c85fc61074e9fab1bafbae97ea4628c7bffaaf76.tar.gz
gdb-c85fc61074e9fab1bafbae97ea4628c7bffaaf76.tar.bz2
sim: microblaze: switch to common memory functions
Re-use the existing memory core that handles reads/writes. This drops support for the dumpmem command, but gdb itself has support for dumping memory regions. The verbose command is converted to the common --verbose flag since only two call sites use it now. Support for the clearstats command is dropped entirely, but no other sim really does this, and the same thing can be done by reloading. If it's important (clearing cycle stats) to someone, we can add a common function for it.
Diffstat (limited to 'sim/microblaze/microblaze.h')
-rw-r--r--sim/microblaze/microblaze.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/sim/microblaze/microblaze.h b/sim/microblaze/microblaze.h
index e08f5a0..6b10d56 100644
--- a/sim/microblaze/microblaze.h
+++ b/sim/microblaze/microblaze.h
@@ -52,18 +52,16 @@
#define RETREG CPU.regs[3]
-#define MEM(X) memory[X]
-
-#define MEM_RD_BYTE(X) rbat(cpu, X)
-#define MEM_RD_HALF(X) rhat(cpu, X)
-#define MEM_RD_WORD(X) rlat(cpu, X)
+#define MEM_RD_BYTE(X) sim_core_read_1 (cpu, 0, read_map, X)
+#define MEM_RD_HALF(X) sim_core_read_2 (cpu, 0, read_map, X)
+#define MEM_RD_WORD(X) sim_core_read_4 (cpu, 0, read_map, X)
#define MEM_RD_UBYTE(X) (ubyte) MEM_RD_BYTE(X)
#define MEM_RD_UHALF(X) (uhalf) MEM_RD_HALF(X)
#define MEM_RD_UWORD(X) (uword) MEM_RD_WORD(X)
-#define MEM_WR_BYTE(X, D) wbat(cpu, X, D)
-#define MEM_WR_HALF(X, D) what(cpu, X, D)
-#define MEM_WR_WORD(X, D) wlat(cpu, X, D)
+#define MEM_WR_BYTE(X, D) sim_core_write_1 (cpu, 0, write_map, X, D)
+#define MEM_WR_HALF(X, D) sim_core_write_2 (cpu, 0, write_map, X, D)
+#define MEM_WR_WORD(X, D) sim_core_write_4 (cpu, 0, write_map, X, D)
#define MICROBLAZE_SEXT8(X) ((char) X)