From patchwork Tue Aug 15 19:57:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 713805 Delivered-To: patch@linaro.org Received: by 2002:a5d:4012:0:b0:317:ecd7:513f with SMTP id n18csp1968945wrp; Tue, 15 Aug 2023 13:00:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHIFE5qJmu5/3Um8bsJIL8k9Ss9wJgUGj4x0PzZkZIfvidIViiAaEvGECL/wiBl84KjELGy X-Received: by 2002:a05:6830:128b:b0:6bc:f999:188f with SMTP id z11-20020a056830128b00b006bcf999188fmr13077119otp.3.1692129643918; Tue, 15 Aug 2023 13:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692129643; cv=none; d=google.com; s=arc-20160816; b=rnzm1ixXGbfy1AXgN1+1803VANgExTrXjMsCSMGKeRN+5DvluEb7yCU+0d30/0DnLk CqG3LTCve/+C5gvysNiYn/APdx+B/5ReaKV7ZpKcoMbs9t56ecni7tW5fHQVm+D4zbXz yfQ3dodUx4hxk/32MmiqN7y737gZV/x4Gjr252wpadxBSRnc/qtPzvKt8ZRkZLMS6s7G YnbstOfoG4lgacnkczRPx3+WNPmlG0tTYNvSLi/wZ7mJFe58wZluux0QMlCKIbXX6yFp s7a/mdDNvGhwKibA+x/bjpqCUs/psL/KSKNhgBejLHEh6Bi1ZObUVmCDJ+F4QubBW3ab x65Q== 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:cc:to :from:dkim-signature; bh=a3aggFvLmkyyl4eR3KUMuICtg6+359fE3pW160k38Qs=; fh=1LlI9qg4dDC6jzYzk4mr2RaPQDh8MKMNLXu5CCRW41Q=; b=cVtR5cFaT3onrJeCUi2GU8hZ6cbGc5d3qkp+XpqLxl9B+rTQnVfmLQC0Oh6ynG9Ip4 NAAGT6avxwXVrifkopV1Hba+NKDzLvztElIlC0D3n7cwNMJ/ptrUkaZJ65IClZrak0B5 nyWNzDKzgAvpZQtaUJXtYg+LDxrGdcwU5AOU389i7Q6RRNUzI82YE9YSdQPEfy6o9jul 2RWtCwOCZbpsHwDvP8zLs6VDwoDH1ArB/zKklbFpGzuISjBXZ7HFkL7ym3mvsjxU43dM K9AVQyqZ5D/ViU3Udp18XBA9iI9BKXpU862J24e6AL4NAjLhaQzocZzz/zX7FibWP/q/ gUqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KkdJjxmP; 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 r20-20020a0ccc14000000b0063f74e8e713si7375493qvk.227.2023.08.15.13.00.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Aug 2023 13:00:43 -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=KkdJjxmP; 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 1qW0Au-00058i-Pz; Tue, 15 Aug 2023 15:57:56 -0400 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 1qW0As-00056g-1Q for qemu-devel@nongnu.org; Tue, 15 Aug 2023 15:57:54 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qW0Ap-00014T-H6 for qemu-devel@nongnu.org; Tue, 15 Aug 2023 15:57:53 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-686f1240a22so5734502b3a.0 for ; Tue, 15 Aug 2023 12:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692129470; x=1692734270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a3aggFvLmkyyl4eR3KUMuICtg6+359fE3pW160k38Qs=; b=KkdJjxmPf9lI7OCk0OpP8JtvjIIzlItLrvtHxYv+gvd1uCAELXYT593RWMuWAJmnYq JjRG3IkYCQuBMScU6olOkgbI3o8HDCmrGNTLF8E5x3c8b8Biw5Cqr9Of5YEugAVYBvuW XRX/8dCpUvM1cAo9lO0sEBAvFF64vp5otLcOAL/puunKnzcB9d+2VCzSvmmPZlYWGKaM hF0pvcwYavtL/w8Dz7viVXwaUB24YHbHDaYHUtbMGUl0z3TzsxNlU/Q8GX64n9cwTOge PaPHkZH2+GWUAO8AZ9itLF33d2SY2w9kfYl/+sLIetmxSMtI2UwDEMJpVAYkMLAO2iKX dL4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692129470; x=1692734270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a3aggFvLmkyyl4eR3KUMuICtg6+359fE3pW160k38Qs=; b=LZsZXAgRDJYccHXzw+hiHXqwb74JLlMBUSGNih08Smy5b8Ui0c8RYk1x8gDFfZ9FQh D6oXGXT5HkQN4E/BL5qrY0nnpJBEI7KlnphxiRXsUnsYlx8CPteLirBlanZa4ukY47RA qXzlaig8wzKdvZq83ZIJ5AivTe6GH1FlwrzOYhba3v/UXHLuWFXU4dveJxCZ4YWL3hDO X8iZ1KvbGixwsmwICmQPM2qVHS/y9mnrs7TU+TWuTFhnWTavyLV90MLf75h3pqq0fDiC +868RRjcBOGZgUHFMhagmfB7OZYSL5wqXoW8GZIRyD24fIEa01OE/NviXGLG5h3wzy/7 WB5Q== X-Gm-Message-State: AOJu0Ywa/9AYebwyFkpxYbOVFeOLASZg2tJ8dOPct6+gAJVjGxfKP6WQ c96VLY6e6E12KzeiReDt9V5RZOXdwqrAxiUNFh4= X-Received: by 2002:a05:6a20:748b:b0:132:2f7d:29ca with SMTP id p11-20020a056a20748b00b001322f7d29camr17481785pzd.24.1692129470227; Tue, 15 Aug 2023 12:57:50 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:8d06:f27b:d26c:91c1]) by smtp.gmail.com with ESMTPSA id n7-20020a62e507000000b00686b649cdd0sm9667699pff.86.2023.08.15.12.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 12:57:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, jniethe5@gmail.com Subject: [PATCH v3 07/14] tcg/ppc: Use ADDPCIS for the constant pool Date: Tue, 15 Aug 2023 12:57:34 -0700 Message-Id: <20230815195741.8325-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230815195741.8325-1-richard.henderson@linaro.org> References: <20230815195741.8325-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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=unavailable 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 Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index a302bfff2e..a5c1891eb6 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -1076,6 +1076,12 @@ static void tcg_out_movi_int(TCGContext *s, TCGType type, TCGReg ret, tcg_out32(s, LD | TAI(ret, TCG_REG_TB, 0)); return; } + if (have_isa_3_00) { + tcg_out_addpcis(s, TCG_REG_TMP2, 0); + new_pool_label(s, arg, R_PPC_REL14, s->code_ptr, 0); + tcg_out32(s, LD | TAI(ret, TCG_REG_TMP2, 0)); + return; + } tmp = arg >> 31 >> 1; tcg_out_movi(s, TCG_TYPE_I32, ret, tmp); @@ -1133,6 +1139,10 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece, if (USE_REG_TB) { rel = R_PPC_ADDR16; add = ppc_tbrel_diff(s, NULL); + } else if (have_isa_3_00) { + tcg_out_addpcis(s, TCG_REG_TMP1, 0); + rel = R_PPC_REL14; + add = 0; } else { rel = R_PPC_ADDR32; add = 0; @@ -1159,6 +1169,8 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece, if (USE_REG_TB) { tcg_out32(s, ADDI | TAI(TCG_REG_TMP1, 0, 0)); load_insn |= RA(TCG_REG_TB); + } else if (have_isa_3_00) { + tcg_out32(s, ADDI | TAI(TCG_REG_TMP1, TCG_REG_TMP1, 0)); } else { tcg_out32(s, ADDIS | TAI(TCG_REG_TMP1, 0, 0)); tcg_out32(s, ADDI | TAI(TCG_REG_TMP1, TCG_REG_TMP1, 0));