]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target-alpha: Forget installed round mode after MT_FPCR
authorRichard Henderson <rth@twiddle.net>
Sat, 28 Jun 2014 17:25:36 +0000 (10:25 -0700)
committerRichard Henderson <rth@twiddle.net>
Mon, 18 May 2015 20:03:46 +0000 (13:03 -0700)
When we use QUAL_RM_D, we copy fpcr_dyn_round to float_status.
When we install a new FPCR value, we update fpcr_dyn_round.
Reset the status of the cache so that we re-copy for the next
fp insn that requires dynamic rounding.

Signed-off-by: Richard Henderson <rth@twiddle.net>
target-alpha/translate.c

index b3c5dca42591a5df824f1662d9f1dc2ab27054d7..94dab26b569ee7b5ec3a7a652dc7da762f7d0b90 100644 (file)
@@ -2199,6 +2199,11 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
             /* MT_FPCR */
             va = load_fpr(ctx, ra);
             gen_helper_store_fpcr(cpu_env, va);
+            if (ctx->tb_rm == QUAL_RM_D) {
+                /* Re-do the copy of the rounding mode to fp_status
+                   the next time we use dynamic rounding.  */
+                ctx->tb_rm = -1;
+            }
             break;
         case 0x025:
             /* MF_FPCR */