From patchwork Thu Apr 17 19:33:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 340043 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6848C140089 for ; Fri, 18 Apr 2014 05:51:52 +1000 (EST) Received: from localhost ([::1]:34796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WasLe-0008Mc-8q for incoming@patchwork.ozlabs.org; Thu, 17 Apr 2014 15:51:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Was55-0001w5-IL for qemu-devel@nongnu.org; Thu, 17 Apr 2014 15:34:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Was4z-0002Wg-Am for qemu-devel@nongnu.org; Thu, 17 Apr 2014 15:34:43 -0400 Received: from mail-qa0-x231.google.com ([2607:f8b0:400d:c00::231]:59527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Was4z-0002WW-7S for qemu-devel@nongnu.org; Thu, 17 Apr 2014 15:34:37 -0400 Received: by mail-qa0-f49.google.com with SMTP id j7so791661qaq.36 for ; Thu, 17 Apr 2014 12:34:36 -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=kUbYpz6g8/OSEYJlKu6/yvzFtULhapueZh5XKTudjRw=; b=Ud/bvUOh+IU5IsjkGLmVZODuS7ZTQw9UltG3asHXjNHoV/GsmluA+QpYmYr4WytROa X2Ou5Z2celZF7npyGn8xA/KWMZJpQQYJBxdfM2XRRBgt6hLoEJ4HOUCOnMVLuXdJ6Uu7 sXjOj1nNIBnYeKTh2814Mba2tLKW1taKidszUrmx5+FhYLgRBmNXcGggpVUkalonmfzN D9YQHwnk1dVa2M1DD9tUoylfJrXPqeSRGHlCv0rdI8sY7O8/blI/TNOOQZzQopXDxBcw HEy8SmUPH7bt/xdXuL8++VIx+UuGSlkfVaBwT1uuArBidxP9tx/j+Dm6UeN4oeDaOvVs xKHA== X-Received: by 10.224.124.129 with SMTP id u1mr5450432qar.95.1397763276917; Thu, 17 Apr 2014 12:34:36 -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 b62sm2694452qge.2.2014.04.17.12.34.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2014 12:34:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 17 Apr 2014 12:33:06 -0700 Message-Id: <1397763195-1485-32-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1397763195-1485-1-git-send-email-rth@twiddle.net> References: <1397763195-1485-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:c00::231 Subject: [Qemu-devel] [PATCH 31/40] target-alpha: Convert gen_bcond to source/sink 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 Signed-off-by: Richard Henderson --- target-alpha/translate.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index ec5b523..31136f9 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -497,15 +497,11 @@ static ExitStatus gen_bcond(DisasContext *ctx, TCGCond cond, int ra, { TCGv cmp_tmp; - if (unlikely(ra == 31)) { - cmp_tmp = tcg_const_i64(0); - } else { + if (mask) { cmp_tmp = tcg_temp_new(); - if (mask) { - tcg_gen_andi_i64(cmp_tmp, cpu_ir[ra], 1); - } else { - tcg_gen_mov_i64(cmp_tmp, cpu_ir[ra]); - } + tcg_gen_andi_i64(cmp_tmp, load_gpr(ctx, ra), 1); + } else { + cmp_tmp = load_gpr(ctx, ra); } return gen_bcond_internal(ctx, cond, cmp_tmp, disp); @@ -546,16 +542,8 @@ static void gen_fold_mzero(TCGCond cond, TCGv dest, TCGv src) static ExitStatus gen_fbcond(DisasContext *ctx, TCGCond cond, int ra, int32_t disp) { - TCGv cmp_tmp; - - if (unlikely(ra == 31)) { - /* Very uncommon case, but easier to optimize it to an integer - comparison than continuing with the floating point comparison. */ - return gen_bcond(ctx, cond, ra, disp, 0); - } - - cmp_tmp = tcg_temp_new(); - gen_fold_mzero(cond, cmp_tmp, cpu_fir[ra]); + TCGv cmp_tmp = tcg_temp_new(); + gen_fold_mzero(cond, cmp_tmp, load_fpr(ctx, ra)); return gen_bcond_internal(ctx, cond, cmp_tmp, disp); }