X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arm%2Farm_emit.h;h=587ad28fb0ca82a1221e2ce6f0cd9c33c34e3103;hb=e38fee1b96c0b904d7f221a349fb2492258d5789;hp=5d2eee0086417a01a52577230414b247906de6ef;hpb=d5e0983c10e0ca717603dd1a406ff0d6e450e905;p=gpsp.git diff --git a/arm/arm_emit.h b/arm/arm_emit.h index 5d2eee0..587ad28 100644 --- a/arm/arm_emit.h +++ b/arm/arm_emit.h @@ -233,7 +233,6 @@ u32 arm_disect_imm_32bit(u32 imm, u32 *stores, u32 *rotations) { u32 store_count = 0; u32 left_shift = 0; - u32 i; // Otherwise it'll return 0 things to store because it'll never // find anything. @@ -276,7 +275,6 @@ u32 arm_disect_imm_32bit(u32 imm, u32 *stores, u32 *rotations) { // Then we can throw out the last bit and tack it on // to the first bit. - u32 initial_bits = rotations[0]; stores[0] = (stores[0] << ((top_bits + (32 - rotations[0])) & 0x1F)) | ((imm >> left_shift) & 0xFF); @@ -1521,7 +1519,6 @@ u32 execute_store_cpsr_body(u32 _cpsr, u32 store_mask, u32 address) thumb_decode_##type(); \ u32 __rn = prepare_load_reg(reg_rn, _rs); \ u32 __rd = prepare_store_reg(reg_rd, _rd); \ - generate_load_reg(reg_rn, _rs); \ thumb_generate_op_##op_type(name, _rd, _rs, _rn); \ complete_store_reg(__rd, _rd); \ } \ @@ -1933,6 +1930,9 @@ void execute_swi_hle_div_thumb(); void execute_swi_hle_div_c() { + if (reg[1] == 0) + // real BIOS supposedly locks up, but game can recover on interrupt + return; s32 result = (s32)reg[0] / (s32)reg[1]; reg[1] = (s32)reg[0] % (s32)reg[1]; reg[0] = result;