sh4 mov.b fix
Hello
I think this patch is needed for proper implementation of the sh4 mov.b @(disp,Rm),R0 instruction.
Vince
qemu-snapshot-2007-08-14_05/target-sh4/translate.c.orig renamed from qemu-snapshot-2007-08-14_05/target-sh4/translate.c +4 -4
@@ -879,10 +879,10 @@ gen_op_stw_T0_T1(ctx); return; case 0x8400: /* mov.b @(disp,Rn),R0 */ - gen_op_movl_rN_T0(REG(B7_4)); - gen_op_addl_imm_T0(B3_0); - gen_op_ldb_T0_T0(ctx); - gen_op_movl_T0_rN(REG(0)); + gen_op_movl_rN_T0(REG(0)); + gen_op_movl_rN_T1(REG(B7_4)); + gen_op_addl_imm_T1(B3_0); + gen_op_stb_T0_T1(ctx); return; case 0x8500: /* mov.w @(disp,Rn),R0 */ gen_op_movl_rN_T0(REG(B7_4));
Quoted 3 lines
I think this patch is needed for proper implementation of the sh4 mov.b @(disp,Rm),R0 instruction.
and of course, I managed to send a reversed patch. That will teach me to send out things like that late at night. Here's the proper patch.
Vince
qemu-snapshot-2007-08-14_05/target-sh4/translate.c renamed from qemu-snapshot-2007-08-14_05/target-sh4/translate.c.orig +4 -4
@@ -879,10 +879,10 @@gen_op_stw_T0_T1 (ctx);return ;case 0x8400 :/* mov.b @(disp,Rn),R0 */ -gen_op_movl_rN_T0 (REG (0 )); -gen_op_movl_rN_T1 (REG (B7_4 )); -gen_op_addl_imm_T1 (B3_0 ); -gen_op_stb_T0_T1 (ctx); +gen_op_movl_rN_T0 (REG (B7_4 )); +gen_op_addl_imm_T0 (B3_0 ); +gen_op_ldb_T0_T0 (ctx); +gen_op_movl_T0_rN (REG (0 ));return ;case 0x8500 :/* mov.w @(disp,Rn),R0 */ gen_op_movl_rN_T0 (REG (B7_4 ));