mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 20:29:46 +00:00
ppcopcodes: fix mcrf (again).
This commit is contained in:
parent
b26baaaeff
commit
9d89c5f64e
@ -1268,9 +1268,11 @@ void dppc_interpreter::ppc_cmpli() {
|
|||||||
void dppc_interpreter::ppc_mcrf() {
|
void dppc_interpreter::ppc_mcrf() {
|
||||||
int crf_d = (ppc_cur_instruction >> 21) & 0x1C;
|
int crf_d = (ppc_cur_instruction >> 21) & 0x1C;
|
||||||
int crf_s = (ppc_cur_instruction >> 16) & 0x1C;
|
int crf_s = (ppc_cur_instruction >> 16) & 0x1C;
|
||||||
uint32_t grab_s = ppc_state.cr & (0xf0000000UL >> crf_s);
|
|
||||||
|
|
||||||
ppc_state.cr = ((ppc_state.cr & ~(0xf0000000UL >> crf_d)) | (grab_s >> crf_d));
|
// extract and right justify source flags field
|
||||||
|
uint32_t grab_s = (ppc_state.cr >> (28 - crf_s)) & 0xF;
|
||||||
|
|
||||||
|
ppc_state.cr = (ppc_state.cr & ~(0xf0000000UL >> crf_d)) | (grab_s << (28 - crf_d));
|
||||||
}
|
}
|
||||||
|
|
||||||
void dppc_interpreter::ppc_crand() {
|
void dppc_interpreter::ppc_crand() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user