mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 20:29:46 +00:00
Code clean-up for interpreter
This commit is contained in:
parent
9210244c0c
commit
df8ea1b276
@ -603,8 +603,7 @@ void dppc_interpreter::ppc_divw() {
|
||||
if (oe_flag)
|
||||
ppc_state.spr[SPR::XER] |= 0xC0000000;
|
||||
|
||||
}
|
||||
else { /* normal signed devision */
|
||||
} else { /* normal signed devision */
|
||||
ppc_result_d = (int32_t)ppc_result_a / (int32_t)ppc_result_b;
|
||||
|
||||
if (oe_flag)
|
||||
@ -918,8 +917,7 @@ void dppc_interpreter::ppc_mtcrf() {
|
||||
}
|
||||
|
||||
void dppc_interpreter::ppc_mcrxr() {
|
||||
crf_d = (ppc_cur_instruction >> 23) & 7;
|
||||
crf_d = crf_d << 2;
|
||||
int crf_d = (ppc_cur_instruction >> 21) & 0x1C;
|
||||
ppc_state.cr = (ppc_state.cr & ~(0xF0000000UL >> crf_d)) |
|
||||
((ppc_state.spr[SPR::XER] & 0xF0000000UL) >> crf_d);
|
||||
ppc_state.spr[SPR::XER] &= 0x0FFFFFFF;
|
||||
@ -1135,8 +1133,7 @@ void dppc_interpreter::ppc_cmp() {
|
||||
}
|
||||
#endif
|
||||
|
||||
crf_d = (ppc_cur_instruction >> 23) & 7;
|
||||
crf_d = crf_d << 2;
|
||||
int crf_d = (ppc_cur_instruction >> 21) & 0x1C;
|
||||
ppc_grab_regssab();
|
||||
xercon = (ppc_state.spr[SPR::XER] & 0x80000000UL) >> 3;
|
||||
cmp_c = (((int32_t)ppc_result_a) == ((int32_t)ppc_result_b))
|
||||
@ -1153,8 +1150,7 @@ void dppc_interpreter::ppc_cmpi() {
|
||||
}
|
||||
#endif
|
||||
|
||||
crf_d = (ppc_cur_instruction >> 23) & 7;
|
||||
crf_d = crf_d << 2;
|
||||
int crf_d = (ppc_cur_instruction >> 21) & 0x1C;
|
||||
ppc_grab_regsasimm();
|
||||
xercon = (ppc_state.spr[SPR::XER] & 0x80000000UL) >> 3;
|
||||
cmp_c = (((int32_t)ppc_result_a) == simm)
|
||||
@ -1171,8 +1167,7 @@ void dppc_interpreter::ppc_cmpl() {
|
||||
}
|
||||
#endif
|
||||
|
||||
crf_d = (ppc_cur_instruction >> 23) & 7;
|
||||
crf_d = crf_d << 2;
|
||||
int crf_d = (ppc_cur_instruction >> 21) & 0x1C;
|
||||
ppc_grab_regssab();
|
||||
xercon = (ppc_state.spr[SPR::XER] & 0x80000000UL) >> 3;
|
||||
cmp_c = (ppc_result_a == ppc_result_b)
|
||||
@ -1189,8 +1184,7 @@ void dppc_interpreter::ppc_cmpli() {
|
||||
}
|
||||
#endif
|
||||
|
||||
crf_d = (ppc_cur_instruction >> 23) & 7;
|
||||
crf_d = crf_d << 2;
|
||||
int crf_d = (ppc_cur_instruction >> 21) & 0x1C;
|
||||
ppc_grab_regssauimm();
|
||||
xercon = (ppc_state.spr[SPR::XER] & 0x80000000UL) >> 3;
|
||||
cmp_c = (ppc_result_a == uimm) ? 0x20000000UL
|
||||
@ -1205,7 +1199,7 @@ void dppc_interpreter::ppc_mcrf() {
|
||||
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));
|
||||
ppc_state.cr = ((ppc_state.cr & ~(0xf0000000UL >> crf_d)) | (grab_s >> crf_d));
|
||||
}
|
||||
|
||||
void dppc_interpreter::ppc_crand() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user