From patchwork Sat Apr 20 07:34:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 162557 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp300368jan; Sat, 20 Apr 2019 00:40:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEX2T2cuoTDMvbuWPhgZUQL/R/UhQjCx/vW0Nz3rRa3BwmKBde7whqhRlmO96V6aULIk/4 X-Received: by 2002:a5d:5284:: with SMTP id c4mr5569192wrv.281.1555746038835; Sat, 20 Apr 2019 00:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555746038; cv=none; d=google.com; s=arc-20160816; b=H/ZPsQaIazeg2mS7yFhK962qmvCkmRIkQCiKurziE6bkgrFb8khy8x9pZbWsna+PWr qDGKqhkrghNjxcGwQM9ZLPFxQH1BEjheE05BHmzvbB8pwxPsKzL/Ud5fwNQqIZ1RpNtq jrpISTRPMtIqVS76oPLROkVJLo3HS22V2hBm3uZaZXH41kuxTEQ82ehHRm5NbOZwD2MU rHM1w7GBx4wGNCOpaQQnnSoXkgo9M6nAABrpPr8jFaipkRkIIAA1WPeRfm8Sdjl6vV/Y 1pfdvDEnILFs50bJ3K7LsAwj+stNqo3+41UNzFs77zJhxilHmduGknMUKeqLo9FVEsrG cwJg== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=ZZYr6QJr2rUipHfB54gIFVWp7UFMrAAprd2zd5BHTXI=; b=UJ4UO7IxzXcQnPt30l1WNX/D75Tt/X89OY4vi2LF8prO+LBrlawMbjjl0jydulbvg/ XZy5O9mi/AW1kcg85ITIUapUFTDVUEcGG01U9jHsGfb3BLvC7NWl/l8OCivJc/GIDjxz zXTylkNigsSxxFHC31oRLYQF22L8yEPAwjWuQ2JB3aw0eE9SDa2nWS5Jn3w1i1i+fGMQ qeT5fDe/g9ofq8yABEcAhT8dKjniEw6w62YEbq6Moy55Qd2u8dj/7cqt4cKik5y/Wykb muvB+4G+8LiLXQtHdMB5NXvln31usZHoheq5WGetAZcLFCB3JPNQQp5jYhO+8Fxi6iIE 6w2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Z0NxmqD6; 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=fail (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 j6si5162659wme.111.2019.04.20.00.40.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 20 Apr 2019 00:40:38 -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=fail header.i=@linaro.org header.s=google header.b=Z0NxmqD6; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:38150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHkc1-00052u-MV for patch@linaro.org; Sat, 20 Apr 2019 03:40:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHkWa-0008Sh-W4 for qemu-devel@nongnu.org; Sat, 20 Apr 2019 03:35:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHkWa-0007tf-00 for qemu-devel@nongnu.org; Sat, 20 Apr 2019 03:35:00 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:35514) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHkWZ-0007tJ-Qa for qemu-devel@nongnu.org; Sat, 20 Apr 2019 03:34:59 -0400 Received: by mail-pg1-x544.google.com with SMTP id g8so3601647pgf.2 for ; Sat, 20 Apr 2019 00:34:59 -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=ZZYr6QJr2rUipHfB54gIFVWp7UFMrAAprd2zd5BHTXI=; b=Z0NxmqD6VG5KXqTJ8B5iyjXs4h3dlY11z9YNVik5iJZ8vdHY0SOnePGvoqRFdcdSCs p5IFzWFmitcm6K1mmCLPQ81Ol0vTOkAkadVydY//pt26mlGOMfjo2lljEZsDn8duYQ05 tPq532T8STQLuzLPsXiHRw4nG6VgysGJvQ3lHIPx88Ww3guEjH64LcqeOfEaNWt7G2nG nSZVqB6bsE9MMjFqojZ/NVi1BXZhKBzopbzAx3ZyonWGmbEjgvqg9xLA4aSHXBumlBQQ rFv4AF4XTwwbutRIAnweKxDS6RFRWiCBgc+BTOch0jQkzbbmyQiwz6r+8c+vd3owZ+ul fO5A== 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=ZZYr6QJr2rUipHfB54gIFVWp7UFMrAAprd2zd5BHTXI=; b=i+t2KDvRVulOutwlzDawxafBlzKr7GQv3ZJj0GNcJm2qTTyr4a7JzTCvN2psBZ/tub FN629pd9tsr3i4pmmOAEjmzHkWFmyle82/9CsX2bcHUnT6/hhzCZJBgI1IF8D9pr5532 8vooS+0KOZTky5jdNX1UWzyQN+Dty3E5cluHH+VVH6fj+FSiqnsAg98iICGHGeBG1wmY 83d538nkgYeeLZi3FUqbXCa0PpIRPMuJCEO18WqSs86tdm6VvdrISqxPc1443DBEvsnf znAgi0/RUDXfv+GarXBPzJ5IKW6JKT2b0cLMLNkQMyD8sLvJjP7d9JEAh621fPvbc9jc tXPQ== X-Gm-Message-State: APjAAAWvdqBUCblr4Co3phmCLbYZOoWgKf2MzOL+rO7tKliaSFuYNkBG BvIp/BcUXiOFcdUu3tOGYKPt/EvwpxQ= X-Received: by 2002:a62:1b8a:: with SMTP id b132mr8381430pfb.19.1555745698634; Sat, 20 Apr 2019 00:34:58 -0700 (PDT) Received: from localhost.localdomain (rrcs-66-91-136-155.west.biz.rr.com. [66.91.136.155]) by smtp.gmail.com with ESMTPSA id z22sm7025492pgv.23.2019.04.20.00.34.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Apr 2019 00:34:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 19 Apr 2019 21:34:12 -1000 Message-Id: <20190420073442.7488-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190420073442.7488-1-richard.henderson@linaro.org> References: <20190420073442.7488-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 08/38] tcg: Add tcg_out_dupm_vec to the backend interface 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: david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Currently stubbed out in all backends that support vectors. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 6 ++++++ tcg/i386/tcg-target.inc.c | 7 +++++++ tcg/tcg.c | 19 ++++++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index b272822969..3f95930e88 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc.c @@ -822,6 +822,12 @@ static bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, return true; } +static bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece, + TCGReg r, TCGReg base, intptr_t offset) +{ + return false; +} + static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd, tcg_target_long value) { diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index 49691c4f56..0be7d8f589 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -891,6 +891,13 @@ static bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, return true; } +static bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece, + TCGReg r, TCGReg base, intptr_t offset) +{ + return false; +} + + static void tcg_out_dupi_vec(TCGContext *s, TCGType type, TCGReg ret, tcg_target_long arg) { diff --git a/tcg/tcg.c b/tcg/tcg.c index 55498b63d7..1c34c08791 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -110,6 +110,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, #if TCG_TARGET_MAYBE_vec static bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, TCGReg dst, TCGReg src); +static bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece, + TCGReg dst, TCGReg base, intptr_t offset); static void tcg_out_dupi_vec(TCGContext *s, TCGType type, TCGReg dst, tcg_target_long arg); static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, unsigned vecl, @@ -121,6 +123,11 @@ static inline bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, { g_assert_not_reached(); } +static inline bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece, + TCGReg dst, TCGReg base, intptr_t offset) +{ + g_assert_not_reached(); +} static inline void tcg_out_dupi_vec(TCGContext *s, TCGType type, TCGReg dst, tcg_target_long arg) { @@ -3416,6 +3423,7 @@ static void tcg_reg_alloc_dup(TCGContext *s, const TCGOp *op) TCGRegSet dup_out_regs, dup_in_regs; TCGTemp *its, *ots; TCGType itype, vtype; + intptr_t endian_fixup; unsigned vece; bool ok; @@ -3485,7 +3493,16 @@ static void tcg_reg_alloc_dup(TCGContext *s, const TCGOp *op) /* fall through */ case TEMP_VAL_MEM: - /* TODO: dup from memory */ +#ifdef HOST_WORDS_BIGENDIAN + endian_fixup = itype == TCG_TYPE_I32 ? 4 : 8; + endian_fixup -= 1 << vece; +#else + endian_fixup = 0; +#endif + if (tcg_out_dupm_vec(s, vtype, vece, ots->reg, its->mem_base->reg, + its->mem_offset + endian_fixup)) { + goto done; + } tcg_out_ld(s, itype, ots->reg, its->mem_base->reg, its->mem_offset); break;