From patchwork Tue Jun 2 17:01:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187389 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4148352ilb; Tue, 2 Jun 2020 10:07:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpy+ymWWvyQ6F2yqJWlCnf7QWuXDrpl2TObil3+AxMvoGKlp6TL+M/xkTWeT7TnYXv0hyq X-Received: by 2002:a25:b792:: with SMTP id n18mr46201162ybh.348.1591117651141; Tue, 02 Jun 2020 10:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591117651; cv=none; d=google.com; s=arc-20160816; b=Tx08t/EQ/wR0o2RAwuQexTYvsGqc7rO50eGE+DsMEB80jD/oyNA3Nm1oulFNpvOnuQ WYI/fv1dROfupIY8XoCsBSyqltDtquvLS7POJP4UqOQAqeL52uJNgdanT1Ff2E93P45m zBocToqsd5dxoXMoCcCpTim+LpE+7YhEm+JDAq2gW88ByrGbQ/IBqFtr3un2K2Z7tJ5T VZjfb7s5ocyZBiErnlIigItkCIjU+kRyRCUAy4soJkXmHMLOMwh4cgRRcKmjZwzZUy7J 3vGd4r0xNKKXWO5yAii8ChhyvO5Cp7WnWl0qFnr8EJ64BwI2QhBAP3E7dL04nm34kTpT aF5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=P9h5TBP5WOCBKRHaXQjwNWHN1Wi1jSCendyQQuP2OXQ=; b=kGIFi92rL+CXWV0CXnixz66q7OXhz5V8a73ttx8RXRTCseTsZcBOZ/YQCyw76jge4Q T0TgWvNpYC9hEckz2mD7J6vlbqQUJIx9PiGJ89BnoGDmOuH1CONmxispLLrpjaz3ehqs Bv1BbeDAdeGrx+lRop+z5sIBRWentrK8BwPAXVIhGk/DFbvtE6ReI9JohbogPvdOhVna uEpZ9UfDcACnIHAPWnPd6aaoHlBT0QMWvTEjeEdGGUbf1E+2y1lXYFMddFlmOJkJffxz +E15UgHZa2y+IzDS+IzwURigpNlrdRw4jEPFa9l5hqxyg+9yn4fybODZmMnFCx5jPRe7 e+Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AWwripP2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v10si2389863ybp.34.2020.06.02.10.07.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 10:07:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AWwripP2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgANu-0007Bb-Ic for patch@linaro.org; Tue, 02 Jun 2020 13:07:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgAIh-0005pX-Fl for qemu-devel@nongnu.org; Tue, 02 Jun 2020 13:02:07 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:47015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgAIg-0007Qo-CI for qemu-devel@nongnu.org; Tue, 02 Jun 2020 13:02:07 -0400 Received: by mail-pl1-x62b.google.com with SMTP id n2so1562091pld.13 for ; Tue, 02 Jun 2020 10:02:05 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=P9h5TBP5WOCBKRHaXQjwNWHN1Wi1jSCendyQQuP2OXQ=; b=AWwripP2uew25jcpCAwg5gJKHfGBL7kGuv8QztR8MCcuT3QUvu5G2QzDfOvPT55z+6 2K4j/Zus2l6rVUP/nwxaeN2lZ2W0xY7T3RXQlLcdH0Y4ShjPo/vyi4TuxfpZBg59tpeE 6b+IE8QnPG6cwZeA47gVbqfD6m7gRsJ8wA9zE7KEtffunuulc2S4OzO/mMUSgtDK/Als Lx6V2hjwWnmSxLAzz8h4kPy614wIreyw7zVfY/UjU4gwBpMIytPFKKja2gUkwBTKNMev Q1+8crvJOkclsI/DrA6zEjTthLdeEbjArEpdvECpzSRENLpEVthHHNhzFJqqN1WPOXhR xjgg== 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:mime-version:content-transfer-encoding; bh=P9h5TBP5WOCBKRHaXQjwNWHN1Wi1jSCendyQQuP2OXQ=; b=QjRJWaaPTDXmJoNPN4RJYVFMaOL3kgh8LG6H72UNdi+uZPWi6JCHprIdYe7kK3JjmM 0ZeXDDzsjyILtgmg9sFDDE/03O0qaw+D9NdXQWOWqxDFfAaneg5wYQ1Nxm5DDriWon80 V6YnDALwKVrbzlxvrHVOLXYMxmEU9QfqbOCtCj2FGv/XJ06tyTRhsm+Xw/4MCapVk1vy 3nqcP0kPVh8kE3hvezuho6UYKFCmL3YY/N8VwDzY5ayuSVH0UhSKuEINaJH+XP2Rt8Sj yYKh2FLfmgjEcbj81UnTCS+Jbf7gAfYb3/aZFRc3WU1HJ5c1xg5tFUGgmvXvvomVtPp6 UjXA== X-Gm-Message-State: AOAM530bOeXyECIR/ksK97UJY7InXcapaeNodHAK1XS50h1lW2ta8xrm XsLWAWF4fO/oXh1wkcxqmGMhH0fLKNY= X-Received: by 2002:a17:90a:64ce:: with SMTP id i14mr170177pjm.48.1591117324565; Tue, 02 Jun 2020 10:02:04 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id h11sm2723630pjk.20.2020.06.02.10.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 10:02:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 08/12] target/ppc: Use tcg_gen_gvec_rotlv Date: Tue, 2 Jun 2020 10:01:47 -0700 Message-Id: <20200602170151.321389-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200602170151.321389-1-richard.henderson@linaro.org> References: <20200602170151.321389-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Acked-by: David Gibson Signed-off-by: Richard Henderson --- target/ppc/helper.h | 4 ---- target/ppc/int_helper.c | 17 ----------------- target/ppc/translate/vmx-impl.inc.c | 8 ++++---- 3 files changed, 4 insertions(+), 25 deletions(-) -- 2.25.1 diff --git a/target/ppc/helper.h b/target/ppc/helper.h index 2dfa1c6942..90166cbabd 100644 --- a/target/ppc/helper.h +++ b/target/ppc/helper.h @@ -214,10 +214,6 @@ DEF_HELPER_3(vsubuqm, void, avr, avr, avr) DEF_HELPER_4(vsubecuq, void, avr, avr, avr, avr) DEF_HELPER_4(vsubeuqm, void, avr, avr, avr, avr) DEF_HELPER_3(vsubcuq, void, avr, avr, avr) -DEF_HELPER_3(vrlb, void, avr, avr, avr) -DEF_HELPER_3(vrlh, void, avr, avr, avr) -DEF_HELPER_3(vrlw, void, avr, avr, avr) -DEF_HELPER_3(vrld, void, avr, avr, avr) DEF_HELPER_4(vsldoi, void, avr, avr, avr, i32) DEF_HELPER_3(vextractub, void, avr, avr, i32) DEF_HELPER_3(vextractuh, void, avr, avr, i32) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index be53cd6f68..d8bd3c234a 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -1348,23 +1348,6 @@ VRFI(p, float_round_up) VRFI(z, float_round_to_zero) #undef VRFI -#define VROTATE(suffix, element, mask) \ - void helper_vrl##suffix(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ - { \ - int i; \ - \ - for (i = 0; i < ARRAY_SIZE(r->element); i++) { \ - unsigned int shift = b->element[i] & mask; \ - r->element[i] = (a->element[i] << shift) | \ - (a->element[i] >> (sizeof(a->element[0]) * 8 - shift)); \ - } \ - } -VROTATE(b, u8, 0x7) -VROTATE(h, u16, 0xF) -VROTATE(w, u32, 0x1F) -VROTATE(d, u64, 0x3F) -#undef VROTATE - void helper_vrsqrtefp(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) { int i; diff --git a/target/ppc/translate/vmx-impl.inc.c b/target/ppc/translate/vmx-impl.inc.c index 403ed3a01c..de2fd136ff 100644 --- a/target/ppc/translate/vmx-impl.inc.c +++ b/target/ppc/translate/vmx-impl.inc.c @@ -900,13 +900,13 @@ GEN_VXFORM3(vsubeuqm, 31, 0); GEN_VXFORM3(vsubecuq, 31, 0); GEN_VXFORM_DUAL(vsubeuqm, PPC_NONE, PPC2_ALTIVEC_207, \ vsubecuq, PPC_NONE, PPC2_ALTIVEC_207) -GEN_VXFORM(vrlb, 2, 0); -GEN_VXFORM(vrlh, 2, 1); -GEN_VXFORM(vrlw, 2, 2); +GEN_VXFORM_V(vrlb, MO_8, tcg_gen_gvec_rotlv, 2, 0); +GEN_VXFORM_V(vrlh, MO_16, tcg_gen_gvec_rotlv, 2, 1); +GEN_VXFORM_V(vrlw, MO_32, tcg_gen_gvec_rotlv, 2, 2); GEN_VXFORM(vrlwmi, 2, 2); GEN_VXFORM_DUAL(vrlw, PPC_ALTIVEC, PPC_NONE, \ vrlwmi, PPC_NONE, PPC2_ISA300) -GEN_VXFORM(vrld, 2, 3); +GEN_VXFORM_V(vrld, MO_64, tcg_gen_gvec_rotlv, 2, 3); GEN_VXFORM(vrldmi, 2, 3); GEN_VXFORM_DUAL(vrld, PPC_NONE, PPC2_ALTIVEC_207, \ vrldmi, PPC_NONE, PPC2_ISA300)