fix lfs/stfs breakage introduced with latest FPR type change

This commit is contained in:
gbeauche 2003-11-04 20:56:21 +00:00
parent 8c40d739b6
commit 175dfeea02

View File

@ -607,14 +607,20 @@ void powerpc_cpu::execute_fp_loadstore(uint32 opcode)
if (LD) {
if (DB)
operand_fp_dw_RD::set(this, opcode, vm_read_memory_8(ea));
else
operand_fp_dw_RD::set(this, opcode, vm_read_memory_4(ea));
else {
any_register x;
x.i = vm_read_memory_4(ea);
operand_fp_RD::set(this, opcode, (double)x.f);
}
}
else {
if (DB)
vm_write_memory_8(ea, operand_fp_dw_RS::get(this, opcode));
else
vm_write_memory_4(ea, operand_fp_dw_RS::get(this, opcode));
else {
any_register x;
x.f = (float)operand_fp_RS::get(this, opcode);
vm_write_memory_4(ea, x.i);
}
}
if (UP)