* 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.
This commit is contained in:
parent
9bb68e2096
commit
62381069c9
2 changed files with 19 additions and 8 deletions
|
@ -1,5 +1,16 @@
|
||||||
Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
|
Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
|
||||||
|
|
||||||
|
* 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.
|
* configure: Regenerated to track ../common/aclocal.m4 changes.
|
||||||
|
|
||||||
Wed Dec 3 18:08:44 1997 Doug Evans <devans@canuck.cygnus.com>
|
Wed Dec 3 18:08:44 1997 Doug Evans <devans@canuck.cygnus.com>
|
||||||
|
|
|
@ -389,7 +389,7 @@ SETMEMQI (SIM_CPU *cpu, ADDR a, QI val)
|
||||||
if (! MEM_CHECK_ALIGNMENT (a, QI))
|
if (! MEM_CHECK_ALIGNMENT (a, QI))
|
||||||
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
||||||
PROFILE_COUNT_WRITE (cpu, a, MODE_QI);
|
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
|
#else
|
||||||
extern void SETMEMQI (SIM_CPU *, ADDR, QI);
|
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))
|
if (! MEM_CHECK_ALIGNMENT (a, HI))
|
||||||
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
||||||
PROFILE_COUNT_WRITE (cpu, a, MODE_HI);
|
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
|
#else
|
||||||
extern void SETMEMHI (SIM_CPU *, ADDR, HI);
|
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))
|
if (! MEM_CHECK_ALIGNMENT (a, SI))
|
||||||
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
||||||
PROFILE_COUNT_WRITE (cpu, a, MODE_SI);
|
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
|
#else
|
||||||
extern void SETMEMSI (SIM_CPU *, ADDR, SI);
|
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))
|
if (! MEM_CHECK_ALIGNMENT (a, DI))
|
||||||
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
||||||
PROFILE_COUNT_WRITE (cpu, a, MODE_DI);
|
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
|
#else
|
||||||
extern void SETMEMDI (SIM_CPU *, ADDR, DI);
|
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))
|
if (! MEM_CHECK_ALIGNMENT (a, UQI))
|
||||||
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
||||||
PROFILE_COUNT_WRITE (cpu, a, MODE_UQI);
|
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
|
#else
|
||||||
extern void SETMEMUQI (SIM_CPU *, ADDR, UQI);
|
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))
|
if (! MEM_CHECK_ALIGNMENT (a, UHI))
|
||||||
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
||||||
PROFILE_COUNT_WRITE (cpu, a, MODE_UHI);
|
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
|
#else
|
||||||
extern void SETMEMUHI (SIM_CPU *, ADDR, UHI);
|
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))
|
if (! MEM_CHECK_ALIGNMENT (a, USI))
|
||||||
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
||||||
PROFILE_COUNT_WRITE (cpu, a, MODE_USI);
|
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
|
#else
|
||||||
extern void SETMEMUSI (SIM_CPU *, ADDR, USI);
|
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))
|
if (! MEM_CHECK_ALIGNMENT (a, UDI))
|
||||||
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
{ engine_signal (cpu, SIM_SIGBUS); return; }
|
||||||
PROFILE_COUNT_WRITE (cpu, a, MODE_UDI);
|
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
|
#else
|
||||||
extern void SETMEMUDI (SIM_CPU *, ADDR, UDI);
|
extern void SETMEMUDI (SIM_CPU *, ADDR, UDI);
|
||||||
|
|
Loading…
Reference in a new issue