From patchwork Fri Oct 13 17:09:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 733241 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp1580060wrv; Fri, 13 Oct 2023 10:10:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHX7rc0oLoJ72j3lzHZGb2tyl2d+PQmN58yw8dewDaTdW/JCmiJv9gqFiXiZgmVqItkbOKt X-Received: by 2002:a25:e096:0:b0:d9a:5476:20d7 with SMTP id x144-20020a25e096000000b00d9a547620d7mr11490383ybg.22.1697217033357; Fri, 13 Oct 2023 10:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697217033; cv=none; d=google.com; s=arc-20160816; b=mZpfflLP/gtJ+JLjT04pDSobaEbB7guoHEZoQr1V1+/gkz4yKHFMUAJCVt/uFFzlqO O5Mn+TzXTXA0nYClgl7F1Xa/7xNPovTTTCF2tZniBYTGUaqtP5uUYeX2uNbpIS2thvEK +GVCT5V1H3sZBP44kpkDnLpeudQjxkdWp0m4JVUjhQEy/8+Xva2brYe/WrghR3tfAUZq CUcYirJkgQVxdJr0WzL2h00KHRnR3RcHlcuwI24+rsNWCVWIEgkZQOdOsVMCoOdD02k3 d2h8pTV4XSKn8caSzzSj2ZhG8ldSlpDQNJZX6mryeCPtG7q1w6gCt82/z74KnBbYW6M5 NldQ== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=amw5rWwKOEnOt99g+OsLsyKAiCnRelMX/V2tMxq7+tU=; fh=UhxwdZYHP7zKrVOsDzSwq52OyFUIKgoVzT4P2jPed6w=; b=CpIGIN3jjI0X59RObCH2iSoWKnMgaCsY6MUqGFaFFLfxE9sADWtl0LHlelYWjwblUQ QQWGjAhDazXbA1Q/lGtoANytEuTzcFrHFWYD/TYLdNZTR73jWNz6PRGAEaIX2FV1DRjp ibffB0krdbSOEkpZvNjByk41lLv8YOaxAWftPy5a/aqR73a8HF7D9RnypNqL/QbecG98 NLv52gUm6xtmzOzMhCepgWNEgiwY80MS8PKXFdCyeTI/fyG0AIVjA3gJOeEw9HdNt9xR 3evYiyiDBOA7pGJhw0YJkmRY2U251xgD+7D8Q1gTL/rcvhin89s5+YODLHfE8sf8SV02 U5Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pWl1C7H5; 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 cp13-20020ad44aed000000b0066d17b7ad9fsi1458922qvb.174.2023.10.13.10.10.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Oct 2023 10:10:33 -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=pWl1C7H5; 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 1qrLg3-0000zt-AD; Fri, 13 Oct 2023 13:10:19 -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 1qrLg1-0000zc-Jq for qemu-devel@nongnu.org; Fri, 13 Oct 2023 13:10:17 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrLfz-0005U7-Ta for qemu-devel@nongnu.org; Fri, 13 Oct 2023 13:10:17 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6b72807051bso285230b3a.1 for ; Fri, 13 Oct 2023 10:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697217014; x=1697821814; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=amw5rWwKOEnOt99g+OsLsyKAiCnRelMX/V2tMxq7+tU=; b=pWl1C7H5WQg+HcupR2EWrxNLuZ/oW+vx8BSvrvE8q+ZzeS3Snlo5kRvOS4Tix9gbSI rfmfg3k6mIq6rNVjPg9fJoPeFbmyLrE/akXevAtkwWL+Bx42KEEjwNhwPQGO5fI4X7HM SaIVrjR7J/rwf86pLCrFMfECvIhNrfjDZjGNlR6u+jo16xP7JfQTdtJ9P1IPOMP5AXFj MB0eaJicMO7lO9alpEEOUj050rv+0vi917NYBr8wkHG7mcGbTZWja9FwtGXjCYnNjr/l XS2a8DhTaDk1KPOpRnyocrZP+ibjjK8ZdrCbcKYHnj/PXE4jOjUQ4Zzf+9W4hbDtlNx1 0FNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697217014; x=1697821814; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=amw5rWwKOEnOt99g+OsLsyKAiCnRelMX/V2tMxq7+tU=; b=MrAA1Ntc70W06VKXc3U/mStVWvrMQQs0JNMlIPQntzKl8mZMxfsjfn4Q489pqVOCsz vLCUc+77nIkKCXjyWdYBWRNxkPRSrxaQz0/1g59GnD3UyQ15cDHkdab9tZdteScuAzF2 ifG+nqeAGkmIpLnJ3T9e85lvjn/Aty5VSRjU5MXV+ZmYBOFttzSpgMfhXIL35LgsCtDw fT8lXDyv+qE1gmlNYxJHUt04+TejhluTE1sdY7kld00e1Zf4F5AcAY/SBfqXngMgvwxm /fWoBj7P9tJj37i5XO/nuHwbi4rdEH4rzrmDC16vQiFM8inBEXdoFJn1qx6gtMHatilo O/0Q== X-Gm-Message-State: AOJu0YwnesZDhr0hWWBP7ajI6g6rnKclPXUhiGmm+wXJ3+9U8YQVfHgH JUKQbQugEYFY8Lb2pT4CdqujuRdFJpA0A+OqE1I= X-Received: by 2002:a05:6a00:1810:b0:6b6:e754:9e02 with SMTP id y16-20020a056a00181000b006b6e7549e02mr1105172pfa.12.1697217013811; Fri, 13 Oct 2023 10:10:13 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id n7-20020a62e507000000b00693411c6c3csm13687926pff.39.2023.10.13.10.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 10:10:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: jniethe5@gmail.com Subject: [PATCH v4 00/13] tcg/ppc: direct branching, power9, power10 Date: Fri, 13 Oct 2023 10:09:59 -0700 Message-Id: <20231013171012.122980-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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 Build on Jordan's patch to allow direct branching and USE_REG_TB to co-exist. Use the power9 addpcis wherever pc-relative addrs might be handy. Merge in my power10 patches for prefixed insns. Finish up with an RFC to disable TCG_REG_TB for power9+, when pc-relative code sequences exist. I've only lightly tested this, and it seems to increase code size by a few insns per TB. It really depends on how much we end up using the constant pool. Changes for v4: * Fix tcg_out_addpcis. * Drop RFC from the final patch. Jordan's testing suggests that pc-relative addressing is slightly better than tb-relative. I can imagine that addpcis+ld might be fused in the pipeline to an absolute 64-bit address, and so has no real cost. r~ Jordan Niethe (1): tcg/ppc: Enable direct branching tcg_out_goto_tb with TCG_REG_TB Richard Henderson (12): tcg/ppc: Untabify tcg-target.c.inc tcg/ppc: Reinterpret tb-relative to TB+4 tcg/ppc: Use ADDPCIS in tcg_out_tb_start tcg/ppc: Use ADDPCIS in tcg_out_movi_int tcg/ppc: Use ADDPCIS for the constant pool tcg/ppc: Use ADDPCIS in tcg_out_goto_tb tcg/ppc: Use PADDI in tcg_out_movi tcg/ppc: Use prefixed instructions in tcg_out_mem_long tcg/ppc: Use PLD in tcg_out_movi for constant pool tcg/ppc: Use prefixed instructions in tcg_out_dupi_vec tcg/ppc: Use PLD in tcg_out_goto_tb tcg/ppc: Disable TCG_REG_TB for Power9/Power10 tcg/ppc/tcg-target.c.inc | 277 +++++++++++++++++++++++++++++++++------ 1 file changed, 236 insertions(+), 41 deletions(-)