Commit 022a22c7e1c8bc5521c521ab9cbecfa893b610c4

Authored by ths
1 parent e67888a7

Ignore PR flag in FPSCR when performing fmov, by Magnus Damm.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3005 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 38 deletions
target-sh4/translate.c
... ... @@ -648,10 +648,7 @@ void decode_opc(DisasContext * ctx)
648 648 gen_op_xor_T0_rN(REG(B11_8));
649 649 return;
650 650 case 0xf00c: /* fmov {F,D,X}Rm,{F,D,X}Rn - FPSCR: Nothing */
651   - if (ctx->fpscr & FPSCR_PR) {
652   - gen_op_fmov_drN_DT0(XREG(B7_4));
653   - gen_op_fmov_DT0_drN(XREG(B11_8));
654   - } else if (ctx->fpscr & FPSCR_SZ) {
  651 + if (ctx->fpscr & FPSCR_SZ) {
655 652 if (ctx->opcode & 0x0110)
656 653 break; /* illegal instruction */
657 654 gen_op_fmov_drN_DT0(DREG(B7_4));
... ... @@ -662,11 +659,7 @@ void decode_opc(DisasContext * ctx)
662 659 }
663 660 return;
664 661 case 0xf00a: /* fmov {F,D,X}Rm,@Rn - FPSCR: Nothing */
665   - if (ctx->fpscr & FPSCR_PR) {
666   - gen_op_fmov_drN_DT0(XREG(B7_4));
667   - gen_op_movl_rN_T1(REG(B11_8));
668   - gen_op_stfq_DT0_T1(ctx);
669   - } else if (ctx->fpscr & FPSCR_SZ) {
  662 + if (ctx->fpscr & FPSCR_SZ) {
670 663 if (ctx->opcode & 0x0010)
671 664 break; /* illegal instruction */
672 665 gen_op_fmov_drN_DT0(DREG(B7_4));
... ... @@ -679,11 +672,7 @@ void decode_opc(DisasContext * ctx)
679 672 }
680 673 return;
681 674 case 0xf008: /* fmov @Rm,{F,D,X}Rn - FPSCR: Nothing */
682   - if (ctx->fpscr & FPSCR_PR) {
683   - gen_op_movl_rN_T0(REG(B7_4));
684   - gen_op_ldfq_T0_DT0(ctx);
685   - gen_op_fmov_DT0_drN(XREG(B11_8));
686   - } else if (ctx->fpscr & FPSCR_SZ) {
  675 + if (ctx->fpscr & FPSCR_SZ) {
687 676 if (ctx->opcode & 0x0100)
688 677 break; /* illegal instruction */
689 678 gen_op_movl_rN_T0(REG(B7_4));
... ... @@ -696,12 +685,7 @@ void decode_opc(DisasContext * ctx)
696 685 }
697 686 return;
698 687 case 0xf009: /* fmov @Rm+,{F,D,X}Rn - FPSCR: Nothing */
699   - if (ctx->fpscr & FPSCR_PR) {
700   - gen_op_movl_rN_T0(REG(B7_4));
701   - gen_op_ldfq_T0_DT0(ctx);
702   - gen_op_fmov_DT0_drN(XREG(B11_8));
703   - gen_op_inc8_rN(REG(B7_4));
704   - } else if (ctx->fpscr & FPSCR_SZ) {
  688 + if (ctx->fpscr & FPSCR_SZ) {
705 689 if (ctx->opcode & 0x0100)
706 690 break; /* illegal instruction */
707 691 gen_op_movl_rN_T0(REG(B7_4));
... ... @@ -716,12 +700,7 @@ void decode_opc(DisasContext * ctx)
716 700 }
717 701 return;
718 702 case 0xf00b: /* fmov {F,D,X}Rm,@-Rn - FPSCR: Nothing */
719   - if (ctx->fpscr & FPSCR_PR) {
720   - gen_op_dec8_rN(REG(B11_8));
721   - gen_op_fmov_drN_DT0(XREG(B7_4));
722   - gen_op_movl_rN_T1(REG(B11_8));
723   - gen_op_stfq_DT0_T1(ctx);
724   - } else if (ctx->fpscr & FPSCR_SZ) {
  703 + if (ctx->fpscr & FPSCR_SZ) {
725 704 if (ctx->opcode & 0x0100)
726 705 break; /* illegal instruction */
727 706 gen_op_dec8_rN(REG(B11_8));
... ... @@ -736,12 +715,7 @@ void decode_opc(DisasContext * ctx)
736 715 }
737 716 return;
738 717 case 0xf006: /* fmov @(R0,Rm),{F,D,X}Rm - FPSCR: Nothing */
739   - if (ctx->fpscr & FPSCR_PR) {
740   - gen_op_movl_rN_T0(REG(B7_4));
741   - gen_op_add_rN_T0(REG(0));
742   - gen_op_ldfq_T0_DT0(ctx);
743   - gen_op_fmov_DT0_drN(XREG(B11_8));
744   - } else if (ctx->fpscr & FPSCR_SZ) {
  718 + if (ctx->fpscr & FPSCR_SZ) {
745 719 if (ctx->opcode & 0x0100)
746 720 break; /* illegal instruction */
747 721 gen_op_movl_rN_T0(REG(B7_4));
... ... @@ -756,12 +730,7 @@ void decode_opc(DisasContext * ctx)
756 730 }
757 731 return;
758 732 case 0xf007: /* fmov {F,D,X}Rn,@(R0,Rn) - FPSCR: Nothing */
759   - if (ctx->fpscr & FPSCR_PR) {
760   - gen_op_fmov_drN_DT0(XREG(B7_4));
761   - gen_op_movl_rN_T1(REG(B11_8));
762   - gen_op_add_rN_T1(REG(0));
763   - gen_op_stfq_DT0_T1(ctx);
764   - } else if (ctx->fpscr & FPSCR_SZ) {
  733 + if (ctx->fpscr & FPSCR_SZ) {
765 734 if (ctx->opcode & 0x0010)
766 735 break; /* illegal instruction */
767 736 gen_op_fmov_drN_DT0(DREG(B7_4));
... ...