Fix 4 for the opcodes

This commit is contained in:
dingusdev 2020-01-18 07:08:11 -07:00 committed by GitHub
parent bed665076d
commit 29d0ce362c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1871,7 +1871,7 @@ void ppc_dcbz(){
void ppc_stb(){
ppc_grab_regssa();
grab_d = (uint32_t)((uint8_t)(ppc_cur_instruction & 0xFF));
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
ppc_effective_address = (reg_a == 0)?grab_d:(ppc_result_a + grab_d);
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 1);
}
@ -1885,7 +1885,7 @@ void ppc_stbx(){
void ppc_stbu(){
ppc_grab_regssa();
if (reg_a != 0){
grab_d = (uint32_t)((uint8_t)(ppc_cur_instruction & 0xFF));
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
ppc_effective_address = ppc_result_a + grab_d;
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 1);
ppc_state.ppc_gpr[reg_a] = ppc_effective_address;
@ -1982,7 +1982,7 @@ void ppc_stwcx(){
void ppc_stwu(){
ppc_grab_regssa();
if (reg_a != 0) {
grab_d = (uint32_t)((int32_t)(ppc_cur_instruction));
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
ppc_effective_address = ppc_result_a + grab_d;
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 4);
ppc_state.ppc_gpr[reg_a] = ppc_effective_address;