aboutsummaryrefslogtreecommitdiff
path: root/sim/m32r
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-05-05 13:21:04 +0000
committerAndrew Cagney <cagney@redhat.com>1997-05-05 13:21:04 +0000
commit7a418800c16e72cc1f902ad19e0e81d1a6d66576 (patch)
tree06e7375d21160e5d650d31e99c42f5b6bca2b3e6 /sim/m32r
parent3971886ac1616c4125531e42a884f031e27f7e21 (diff)
downloadgdb-7a418800c16e72cc1f902ad19e0e81d1a6d66576.zip
gdb-7a418800c16e72cc1f902ad19e0e81d1a6d66576.tar.gz
gdb-7a418800c16e72cc1f902ad19e0e81d1a6d66576.tar.bz2
Start of implementation of a distributed (between processors)
simulator core object.
Diffstat (limited to 'sim/m32r')
-rw-r--r--sim/m32r/ChangeLog8
-rw-r--r--sim/m32r/mem-ops.h32
-rw-r--r--sim/m32r/sim-if.c7
3 files changed, 29 insertions, 18 deletions
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index 16cdb6b..4654296 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,11 @@
+Mon May 5 12:45:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * sim-if.c (sim_open): Update to reflect changes to core in
+ ../common/.
+ * mem-ops.h (GETMEMQI, GETMEMHI, GETMEMSI, GETMEMDI, GETMEMUQI,
+ GETMEMUHI, GETMEMUSI, GETMEMUDI, SETMEMQI, SETMEMHI, SETMEMSI,
+ SETMEMDI, SETMEMUQI, SETMEMUHI, SETMEMUSI, SETMEMUDI): Ditto.
+
Sat May 3 08:38:55 1997 Doug Evans <dje@seba.cygnus.com>
* decode.c (decode): Add computed goto support.
diff --git a/sim/m32r/mem-ops.h b/sim/m32r/mem-ops.h
index 835ef34..080e98e 100644
--- a/sim/m32r/mem-ops.h
+++ b/sim/m32r/mem-ops.h
@@ -269,7 +269,7 @@ GETMEMQI (SIM_CPU *cpu, ADDR a)
if (! MEM_CHECK_ALIGNMENT (a, QI))
{ engine_signal (cpu, SIM_SIGALIGN); }
PROFILE_COUNT_READ (cpu, a, MODE_QI);
- return sim_core_read_1 (CPU_STATE (cpu), sim_core_read_map, a, NULL, NULL_CIA);
+ return sim_core_read_aligned_1 (cpu, NULL_CIA, sim_core_read_map, a);
}
#else
extern QI GETMEMQI (SIM_CPU *, ADDR);
@@ -284,7 +284,7 @@ GETMEMHI (SIM_CPU *cpu, ADDR a)
if (! MEM_CHECK_ALIGNMENT (a, HI))
{ engine_signal (cpu, SIM_SIGALIGN); }
PROFILE_COUNT_READ (cpu, a, MODE_HI);
- return sim_core_read_2 (CPU_STATE (cpu), sim_core_read_map, a, NULL, NULL_CIA);
+ return sim_core_read_aligned_2 (cpu, NULL_CIA, sim_core_read_map, a);
}
#else
extern HI GETMEMHI (SIM_CPU *, ADDR);
@@ -299,7 +299,7 @@ GETMEMSI (SIM_CPU *cpu, ADDR a)
if (! MEM_CHECK_ALIGNMENT (a, SI))
{ engine_signal (cpu, SIM_SIGALIGN); }
PROFILE_COUNT_READ (cpu, a, MODE_SI);
- return sim_core_read_4 (CPU_STATE (cpu), sim_core_read_map, a, NULL, NULL_CIA);
+ return sim_core_read_aligned_4 (cpu, NULL_CIA, sim_core_read_map, a);
}
#else
extern SI GETMEMSI (SIM_CPU *, ADDR);
@@ -314,7 +314,7 @@ GETMEMDI (SIM_CPU *cpu, ADDR a)
if (! MEM_CHECK_ALIGNMENT (a, DI))
{ engine_signal (cpu, SIM_SIGALIGN); }
PROFILE_COUNT_READ (cpu, a, MODE_DI);
- return sim_core_read_8 (CPU_STATE (cpu), sim_core_read_map, a, NULL, NULL_CIA);
+ return sim_core_read_aligned_8 (cpu, NULL_CIA, sim_core_read_map, a);
}
#else
extern DI GETMEMDI (SIM_CPU *, ADDR);
@@ -329,7 +329,7 @@ GETMEMUQI (SIM_CPU *cpu, ADDR a)
if (! MEM_CHECK_ALIGNMENT (a, UQI))
{ engine_signal (cpu, SIM_SIGALIGN); }
PROFILE_COUNT_READ (cpu, a, MODE_UQI);
- return sim_core_read_1 (CPU_STATE (cpu), sim_core_read_map, a, NULL, NULL_CIA);
+ return sim_core_read_aligned_1 (cpu, NULL_CIA, sim_core_read_map, a);
}
#else
extern UQI GETMEMUQI (SIM_CPU *, ADDR);
@@ -344,7 +344,7 @@ GETMEMUHI (SIM_CPU *cpu, ADDR a)
if (! MEM_CHECK_ALIGNMENT (a, UHI))
{ engine_signal (cpu, SIM_SIGALIGN); }
PROFILE_COUNT_READ (cpu, a, MODE_UHI);
- return sim_core_read_2 (CPU_STATE (cpu), sim_core_read_map, a, NULL, NULL_CIA);
+ return sim_core_read_aligned_2 (cpu, NULL_CIA, sim_core_read_map, a);
}
#else
extern UHI GETMEMUHI (SIM_CPU *, ADDR);
@@ -359,7 +359,7 @@ GETMEMUSI (SIM_CPU *cpu, ADDR a)
if (! MEM_CHECK_ALIGNMENT (a, USI))
{ engine_signal (cpu, SIM_SIGALIGN); }
PROFILE_COUNT_READ (cpu, a, MODE_USI);
- return sim_core_read_4 (CPU_STATE (cpu), sim_core_read_map, a, NULL, NULL_CIA);
+ return sim_core_read_aligned_4 (cpu, NULL_CIA, sim_core_read_map, a);
}
#else
extern USI GETMEMUSI (SIM_CPU *, ADDR);
@@ -374,7 +374,7 @@ GETMEMUDI (SIM_CPU *cpu, ADDR a)
if (! MEM_CHECK_ALIGNMENT (a, UDI))
{ engine_signal (cpu, SIM_SIGALIGN); }
PROFILE_COUNT_READ (cpu, a, MODE_UDI);
- return sim_core_read_8 (CPU_STATE (cpu), sim_core_read_map, a, NULL, NULL_CIA);
+ return sim_core_read_aligned_8 (cpu, NULL_CIA, sim_core_read_map, a);
}
#else
extern UDI GETMEMUDI (SIM_CPU *, ADDR);
@@ -389,7 +389,7 @@ SETMEMQI (SIM_CPU *cpu, ADDR a, QI val)
if (! MEM_CHECK_ALIGNMENT (a, QI))
{ engine_signal (cpu, SIM_SIGALIGN); return; }
PROFILE_COUNT_WRITE (cpu, a, MODE_QI);
- sim_core_write_1 (CPU_STATE (cpu), sim_core_read_map, a, val, NULL, NULL_CIA);
+ sim_core_write_aligned_1 (cpu, NULL_CIA, sim_core_read_map, a, val);
}
#else
extern void SETMEMQI (SIM_CPU *, ADDR, QI);
@@ -404,7 +404,7 @@ SETMEMHI (SIM_CPU *cpu, ADDR a, HI val)
if (! MEM_CHECK_ALIGNMENT (a, HI))
{ engine_signal (cpu, SIM_SIGALIGN); return; }
PROFILE_COUNT_WRITE (cpu, a, MODE_HI);
- sim_core_write_2 (CPU_STATE (cpu), sim_core_read_map, a, val, NULL, NULL_CIA);
+ sim_core_write_aligned_2 (cpu, NULL_CIA, sim_core_read_map, a, val);
}
#else
extern void SETMEMHI (SIM_CPU *, ADDR, HI);
@@ -419,7 +419,7 @@ SETMEMSI (SIM_CPU *cpu, ADDR a, SI val)
if (! MEM_CHECK_ALIGNMENT (a, SI))
{ engine_signal (cpu, SIM_SIGALIGN); return; }
PROFILE_COUNT_WRITE (cpu, a, MODE_SI);
- sim_core_write_4 (CPU_STATE (cpu), sim_core_read_map, a, val, NULL, NULL_CIA);
+ sim_core_write_aligned_4 (cpu, NULL_CIA, sim_core_read_map, a, val);
}
#else
extern void SETMEMSI (SIM_CPU *, ADDR, SI);
@@ -434,7 +434,7 @@ SETMEMDI (SIM_CPU *cpu, ADDR a, DI val)
if (! MEM_CHECK_ALIGNMENT (a, DI))
{ engine_signal (cpu, SIM_SIGALIGN); return; }
PROFILE_COUNT_WRITE (cpu, a, MODE_DI);
- sim_core_write_8 (CPU_STATE (cpu), sim_core_read_map, a, val, NULL, NULL_CIA);
+ sim_core_write_aligned_8 (cpu, NULL_CIA, sim_core_read_map, a, val);
}
#else
extern void SETMEMDI (SIM_CPU *, ADDR, DI);
@@ -449,7 +449,7 @@ SETMEMUQI (SIM_CPU *cpu, ADDR a, UQI val)
if (! MEM_CHECK_ALIGNMENT (a, UQI))
{ engine_signal (cpu, SIM_SIGALIGN); return; }
PROFILE_COUNT_WRITE (cpu, a, MODE_UQI);
- sim_core_write_1 (CPU_STATE (cpu), sim_core_read_map, a, val, NULL, NULL_CIA);
+ sim_core_write_aligned_1 (cpu, NULL_CIA, sim_core_read_map, a, val);
}
#else
extern void SETMEMUQI (SIM_CPU *, ADDR, UQI);
@@ -464,7 +464,7 @@ SETMEMUHI (SIM_CPU *cpu, ADDR a, UHI val)
if (! MEM_CHECK_ALIGNMENT (a, UHI))
{ engine_signal (cpu, SIM_SIGALIGN); return; }
PROFILE_COUNT_WRITE (cpu, a, MODE_UHI);
- sim_core_write_2 (CPU_STATE (cpu), sim_core_read_map, a, val, NULL, NULL_CIA);
+ sim_core_write_aligned_2 (cpu, NULL_CIA, sim_core_read_map, a, val);
}
#else
extern void SETMEMUHI (SIM_CPU *, ADDR, UHI);
@@ -479,7 +479,7 @@ SETMEMUSI (SIM_CPU *cpu, ADDR a, USI val)
if (! MEM_CHECK_ALIGNMENT (a, USI))
{ engine_signal (cpu, SIM_SIGALIGN); return; }
PROFILE_COUNT_WRITE (cpu, a, MODE_USI);
- sim_core_write_4 (CPU_STATE (cpu), sim_core_read_map, a, val, NULL, NULL_CIA);
+ sim_core_write_aligned_4 (cpu, NULL_CIA, sim_core_read_map, a, val);
}
#else
extern void SETMEMUSI (SIM_CPU *, ADDR, USI);
@@ -494,7 +494,7 @@ SETMEMUDI (SIM_CPU *cpu, ADDR a, UDI val)
if (! MEM_CHECK_ALIGNMENT (a, UDI))
{ engine_signal (cpu, SIM_SIGALIGN); return; }
PROFILE_COUNT_WRITE (cpu, a, MODE_UDI);
- sim_core_write_8 (CPU_STATE (cpu), sim_core_read_map, a, val, NULL, NULL_CIA);
+ sim_core_write_aligned_8 (cpu, NULL_CIA, sim_core_read_map, a, val);
}
#else
extern void SETMEMUDI (SIM_CPU *, ADDR, UDI);
diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c
index 620a44a..7e97528 100644
--- a/sim/m32r/sim-if.c
+++ b/sim/m32r/sim-if.c
@@ -81,6 +81,7 @@ sim_open (kind, argv)
/* FIXME:wip */
sim_core_attach (sd,
+ NULL,
attach_raw_memory,
access_read_write_exec,
0, 0, 0x100000, NULL, NULL);
@@ -191,13 +192,15 @@ static void
print_m32r_misc_cpu (SIM_CPU *cpu, int verbose)
{
SIM_DESC sd = CPU_STATE (cpu);
+ char buf[20];
if (CPU_PROFILE_FLAGS (cpu) [PROFILE_INSN_IDX])
{
sim_io_printf (sd, "Miscellaneous Statistics\n\n");
- sim_io_printf (sd, " %-*s %ld\n\n",
+ sim_io_printf (sd, " %-*s %s\n\n",
PROFILE_LABEL_WIDTH, "Fill nops:",
- CPU_M32R_PROFILE (cpu).fillnop_count);
+ sim_add_commas (buf, sizeof (buf),
+ CPU_M32R_PROFILE (cpu).fillnop_count));
}
}