From patchwork Fri Dec 11 21:21:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 40938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 25F2AB70BA for ; Sat, 12 Dec 2009 12:33:52 +1100 (EST) Received: from localhost ([127.0.0.1]:58096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJGrl-0005o8-P6 for incoming@patchwork.ozlabs.org; Fri, 11 Dec 2009 20:33:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJGhu-0007pi-6Q for qemu-devel@nongnu.org; Fri, 11 Dec 2009 20:23:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJGhq-0007nI-0K for qemu-devel@nongnu.org; Fri, 11 Dec 2009 20:23:35 -0500 Received: from [199.232.76.173] (port=54746 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJGhp-0007m9-C4 for qemu-devel@nongnu.org; Fri, 11 Dec 2009 20:23:33 -0500 Received: from are.twiddle.net ([75.149.56.221]:43443) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJGho-00036K-1w for qemu-devel@nongnu.org; Fri, 11 Dec 2009 20:23:32 -0500 Received: by are.twiddle.net (Postfix, from userid 5000) id B9F65CAD; Fri, 11 Dec 2009 17:23:30 -0800 (PST) Message-Id: In-Reply-To: References: From: Richard Henderson Date: Fri, 11 Dec 2009 13:21:02 -0800 To: qemu-devel@nongnu.org MIME-Version: 1.0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 11/13] alpha: Fix FMOV. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Properly handle move from the zero register. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index d361ffe..3773ab4 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -1834,12 +1834,16 @@ static inline int translate_one(DisasContext *ctx, uint32_t insn) break; case 0x020: if (likely(rc != 31)) { - if (ra == rb) + if (ra == rb) { /* FMOV */ - tcg_gen_mov_i64(cpu_fir[rc], cpu_fir[ra]); - else + if (ra == 31) + tcg_gen_movi_i64(cpu_fir[rc], 0); + else + tcg_gen_mov_i64(cpu_fir[rc], cpu_fir[ra]); + } else { /* CPYS */ gen_fcpys(ra, rb, rc); + } } break; case 0x021: