From patchwork Fri Nov 11 07:40:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 623698 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp623292pvb; Fri, 11 Nov 2022 00:02:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf7m2xEu69NoiBdOrj4MV8pq1OXrhXCbOH9OpSS1qGfUTBdR/VhtBd9CGKYOPfv25cZ+5IWR X-Received: by 2002:a37:e204:0:b0:6fa:2050:ea8e with SMTP id g4-20020a37e204000000b006fa2050ea8emr195105qki.608.1668153740483; Fri, 11 Nov 2022 00:02:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668153740; cv=none; d=google.com; s=arc-20160816; b=dULUfOsJo8cJwTwchZUG1Tue0On5y/PQCJzKHx5Od9YohtNTt1NNKgeyT+F3BDLCs1 /djmyo/NNvIPUwNRgYAPqzbDPnhI/9J/N5Wet3PhWzdHHONvsFZ8gE2KHyIfdQbxwrMq SrBcEQbgRD8sR0Jxe9HgXBuyOqm0BCwIJyiBjDqWVL6DzTvarxyFrskm12B/wxcvapGS Km2sUFXKbCAtZfu3HaqNBmrTiiMnVTCXOeBVVcDFqQWp2bmaKLnuwDkAPYvgVKmlwlPq nxpstCZeRVsB/LdpRsF97Y/aYmpni4K7XSxP71M0HZsloasOCN8PI/Epk4wnCNSWTIVV Tsvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=ykW3p8xDFujqs9enheSpuJYpD12Nxn1fGpKV437Ebps=; b=uZ9jUG71pinmUcCxbR82pUDfECI27ykHLmniui1K+whyt6ou232DCRJ7nH1zS52vkZ gph4hRHmWmu5Szjieoef7UZmBQThKu3yqfkpjCYUFP1hV08IKBSPng/UCB8qQ1LdrJ/1 AWe6TGLvgv454gfpxMQAZt0PPkadxfDBXaHMGP/YJrwFwbGLTmItfDDlj//Kdevbeif2 4DjxsCcTXfXhLeW+COnkJvT1OE3WGmdwnMJVp/QrKC48GZxKrAWJdfDINfwuVPJeo8gh PpP12QuaQlJ7PFNYV1vON4qO8RZ3i0GrE/uu/mUGbAgRLUknT/t/j4FvbAzT5OaNUytu tMmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NTcjZpfW; 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 bm34-20020a05620a19a200b006cf0ae1f6e0si737044qkb.623.2022.11.11.00.02.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 00:02:20 -0800 (PST) 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=NTcjZpfW; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otOgL-000733-As; Fri, 11 Nov 2022 02:42:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otOgJ-0006za-53 for qemu-devel@nongnu.org; Fri, 11 Nov 2022 02:42:31 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otOgH-0000JD-EV for qemu-devel@nongnu.org; Fri, 11 Nov 2022 02:42:30 -0500 Received: by mail-pf1-x42e.google.com with SMTP id i3so4210850pfc.11 for ; Thu, 10 Nov 2022 23:42:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ykW3p8xDFujqs9enheSpuJYpD12Nxn1fGpKV437Ebps=; b=NTcjZpfWPvhdBvM+9dOQ18RqXlkZKZKtpAkFKOt5OK75jwc0K6r3w32QR8uUWy2QZq xr9SH8tyvVbklFph0kmNExIQwvxP0jMb4H0gJuBVKaM1BNrEh7tF1mSI9cIQhNC9B5vV FU+Bv8Ib8NIW0JxCV8U4tJ0Na2YDtUny8553V1SE5iL5eKTw6qwxymYPQAUckyNPAPLl bVL/m5jH8/8yRIxuVCQFAjb5LcU3a2UaMV/tN1ngKv1J21eY28D7IFybZEeTXVybdnps +MV5i/L9IIO1RBaPQmxOFMPy/eCQz//rCUidyC3ffqMzYHXnsCyT6aocaR7z7TSwxiTT F6SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ykW3p8xDFujqs9enheSpuJYpD12Nxn1fGpKV437Ebps=; b=fiYls68NOYar6JFkPJLu34fITP7f33MiDKz/E/bpyNQP6NDbPvmQGVc2BPP515ouC8 RgqvmU6yzmVgAYmjp+usmsdH/8CFLFbiNo81Uh+xPLYrhfHUxBiVqVIiZGhtJXgRNOPX RMkcG0uvi5mWq1NJPCwmLwFJ2jLJd7nutN4qcMbYuaPc1lASPzSd/gjHBy8KoeIPk/52 9bj7rY6Q5o2m7TlwfzcnT17tQRxSV/PTcw4yUSNjALKnMHCn4fbalFxMWHf2lzmDQrFW 85K1qscg22Zskd3lZX9xNbjIpJIyCNX9zCtOYMjmpYLb3ctyE4R9MhQ8VY2nlMDwfFAf XuHg== X-Gm-Message-State: ANoB5pnxM+R5v3S7zC2PtiHmG8CUAeqgr+cZlT2DAV8DDdJb4lKNO5A0 pEEVYTztw9q60LU2KfZKuWFiXSOPSOP6H8vn X-Received: by 2002:a63:e644:0:b0:459:7d5f:293e with SMTP id p4-20020a63e644000000b004597d5f293emr569379pgj.602.1668152547996; Thu, 10 Nov 2022 23:42:27 -0800 (PST) Received: from stoup.lan (2001-44b8-2176-c800-0aef-59aa-1faf-7e61.static.ipv6.internode.on.net. [2001:44b8:2176:c800:aef:59aa:1faf:7e61]) by smtp.gmail.com with ESMTPSA id o15-20020a170902d4cf00b001754fa42065sm976069plg.143.2022.11.10.23.42.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 23:42:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-8.0 v3 35/45] tcg: Add TCG_CALL_RET_BY_VEC Date: Fri, 11 Nov 2022 17:40:51 +1000 Message-Id: <20221111074101.2069454-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111074101.2069454-1-richard.henderson@linaro.org> References: <20221111074101.2069454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This will be used by _WIN64 to return i128. Not yet used, because allocation is not yet enabled. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 1 + tcg/tcg.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h index 2ec1ea01df..33f1d8b411 100644 --- a/tcg/tcg-internal.h +++ b/tcg/tcg-internal.h @@ -37,6 +37,7 @@ typedef enum { TCG_CALL_RET_NORMAL, /* by registers */ TCG_CALL_RET_BY_REF, /* for i128, by reference */ + TCG_CALL_RET_BY_VEC, /* for i128, by vector register */ } TCGCallReturnKind; typedef enum { diff --git a/tcg/tcg.c b/tcg/tcg.c index 97c97158cd..3476721fbe 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -730,6 +730,10 @@ static void init_call_layout(TCGHelperInfo *info) /* Query the last register now to trigger any assert early. */ tcg_target_call_oarg_reg(info->out_kind, info->nr_out - 1); break; + case TCG_CALL_RET_BY_VEC: + /* Query the single register now to trigger any assert early. */ + tcg_target_call_oarg_reg(TCG_CALL_RET_BY_VEC, 0); + break; case TCG_CALL_RET_BY_REF: /* * Allocate the first argument to the output. @@ -4598,6 +4602,21 @@ static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op) } break; + case TCG_CALL_RET_BY_VEC: + { + TCGTemp *ts = arg_temp(op->args[0]); + + tcg_debug_assert(ts->base_type == TCG_TYPE_I128); + tcg_debug_assert(ts->temp_subindex == 0); + if (!ts->mem_allocated) { + temp_allocate_frame(s, ts); + } + tcg_out_st(s, TCG_TYPE_V128, + tcg_target_call_oarg_reg(TCG_CALL_RET_BY_VEC, 0), + ts->mem_base->reg, ts->mem_offset); + } + /* fall through to mark all parts in memory */ + case TCG_CALL_RET_BY_REF: /* The callee has performed a write through the reference. */ for (i = 0; i < nb_oargs; i++) {