From nobody Wed Feb 11 00:58:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553016607547385.2506262440097; Tue, 19 Mar 2019 10:30:07 -0700 (PDT) Received: from localhost ([127.0.0.1]:60756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6IYo-00021g-Ix for importer@patchew.org; Tue, 19 Mar 2019 13:29:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6IQu-0004gM-ER for qemu-devel@nongnu.org; Tue, 19 Mar 2019 13:21:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6IQr-0004b7-7p for qemu-devel@nongnu.org; Tue, 19 Mar 2019 13:21:46 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:45688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6IQq-0004a1-QL for qemu-devel@nongnu.org; Tue, 19 Mar 2019 13:21:45 -0400 Received: by mail-pf1-x443.google.com with SMTP id v21so14151274pfm.12 for ; Tue, 19 Mar 2019 10:21:44 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-188-82.tukw.qwest.net. [97.113.188.82]) by smtp.gmail.com with ESMTPSA id w68sm5616666pfb.176.2019.03.19.10.21.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 10:21:42 -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=HZlr0Ka3i6hHKffdk3asFuuDEwowOmfTN7aIJMdZHeA=; b=e5TDsfcsxtbFGKC5ZhfodPRwXiNO6oKcSIEVaEM0dlieRf41SdTvH49nT/dz3ZFUxH zh5+kL7HKwuJaRiZk6xgnHk+lO+U+A63FbGduoUMZ1mKMMt6Q2X1inYKoE3bbszaGPDp gxkXQsAWNR9A7ZbA0Tej+umRwVdKtZUagLAgqGiz7lsFuf3r6jz50Ctyi2EcO5pEfDll x2rk0izz2p4mz0HrnAs86KLaioaBllcsre7nStpn7RYQlzFb1ODHz1D/Pl/hn6fgxtzr hw7/vNh9AlqUybeLDetJlfLwaFpo1Oxm5vLYdW/uSunvveLfUEtu8UsdzRcZ9Da6EznQ elgQ== 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=HZlr0Ka3i6hHKffdk3asFuuDEwowOmfTN7aIJMdZHeA=; b=Z3EXwVDKxYPVQ01bZCWRnVf0goIfdcgVVUYxeOHg6ZIe93GLhZQpXabVG20/+6Hniq RDOrnpochXEz3KbUyDd/LBm7m8ba7jdc9dLnX/5f3ENcAd/pSUJ12uS4Ka9MFJ4CJMdE SVuh/WwoUIlruv5ULthnlf1Gchbhe01b2VQ2IxRsbqc7rsL03uccXexwOnfhadr7/pQi 1GMmB5Ji7CuNNZEqaVzVmSLGVAQFdFpQnt1hVH1NKggB5lTvqT/0onCCHg9ZW+uLwACf s2rowDHx9mbYvuk+F2E0vC8452c+NWFtoqHqJNxwinfX2qOaC6aGxhHFisABSBjJ+27m P2qA== X-Gm-Message-State: APjAAAW+lA6Gfp2zIcXN+bIwzI5Hn4i6NEa00v6tggVjmpQsqHiU/JBU 0noJx0GiwEKRnbE5Aaz1LHCgWJBao7M= X-Google-Smtp-Source: APXvYqy4We+ETbaIBfdt4ps2U5hPsta/Eg0vs8gVaKT9zFgvVDgvytj2EIYjz30U9LMA9+y/g7+KRA== X-Received: by 2002:a62:b286:: with SMTP id z6mr2988721pfl.106.1553016103425; Tue, 19 Mar 2019 10:21:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 19 Mar 2019 10:21:19 -0700 Message-Id: <20190319172126.7502-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190319172126.7502-1-richard.henderson@linaro.org> References: <20190319172126.7502-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::443 Subject: [Qemu-devel] [PATCH for-4.1 v3 10/17] tcg/aarch64: Implement tcg_out_dupm_vec 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: mark.cave-ayland@ilande.co.uk, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 38 ++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index b34a1e5b06..d32e83ddf2 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc.c @@ -381,6 +381,9 @@ typedef enum { I3207_BLR =3D 0xd63f0000, I3207_RET =3D 0xd65f0000, =20 + /* AdvSIMD load/store single structure. */ + I3303_LD1R =3D 0x0d40c000, + /* Load literal for loading the address at pc-relative offset */ I3305_LDR =3D 0x58000000, I3305_LDR_v64 =3D 0x5c000000, @@ -414,6 +417,8 @@ typedef enum { I3312_LDRVQ =3D 0x3c000000 | 3 << 22 | 0 << 30, I3312_STRVQ =3D 0x3c000000 | 2 << 22 | 0 << 30, =20 + + I3312_TO_I3310 =3D 0x00200800, I3312_TO_I3313 =3D 0x01000000, =20 @@ -566,7 +571,14 @@ static inline uint32_t tcg_in32(TCGContext *s) #define tcg_out_insn(S, FMT, OP, ...) \ glue(tcg_out_insn_,FMT)(S, glue(glue(glue(I,FMT),_),OP), ## __VA_ARGS_= _) =20 -static void tcg_out_insn_3305(TCGContext *s, AArch64Insn insn, int imm19, = TCGReg rt) +static void tcg_out_insn_3303(TCGContext *s, AArch64Insn insn, bool q, + TCGReg rt, TCGReg rn, unsigned size) +{ + tcg_out32(s, insn | (rt & 0x1f) | (rn << 5) | (size << 10) | (q << 30)= ); +} + +static void tcg_out_insn_3305(TCGContext *s, AArch64Insn insn, + int imm19, TCGReg rt) { tcg_out32(s, insn | (imm19 & 0x7ffff) << 5 | rt); } @@ -825,7 +837,29 @@ static bool tcg_out_dup_vec(TCGContext *s, TCGType typ= e, unsigned vece, static bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece, TCGReg r, TCGReg base, intptr_t offset) { - return false; + if (offset !=3D 0) { + AArch64Insn add_insn =3D I3401_ADDI; + TCGReg temp =3D TCG_REG_TMP; + + if (offset < 0) { + add_insn =3D I3401_SUBI; + offset =3D -offset; + } + if (offset <=3D 0xfff) { + tcg_out_insn_3401(s, add_insn, 1, temp, base, offset); + } else if (offset <=3D 0xffffff) { + tcg_out_insn_3401(s, add_insn, 1, temp, base, offset & 0xfff00= 0); + if (offset & 0xfff) { + tcg_out_insn_3401(s, add_insn, 1, temp, base, offset & 0xf= ff); + } + } else { + tcg_out_movi(s, TCG_TYPE_PTR, temp, offset); + tcg_out_insn(s, 3502, ADD, 1, temp, temp, base); + } + base =3D temp; + } + tcg_out_insn(s, 3303, LD1R, type =3D=3D TCG_TYPE_V128, r, base, vece); + return true; } =20 static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd, --=20 2.17.2