From 62381069c9cc7378d3184347abacafbc4f63016e Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Fri, 5 Dec 1997 00:48:05 +0000 Subject: [PATCH] * m32r-sim.h (MSPR_ADDR): New macro. (m32r_mspr_device): Declare. (struct _devicep: Define. * m32r.c (m32r_mspr_device): New global. (device_{io_{read,write}_buffer,error}): New functions. * mem-ops.h (SETMEM*): Use sim_core_write_map, not read map. * sim-if.c: Delete redundant inclusion of cpu-sim.h. (sim_open): Attach device to handle MSPR register. * sim-main.h (WITH_DEVICES): Define as 1. Include cpu-sim.h. --- sim/m32r/ChangeLog | 11 +++++++++++ sim/m32r/mem-ops.h | 16 ++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index b5d145811a..c2f2a3e19b 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,5 +1,16 @@ Thu Dec 4 09:21:05 1997 Doug Evans + * m32r-sim.h (MSPR_ADDR): New macro. + (m32r_mspr_device): Declare. + (struct _devicep: Define. + * m32r.c (m32r_mspr_device): New global. + (device_{io_{read,write}_buffer,error}): New functions. + * mem-ops.h (SETMEM*): Use sim_core_write_map, not read map. + * sim-if.c: Delete redundant inclusion of cpu-sim.h. + (sim_open): Attach device to handle MSPR register. + * sim-main.h (WITH_DEVICES): Define as 1. + Include cpu-sim.h. + * configure: Regenerated to track ../common/aclocal.m4 changes. Wed Dec 3 18:08:44 1997 Doug Evans diff --git a/sim/m32r/mem-ops.h b/sim/m32r/mem-ops.h index 29e0816643..f14ebcca99 100644 --- a/sim/m32r/mem-ops.h +++ b/sim/m32r/mem-ops.h @@ -389,7 +389,7 @@ SETMEMQI (SIM_CPU *cpu, ADDR a, QI val) if (! MEM_CHECK_ALIGNMENT (a, QI)) { engine_signal (cpu, SIM_SIGBUS); return; } PROFILE_COUNT_WRITE (cpu, a, MODE_QI); - sim_core_write_aligned_1 (cpu, NULL_CIA, sim_core_read_map, a, val); + sim_core_write_aligned_1 (cpu, NULL_CIA, sim_core_write_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_SIGBUS); return; } PROFILE_COUNT_WRITE (cpu, a, MODE_HI); - sim_core_write_aligned_2 (cpu, NULL_CIA, sim_core_read_map, a, val); + sim_core_write_aligned_2 (cpu, NULL_CIA, sim_core_write_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_SIGBUS); return; } PROFILE_COUNT_WRITE (cpu, a, MODE_SI); - sim_core_write_aligned_4 (cpu, NULL_CIA, sim_core_read_map, a, val); + sim_core_write_aligned_4 (cpu, NULL_CIA, sim_core_write_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_SIGBUS); return; } PROFILE_COUNT_WRITE (cpu, a, MODE_DI); - sim_core_write_aligned_8 (cpu, NULL_CIA, sim_core_read_map, a, val); + sim_core_write_aligned_8 (cpu, NULL_CIA, sim_core_write_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_SIGBUS); return; } PROFILE_COUNT_WRITE (cpu, a, MODE_UQI); - sim_core_write_aligned_1 (cpu, NULL_CIA, sim_core_read_map, a, val); + sim_core_write_aligned_1 (cpu, NULL_CIA, sim_core_write_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_SIGBUS); return; } PROFILE_COUNT_WRITE (cpu, a, MODE_UHI); - sim_core_write_aligned_2 (cpu, NULL_CIA, sim_core_read_map, a, val); + sim_core_write_aligned_2 (cpu, NULL_CIA, sim_core_write_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_SIGBUS); return; } PROFILE_COUNT_WRITE (cpu, a, MODE_USI); - sim_core_write_aligned_4 (cpu, NULL_CIA, sim_core_read_map, a, val); + sim_core_write_aligned_4 (cpu, NULL_CIA, sim_core_write_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_SIGBUS); return; } PROFILE_COUNT_WRITE (cpu, a, MODE_UDI); - sim_core_write_aligned_8 (cpu, NULL_CIA, sim_core_read_map, a, val); + sim_core_write_aligned_8 (cpu, NULL_CIA, sim_core_write_map, a, val); } #else extern void SETMEMUDI (SIM_CPU *, ADDR, UDI);