mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-29 14:31:44 +00:00
Handle dcbz. Ignore unaligned load/store multiple. Fix icbi/isync.
This commit is contained in:
parent
4e5e13d92d
commit
2a86a4f62a
@ -267,7 +267,7 @@ const powerpc_cpu::instr_info_t powerpc_cpu::powerpc_ii_table[] = {
|
|||||||
X_form, 31, 246, CFLOW_NORMAL
|
X_form, 31, 246, CFLOW_NORMAL
|
||||||
},
|
},
|
||||||
{ "dcbz",
|
{ "dcbz",
|
||||||
EXECUTE_0(nop),
|
EXECUTE_2(dcbz, operand_RA_or_0, operand_RB),
|
||||||
NULL,
|
NULL,
|
||||||
X_form, 31, 1014, CFLOW_NORMAL
|
X_form, 31, 1014, CFLOW_NORMAL
|
||||||
},
|
},
|
||||||
|
@ -564,8 +564,15 @@ void powerpc_cpu::execute_loadstore_multiple(uint32 opcode)
|
|||||||
uint32 ea = a + d;
|
uint32 ea = a + d;
|
||||||
|
|
||||||
// FIXME: generate exception if ea is not word-aligned
|
// FIXME: generate exception if ea is not word-aligned
|
||||||
if ((ea & 3) != 0)
|
if ((ea & 3) != 0) {
|
||||||
|
#ifdef SHEEPSHAVER
|
||||||
|
D(bug("unaligned EA load/store multiple\n"));
|
||||||
|
increment_pc(4);
|
||||||
|
return;
|
||||||
|
#else
|
||||||
abort();
|
abort();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
int r = LD ? rD_field::extract(opcode) : rS_field::extract(opcode);
|
int r = LD ? rD_field::extract(opcode) : rS_field::extract(opcode);
|
||||||
while (r <= 31) {
|
while (r <= 31) {
|
||||||
@ -1065,11 +1072,25 @@ void powerpc_cpu::execute_mftbr(uint32 opcode)
|
|||||||
void powerpc_cpu::execute_icbi(uint32 opcode)
|
void powerpc_cpu::execute_icbi(uint32 opcode)
|
||||||
{
|
{
|
||||||
// TODO: record address range of code to invalidate
|
// TODO: record address range of code to invalidate
|
||||||
|
increment_pc(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void powerpc_cpu::execute_isync(uint32 opcode)
|
void powerpc_cpu::execute_isync(uint32 opcode)
|
||||||
{
|
{
|
||||||
invalidate_cache();
|
invalidate_cache();
|
||||||
|
increment_pc(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Fake) data cache management
|
||||||
|
**/
|
||||||
|
|
||||||
|
template< class RA, class RB >
|
||||||
|
void powerpc_cpu::execute_dcbz(uint32 opcode)
|
||||||
|
{
|
||||||
|
uint32 ea = RA::get(this, opcode) + RB::get(this, opcode);
|
||||||
|
vm_memset(ea - (ea % 32), 0, 32);
|
||||||
|
increment_pc(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user