Correct type of address argument for sim_core_{read,write}

This commit is contained in:
Andrew Cagney 1997-10-14 09:24:57 +00:00
parent 18c64df613
commit 1b217de0f3
2 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,15 @@
Tue Oct 14 19:20:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
* sim-n-core.h (sim_core_read_aligned_N,
sim_core_write_aligned_N): Make xaddr param type address_word not
unsigned_word.
Fri Oct 3 09:49:18 1997 Andrew Cagney <cagney@b1.cygnus.com>
* sim-fpu.h, sim-fpu.c: Rewrite. Change sim_fpu object to an
unpacked floating point struct. Pass sim_fpu object by reference.
Add preliminary support for rounding modes.
Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.

View File

@ -43,16 +43,18 @@ INLINE_SIM_CORE(unsigned_N)
sim_core_read_aligned_N(sim_cpu *cpu,
sim_cia cia,
sim_core_maps map,
unsigned_word xaddr)
address_word xaddr)
{
sim_cpu_core *cpu_core = CPU_CORE (cpu);
sim_core_common *core = &cpu_core->common;
unsigned_N val;
sim_core_mapping *mapping;
address_word addr;
#if WITH_XOR_ENDIAN != 0
if (WITH_XOR_ENDIAN)
addr = xaddr ^ cpu_core->xor[(sizeof(unsigned_N) - 1) % WITH_XOR_ENDIAN];
else
#endif
addr = xaddr;
mapping = sim_core_find_mapping (core, map,
addr,
@ -74,6 +76,7 @@ sim_core_read_aligned_N(sim_cpu *cpu,
else
#endif
val = T2H_N (*(unsigned_N*) sim_core_translate (mapping, addr));
PROFILE_COUNT_CORE (cpu, addr, sizeof (unsigned_N), map);
if (TRACE_P (cpu, TRACE_CORE_IDX))
if (sizeof (unsigned_N) > 4)
trace_printf (CPU_STATE (cpu), cpu,
@ -130,6 +133,7 @@ sim_core_read_unaligned_N(sim_cpu *cpu,
sizeof (unsigned_N), addr,
read_transfer, sim_core_unaligned_signal);
val = T2H_N(val);
PROFILE_COUNT_CORE (cpu, addr, sizeof (unsigned_N), map);
return val;
}
case FORCED_ALIGNMENT:
@ -155,16 +159,18 @@ INLINE_SIM_CORE(void)
sim_core_write_aligned_N(sim_cpu *cpu,
sim_cia cia,
sim_core_maps map,
unsigned_word xaddr,
address_word xaddr,
unsigned_N val)
{
sim_cpu_core *cpu_core = CPU_CORE (cpu);
sim_core_common *core = &cpu_core->common;
sim_core_mapping *mapping;
address_word addr;
#if WITH_XOR_ENDIAN != 0
if (WITH_XOR_ENDIAN)
addr = xaddr ^ cpu_core->xor[(sizeof(unsigned_N) - 1) % WITH_XOR_ENDIAN];
else
#endif
addr = xaddr;
mapping = sim_core_find_mapping(core, map,
addr,
@ -187,6 +193,7 @@ sim_core_write_aligned_N(sim_cpu *cpu,
else
#endif
*(unsigned_N*) sim_core_translate (mapping, addr) = H2T_N (val);
PROFILE_COUNT_CORE (cpu, addr, sizeof (unsigned_N), map);
if (TRACE_P (cpu, TRACE_CORE_IDX))
if (sizeof (unsigned_N) > 4)
trace_printf (CPU_STATE (cpu), cpu,
@ -242,6 +249,7 @@ sim_core_write_unaligned_N(sim_cpu *cpu,
SIM_CORE_SIGNAL (CPU_STATE (cpu), cpu, cia, map,
sizeof (unsigned_N), addr,
write_transfer, sim_core_unaligned_signal);
PROFILE_COUNT_CORE (cpu, addr, sizeof (unsigned_N), map);
break;
}
case FORCED_ALIGNMENT: