From patchwork Tue Dec 18 06:38:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1015064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="cLtTlB0C"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43JpfF0ZPmz9s3Z for ; Tue, 18 Dec 2018 17:54:13 +1100 (AEDT) Received: from localhost ([::1]:52098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ9Gc-0004Yw-GO for incoming@patchwork.ozlabs.org; Tue, 18 Dec 2018 01:54:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ92v-0001fe-Tk for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:40:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZ92r-0002rA-FJ for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:40:01 -0500 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:38630) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZ92q-0002Sl-Ow for qemu-devel@nongnu.org; Tue, 18 Dec 2018 01:39:56 -0500 Received: by mail-pg1-x544.google.com with SMTP id g189so7344221pgc.5 for ; Mon, 17 Dec 2018 22:39:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Blx++t/+8e3x4h5xs8nsjg1AqfkSW8Uuocvlldz1kUI=; b=cLtTlB0CvAUUS72krce0w4NNUya1lAPXlJLtoW792F2B61JyTqN6+XPtt4xYL1TzcC OETD2sgJkfOWEPCcbqV5938zccEnUfkDtA8PfqFh6E7jAOsjrDvMWkG4nZKn1CSDDuoq eh08q7ngsed59V5J38oqcUpc/zAlFqJSkwhXs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Blx++t/+8e3x4h5xs8nsjg1AqfkSW8Uuocvlldz1kUI=; b=c8ysZh1ef8pxsd/rPcCpAFKnmo9XyfgPjcsymspzhnJUcZUkDX0YUoBL4Ko/FR3CC5 AR9Sm1HYsGbV7Szp3Jk1yxHOl6lUAlFR8RApJdKf4k7czTR0JCSU0N3A6CumRA1sG2nz xVP5tQK62d+5OKCzsWgM85PYRyLLMwoGJMGKsRNerhsQLb5xYMtAFVJgtZtwhCHcCqwq rXFYvLXT7kL1NYPriZojmGNc9ubmrO1qqCcx062U4y15eF4MHWIiN6+hVRAtPwW9bbx1 FDqzyL6FwdbAxEYeZAv9oQof8jcQeDb7hj+VpOOWgOSooIw9X7f3SK1r9CDb/sgZL/TZ tRug== X-Gm-Message-State: AA+aEWbf+6BF8dbjF9Z5opViXJ+eaH0sYij+E+sk7F110k0zOip3Vffv B6pqem1NqdUY6O97AUQzsz2eIn22pQI= X-Google-Smtp-Source: AFSGD/VJZQ8rCtlvB56vKGsUdtWGann8hoq2RYvQ25YdrLaubRUMGYOl/y8q38K7c8mO+jBeTZg2Ew== X-Received: by 2002:a63:f412:: with SMTP id g18mr11647641pgi.262.1545115181944; Mon, 17 Dec 2018 22:39:41 -0800 (PST) Received: from cloudburst.twiddle.net (97-126-115-157.tukw.qwest.net. [97.126.115.157]) by smtp.gmail.com with ESMTPSA id c7sm27072509pfh.18.2018.12.17.22.39.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Dec 2018 22:39:41 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 17 Dec 2018 22:38:58 -0800 Message-Id: <20181218063911.2112-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181218063911.2112-1-richard.henderson@linaro.org> References: <20181218063911.2112-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH 21/34] target/ppc: nand, nor, eqv are now generic vector operations X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, mark.cave-ayland@ilande.co.uk, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/translate/vmx-impl.inc.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/target/ppc/translate/vmx-impl.inc.c b/target/ppc/translate/vmx-impl.inc.c index 529ae0e5f5..329131d30b 100644 --- a/target/ppc/translate/vmx-impl.inc.c +++ b/target/ppc/translate/vmx-impl.inc.c @@ -277,34 +277,14 @@ static void glue(gen_, name)(DisasContext *ctx) \ 16, 16); \ } -#define GEN_VXFORM_VN(name, vece, tcg_op, opc2, opc3) \ -static void glue(gen_, name)(DisasContext *ctx) \ -{ \ - if (unlikely(!ctx->altivec_enabled)) { \ - gen_exception(ctx, POWERPC_EXCP_VPU); \ - return; \ - } \ - \ - tcg_op(vece, \ - avr64_offset(rD(ctx->opcode), true), \ - avr64_offset(rA(ctx->opcode), true), \ - avr64_offset(rB(ctx->opcode), true), \ - 16, 16); \ - \ - tcg_gen_gvec_not(vece, \ - avr64_offset(rD(ctx->opcode), true), \ - avr64_offset(rD(ctx->opcode), true), \ - 16, 16); \ -} - /* Logical operations */ GEN_VXFORM_V(vand, MO_64, tcg_gen_gvec_and, 2, 16); GEN_VXFORM_V(vandc, MO_64, tcg_gen_gvec_andc, 2, 17); GEN_VXFORM_V(vor, MO_64, tcg_gen_gvec_or, 2, 18); GEN_VXFORM_V(vxor, MO_64, tcg_gen_gvec_xor, 2, 19); -GEN_VXFORM_VN(vnor, MO_64, tcg_gen_gvec_or, 2, 20); -GEN_VXFORM_VN(veqv, MO_64, tcg_gen_gvec_xor, 2, 26); -GEN_VXFORM_VN(vnand, MO_64, tcg_gen_gvec_and, 2, 22); +GEN_VXFORM_V(vnor, MO_64, tcg_gen_gvec_nor, 2, 20); +GEN_VXFORM_V(veqv, MO_64, tcg_gen_gvec_eqv, 2, 26); +GEN_VXFORM_V(vnand, MO_64, tcg_gen_gvec_nand, 2, 22); GEN_VXFORM_V(vorc, MO_64, tcg_gen_gvec_orc, 2, 21); #define GEN_VXFORM(name, opc2, opc3) \