mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 05:29:43 +00:00
ppcfpopcodes: Fix mcrfs.
This commit is contained in:
parent
593508df22
commit
61a90e2cfb
@ -923,12 +923,20 @@ void dppc_interpreter::ppc_mtfsb1() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void dppc_interpreter::ppc_mcrfs() {
|
void dppc_interpreter::ppc_mcrfs() {
|
||||||
crf_d = (ppc_cur_instruction >> 23) & 7;
|
int crf_d = (ppc_cur_instruction >> 21) & 0x1C;
|
||||||
crf_d = crf_d << 2;
|
int crf_s = (ppc_cur_instruction >> 16) & 0x1C;
|
||||||
crf_s = (ppc_cur_instruction >> 18) & 7;
|
ppc_state.cr = (
|
||||||
crf_s = crf_d << 2;
|
(ppc_state.cr & ~(0xF0000000UL >> crf_d)) |
|
||||||
ppc_state.cr = ~(ppc_state.cr & ((15 << (28 - crf_d)))) +
|
(((ppc_state.fpscr << crf_s) & 0xF0000000UL) >> crf_d)
|
||||||
(ppc_state.fpscr & (15 << (28 - crf_s)));
|
);
|
||||||
|
ppc_state.fpscr &= ~((0xF0000000UL >> crf_s) & (
|
||||||
|
// keep only the FPSCR bits that can be explicitly cleared
|
||||||
|
FPSCR::FX | FPSCR::OX |
|
||||||
|
FPSCR::UX | FPSCR::ZX | FPSCR::XX | FPSCR::VXSNAN |
|
||||||
|
FPSCR::VXISI | FPSCR::VXIDI | FPSCR::VXZDZ | FPSCR::VXIMZ |
|
||||||
|
FPSCR::VXVC |
|
||||||
|
FPSCR::VXSOFT | FPSCR::VXSQRT | FPSCR::VXCVI
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Floating Point Comparisons
|
// Floating Point Comparisons
|
||||||
|
Loading…
x
Reference in New Issue
Block a user