Commit 825c69ce025d293baee28dca6538b64ea2a3900a

Authored by aurel32
1 parent f0664048

sh4: fix tas.b @Rn instruction

(Shin-ichiro KAWASAKI, based on a patch from Andrzej Zaborowski)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5074 c046a42c-6fe2-441c-8c8c-71466251a162
target-sh4/op.c
... ... @@ -592,13 +592,6 @@ void OPPROTO op_shlr16_Rn(void)
592 592 RETURN();
593 593 }
594 594  
595   -void OPPROTO op_tasb_rN(void)
596   -{
597   - cond_t((env->gregs[PARAM1] & 0xff) == 0);
598   - *(int8_t *) &env->gregs[PARAM1] |= 0x80;
599   - RETURN();
600   -}
601   -
602 595 void OPPROTO op_movl_T0_rN(void)
603 596 {
604 597 env->gregs[PARAM1] = T0;
... ...
target-sh4/translate.c
... ... @@ -1100,7 +1100,12 @@ void _decode_opc(DisasContext * ctx)
1100 1100 gen_op_shlr16_Rn(REG(B11_8));
1101 1101 return;
1102 1102 case 0x401b: /* tas.b @Rn */
1103   - gen_op_tasb_rN(REG(B11_8));
  1103 + gen_op_movl_rN_T0(REG(B11_8));
  1104 + gen_op_movl_T0_T1();
  1105 + gen_op_ldub_T0_T0(ctx);
  1106 + gen_op_cmp_eq_imm_T0(0);
  1107 + gen_op_or_imm_T0(0x80);
  1108 + gen_op_stb_T0_T1(ctx);
1104 1109 return;
1105 1110 case 0xf00d: /* fsts FPUL,FRn - FPSCR: Nothing */
1106 1111 gen_op_movl_fpul_FT0();
... ...