aboutsummaryrefslogtreecommitdiff
path: root/sim/microblaze/microblaze.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-03-29 17:40:30 -0400
committerMike Frysinger <vapier@gentoo.org>2015-03-29 17:40:30 -0400
commit2b4bc832a7668438827f5cdca9bf22adab85a915 (patch)
treedf569b0c17be6027e0abb93625da9f504babfe81 /sim/microblaze/microblaze.h
parent97eca187b3b286c903d78070736bbe1d95721ec4 (diff)
downloadgdb-2b4bc832a7668438827f5cdca9bf22adab85a915.zip
gdb-2b4bc832a7668438827f5cdca9bf22adab85a915.tar.gz
gdb-2b4bc832a7668438827f5cdca9bf22adab85a915.tar.bz2
sim: microblaze: convert to nrun
This port already was storing its cpu state in the sim_cpu structure, so converting it over was pretty easy. It is allocating memory itself still, but we'll fix that up in the future at some point.
Diffstat (limited to 'sim/microblaze/microblaze.h')
-rw-r--r--sim/microblaze/microblaze.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sim/microblaze/microblaze.h b/sim/microblaze/microblaze.h
index df5d992..e08f5a0 100644
--- a/sim/microblaze/microblaze.h
+++ b/sim/microblaze/microblaze.h
@@ -24,7 +24,7 @@
#define GET_RA ((inst & RA_MASK) >> RA_LOW)
#define GET_RB ((inst & RB_MASK) >> RB_LOW)
-#define CPU microblaze_state.cpu[0].microblaze_cpu
+#define CPU cpu->microblaze_cpu
#define RD CPU.regs[rd]
#define RA CPU.regs[ra]
@@ -54,16 +54,16 @@
#define MEM(X) memory[X]
-#define MEM_RD_BYTE(X) rbat(X)
-#define MEM_RD_HALF(X) rhat(X)
-#define MEM_RD_WORD(X) rlat(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_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(X, D)
-#define MEM_WR_HALF(X, D) what(X, D)
-#define MEM_WR_WORD(X, D) wlat(X, D)
+#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 MICROBLAZE_SEXT8(X) ((char) X)