From patchwork Tue May 12 17:39:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 471464 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 161DA140D2F for ; Wed, 13 May 2015 03:45:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Q75M4zwo; dkim-atps=neutral Received: from localhost ([::1]:44251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsEEy-0007Mc-0o for incoming@patchwork.ozlabs.org; Tue, 12 May 2015 13:45:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsEAV-0007aE-D0 for qemu-devel@nongnu.org; Tue, 12 May 2015 13:40:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsEAP-0007fG-Rh for qemu-devel@nongnu.org; Tue, 12 May 2015 13:40:35 -0400 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]:34528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsEAP-0007et-3s for qemu-devel@nongnu.org; Tue, 12 May 2015 13:40:29 -0400 Received: by qkgx75 with SMTP id x75so10908207qkg.1 for ; Tue, 12 May 2015 10:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=UGlpkjfVWLJJON0w5NSO4EGxeUaUud4GsuR/rKscuz8=; b=Q75M4zwo410xm2Y7sV8v3DNW7KxTvGeIywRnIgy7SOX234t6LRiIM3B9F8YvZnznMl NapeGdM853V9yuzjsYSz6pC05DBGgOYiGpuuqDw+ns/h/OftqP1SKsiFQl38WNlrzFqX 4ANd2d/HwBCHrB0eFPxet+w/TF53WVvYi2DyKomiBxI7+hKm+BFbAgWQm1nwcKLApIq8 /H24Q95T3vMuP3YTi3tnukQMk6F7MynG3nbbIhGRKfIv6KX0oG3N+90EzcENSWzdh2V7 5Rcmu7GkjwJZWIxF3hyn/ht55Ye+Ppxc8nveTkjwJx2BKcoCKhJe9mwp6/7TwJ8jLSGA 9zDg== X-Received: by 10.229.130.71 with SMTP id r7mr22465093qcs.13.1431452428765; Tue, 12 May 2015 10:40:28 -0700 (PDT) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id f4sm13701736qhe.9.2015.05.12.10.40.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 10:40:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 12 May 2015 10:39:33 -0700 Message-Id: <1431452387-20280-4-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1431452387-20280-1-git-send-email-rth@twiddle.net> References: <1431452387-20280-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c09::235 Subject: [Qemu-devel] [PATCH v2 03/17] target-alpha: Forget installed round mode after MT_FPCR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- target-alpha/translate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index b3c5dca..94dab26 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -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 */