From patchwork Thu Apr 17 19:32:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 340034 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 81CEB140089 for ; Fri, 18 Apr 2014 05:44:09 +1000 (EST) Received: from localhost ([::1]:34708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WasEB-00066p-Be for incoming@patchwork.ozlabs.org; Thu, 17 Apr 2014 15:44:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Was4u-0001dR-K7 for qemu-devel@nongnu.org; Thu, 17 Apr 2014 15:34:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Was4o-0002Qt-99 for qemu-devel@nongnu.org; Thu, 17 Apr 2014 15:34:32 -0400 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:47803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Was4o-0002Qo-4z for qemu-devel@nongnu.org; Thu, 17 Apr 2014 15:34:26 -0400 Received: by mail-qc0-f179.google.com with SMTP id m20so916367qcx.10 for ; Thu, 17 Apr 2014 12:34:25 -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=QHXPiHEYRecknERrkyWei0+eK5ufHKDW1kaNAlEtVCs=; b=hDhXd9s229EO+AROG9dRpcf3ydhSLRMAZz1TWSgmj9UjrBFtd66W6TEtNxMrCE+BJr JEt3JRd00tPIJSVZqD0EXq500e3/57I1LdsiIEPcNAMn2qonUmV4HT0VLze6DpqAn+oY /f1NC4b4qQi+E8ig9bJcOVepuMUgf0YCVFGE+g7g5hI72UFsVUYREQRnq+rCeRWUBmO+ 8CT7JaQwoHfKn7uPe5qkplQEf16A7LM7Ux+rjUMT82rU9xMPwqph+rJfeT68TTgeSCs+ n7UZ6MgnSZdt1XrfwsN24HT+ifNZBOqDxWAi0KrdOtLR67YtsSyv2enQ1qhd+31taehn pLUg== X-Received: by 10.224.10.198 with SMTP id q6mr13399549qaq.65.1397763265775; Thu, 17 Apr 2014 12:34:25 -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.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2014 12:34:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 17 Apr 2014 12:32:59 -0700 Message-Id: <1397763195-1485-25-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:c01::233 Subject: [Qemu-devel] [PATCH 24/40] target-alpha: Convert gen_zap/not 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 | 41 +++++++++++------------------------------ 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 5e52674..cdece84 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -1169,38 +1169,11 @@ static void gen_zapnoti(TCGv dest, TCGv src, uint8_t lit) tcg_gen_mov_i64(dest, src); break; default: - tcg_gen_andi_i64 (dest, src, zapnot_mask (lit)); + tcg_gen_andi_i64(dest, src, zapnot_mask(lit)); break; } } -static inline void gen_zapnot(int ra, int rb, int rc, int islit, uint8_t lit) -{ - if (unlikely(rc == 31)) { - return; - } else if (unlikely(ra == 31)) { - tcg_gen_movi_i64(cpu_ir[rc], 0); - } else if (islit) { - gen_zapnoti(cpu_ir[rc], cpu_ir[ra], lit); - } else { - gen_helper_zapnot (cpu_ir[rc], cpu_ir[ra], cpu_ir[rb]); - } -} - -static inline void gen_zap(int ra, int rb, int rc, int islit, uint8_t lit) -{ - if (unlikely(rc == 31)) { - return; - } else if (unlikely(ra == 31)) { - tcg_gen_movi_i64(cpu_ir[rc], 0); - } else if (islit) { - gen_zapnoti(cpu_ir[rc], cpu_ir[ra], ~lit); - } else { - gen_helper_zap (cpu_ir[rc], cpu_ir[ra], cpu_ir[rb]); - } -} - - /* EXTWH, EXTLH, EXTQH */ static void gen_ext_h(DisasContext *ctx, TCGv vc, TCGv va, int rb, bool islit, uint8_t lit, uint8_t byte_mask) @@ -2111,11 +2084,19 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) break; case 0x30: /* ZAP */ - gen_zap(ra, rb, rc, islit, lit); + if (islit) { + gen_zapnoti(vc, va, ~lit); + } else { + gen_helper_zap(vc, va, load_gpr(ctx, rb)); + } break; case 0x31: /* ZAPNOT */ - gen_zapnot(ra, rb, rc, islit, lit); + if (islit) { + gen_zapnoti(vc, va, lit); + } else { + gen_helper_zapnot(vc, va, load_gpr(ctx, rb)); + } break; case 0x32: /* MSKQL */