From patchwork Sun Oct 13 22:25:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 176093 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3790252ill; Sun, 13 Oct 2019 15:37:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqySl4qmrZpjQhqBP+0yH1ZSHJSMt/YmGP4nzvfy0ruLhNu8sJDvFgz5GTSgN03Mf5OVnylx X-Received: by 2002:a17:906:2cd2:: with SMTP id r18mr25724745ejr.282.1571006271445; Sun, 13 Oct 2019 15:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571006271; cv=none; d=google.com; s=arc-20160816; b=m9CMcF8wQrzfKoIiZvhd7u9+EVYBPQObiP0hc+A9EO3C0YYjbkknH6P1F2Kzybn7t3 tRD9dmCIInlNEK1+MCJCzoR4033HGVXvT5rCbIqaIPHmEV3UFSRJD5N6chJxwJueumre W4nk5U4BDwjxGvMLyBFp0xUk33ZEQQMpIjIdyJ9Q6Ge7U9oFiUoM+a/mDWuEGrQRrUto Z9hyKeocg1hsiQiP1LiaZku8Mu2IvrW8RUXe8WTozdRPgWmlg48uZp0e/IldBnNmPlgN OYQrIBzdT/OkHUWwrXG8vsDWGG/KjMSszUFILKIylMjfrv7Ab/r+yXK91XlvBSTEhORP wZoA== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=po6eZ+VU9o59N8b7iUQ3oHFe6Xwg+QTX5CS1/tMvGQs=; b=cxSwd9l5lCAr+HPT6GB1QYCuMlXW17fZ3STowyoBv7jrpdBN2UMnjzHV4LMziJXnI/ UJAli6FvUsNZx6qy3oRQ9dcGI1Dwxn71KKyZjB56esUlJq0KRcAOSkTaELJX7fMoQ2un yNspy2MV1EaeJ+vyfw5Ghqa3SBPmUu39SWRpeOZ7kBevsOfQVULg1MqJ/A5T8JtAZboT haChYLAYEnZhwQFoqSTT+zyfDb/B1oyake1fB1u8YmlK8jua/iZFFAblQy9uJPPMA+dX XWQ9Qj8eW4XaxNVU1AnsVJGBRw46Ma1ZHJ3DIC2313ZHv6G4wIopWnayXbFl0qL80EVF gMlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vD5gI1Fm; 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 sa23si9945420ejb.289.2019.10.13.15.37.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 Oct 2019 15:37:51 -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=vD5gI1Fm; 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]:43226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJmUn-0001nY-Bp for patch@linaro.org; Sun, 13 Oct 2019 18:37:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51358) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJmJa-000748-O3 for qemu-devel@nongnu.org; Sun, 13 Oct 2019 18:26:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJmJZ-000139-Au for qemu-devel@nongnu.org; Sun, 13 Oct 2019 18:26:14 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:33518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJmJX-00012G-ES for qemu-devel@nongnu.org; Sun, 13 Oct 2019 18:26:13 -0400 Received: by mail-pf1-x442.google.com with SMTP id q10so9277711pfl.0 for ; Sun, 13 Oct 2019 15:26:11 -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; bh=po6eZ+VU9o59N8b7iUQ3oHFe6Xwg+QTX5CS1/tMvGQs=; b=vD5gI1FmGd3z48X8mSvtFpCIdCVc+rb95WdSbbNw18IxiyK6/w//UpruEpQld/ugq2 z/Dbd1QA+hXm8nCb4w2jHmMxCLkQxZ9+syUgQQ7J4QJPgNQldmZ0R2/rhY4hg0Ansu/8 ZuzDRcQ0qrUGM24m5a9rC1XW1eVpWYnvXs2Xyb9rBY1iASoZMg2v+AOzJH8R90O582n5 SocJEBy3bOBrt/cy5Upk8TzfR5vRvHUCm7gCfrlmsgOtiLnL02qF1duLxDl8l4nFQN3U nniwxUJfDyyUumj+JnCE8KTlE0VTcWi69u3kz/zknm7m93rocQGSBrQ2h/gnhcNAlfrO 5MoA== 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=po6eZ+VU9o59N8b7iUQ3oHFe6Xwg+QTX5CS1/tMvGQs=; b=H9MFpATsAKn9fUgauJ00fhVUyD5uLduPGmOLUNCbVxKHT851+Ki40yWr5YtCk8KfBQ YBcFnMTQyhmKypaK8U7FI4nUMAGLLNCJlyu1mgjZ3w1GCZNIuhmU49O14VoLoxsb9gS/ irStEdtwwFPyMXb7tAwINUGbDdZxg+AL7/a/gGPUlYinB6qL/Vc22HcQwn10vPAvzREV coOD6Z7dRlCxOq+Dceh3nj6pLO4sjCT0THIXfByBVjcHKHDUmRL/xSRGt5TzT8eu+9ZP jti+ZLqi6CoDp/pNAZ212V0LLr363PrDDwSl2J1/F6y7nqXHeWrJZseikAJGMXN1KaJl yC8Q== X-Gm-Message-State: APjAAAXpglSM5sh9EY6b650gQqcP8NiRsK2mztEVQr6TDPzKIH2k8sKC yEqNaIsZbkwe3WLYU2DBqrl7YMSHcEI= X-Received: by 2002:a63:ad0d:: with SMTP id g13mr1880886pgf.407.1571005570036; Sun, 13 Oct 2019 15:26:10 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id d76sm15940571pfd.185.2019.10.13.15.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Oct 2019 15:26:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 18/23] tcg/ppc: Update vector support for v2.07 VSX Date: Sun, 13 Oct 2019 15:25:39 -0700 Message-Id: <20191013222544.3679-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191013222544.3679-1-richard.henderson@linaro.org> References: <20191013222544.3679-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::442 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These new instructions are conditional only on MSR.VSX and are thus part of the VSX instruction set, and not Altivec. This includes double-word loads and stores. Reviewed-by: Aleksandar Markovic Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.inc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.17.1 diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index bc3a669cb4..6321e0767f 100644 --- a/tcg/ppc/tcg-target.inc.c +++ b/tcg/ppc/tcg-target.inc.c @@ -470,10 +470,12 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type, #define LVEWX XO31(71) #define LXSDX (XO31(588) | 1) /* v2.06, force tx=1 */ #define LXVDSX (XO31(332) | 1) /* v2.06, force tx=1 */ +#define LXSIWZX (XO31(12) | 1) /* v2.07, force tx=1 */ #define STVX XO31(231) #define STVEWX XO31(199) #define STXSDX (XO31(716) | 1) /* v2.06, force sx=1 */ +#define STXSIWX (XO31(140) | 1) /* v2.07, force sx=1 */ #define VADDSBS VX4(768) #define VADDUBS VX4(512) @@ -1156,6 +1158,10 @@ static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, tcg_out_mem_long(s, LWZ, LWZX, ret, base, offset); break; } + if (have_isa_2_07 && have_vsx) { + tcg_out_mem_long(s, 0, LXSIWZX, ret, base, offset); + break; + } tcg_debug_assert((offset & 3) == 0); tcg_out_mem_long(s, 0, LVEWX, ret, base, offset); shift = (offset - 4) & 0xc; @@ -1203,6 +1209,11 @@ static void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, tcg_out_mem_long(s, STW, STWX, arg, base, offset); break; } + if (have_isa_2_07 && have_vsx) { + tcg_out_mem_long(s, 0, STXSIWX, arg, base, offset); + break; + } + assert((offset & 3) == 0); tcg_debug_assert((offset & 3) == 0); shift = (offset - 4) & 0xc; if (shift) {