From patchwork Fri Jun 9 10:46:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 690897 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp746774wru; Fri, 9 Jun 2023 03:48:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HnwGnoKt+f6GjAZMiyn4k7DmmOgsL6qJA1TkCsKV9mR2rYPsqgZVeuxptTW3LC+3l3h28 X-Received: by 2002:a05:620a:84c6:b0:75b:23a1:3614 with SMTP id pq6-20020a05620a84c600b0075b23a13614mr816669qkn.37.1686307736473; Fri, 09 Jun 2023 03:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686307736; cv=none; d=google.com; s=arc-20160816; b=fX0c+B0mBomdsX5FViPnmVsQYNLYmoHUxzQ5OXzwS00cvcxgDnvLdbNI8gIroxBu9k gfeGv0X8/Ti+3PSlRnhLsFkGhPSBu5wd/PZqr0EnVyvetIj6zJUo4D0A2Ku0W1QGu0iq BhbIRkoqRcFy4lsnp8xZFjmelBEABqXoea1hLAhmjhEhD8lAf5T/0jGhDpgU2kvIMZYf Bx9nvcyI1/U0ICap0vUM7/1SBaYgqv+fsGbsfsgpsrQ0fdi2sYYcaUW5xzwpGlLj2qnd J6hxht2gXc+/MrG2/63GnGKdmneyqyqAmiNMWvMgHf8LKMiJE1/Sic2EGuuvleGsH5j6 AIhQ== 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=HJ5HI0lL3qjrViOVTfhSFThyUieC3Zv2QHm9pLeOb3Y=; b=fw7kkZVx3H1dCtRh+PTHsVTWBG+SWfkL6M7AMiuIj4vumXDzZDwLW+5ZtzuZC2ZLcI pU9+wHSZFMvn7ge/S8AEWxnpiJ/JKZ11n7/clOQZ9S7Sa55XUx5tqCYS7iyn/H3HRSsQ o4V0jnJyZV0PLPl1EW3UG/LhsvWNI9r2bV3ISMW3qM1Qro4A73F/nukY9peqXlT2Z2Fo SmEYmYxUZhUOfPcllm9uilc3FM/KGX2mwdS/1LRtPUhljsgg1BleZc+w80qwbQdgF5zE hGKgKDUEcdtzmvqCX+oG0532T0pL6P002fjP90GIqim9F7F5XUdafdBn+l13GO6yIIne ZVdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CjcWwxj7; 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 a16-20020a05620a103000b0074e100d6e39si1782976qkk.595.2023.06.09.03.48.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Jun 2023 03:48:56 -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=CjcWwxj7; 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 1q7ZeQ-0000jQ-F8; Fri, 09 Jun 2023 06:47:26 -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 1q7ZeP-0000j6-9S for qemu-devel@nongnu.org; Fri, 09 Jun 2023 06:47:25 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7ZeN-0001AJ-4V for qemu-devel@nongnu.org; Fri, 09 Jun 2023 06:47:25 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-30e53cacc10so1110096f8f.0 for ; Fri, 09 Jun 2023 03:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686307641; x=1688899641; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=HJ5HI0lL3qjrViOVTfhSFThyUieC3Zv2QHm9pLeOb3Y=; b=CjcWwxj7J3aWhPFCLcAWd8QwV2klkvtWSZ8RsuH/yZovIYJFZbwJLOk53n8o4Cfdq0 HArgQBPMXM3YAb8fLAjxajKD7BBpu31FZtHxjD6iq+LjNpvOJhYMZIv9UOsm3UwA1Znf oSpMpU3jUIIbAdKKcOB1BHINd9bxEa9ctjqw5kMTbblMthu6vsnx33btjl8ikevyv2ca QcwA+r8JG2nOGoTkfqjK1AzfYRp0jvfMReeIIUGdsgO5217VTwyj/zlnsrXCJj0pp9P0 Uyzn5MaDFzDSl2bO1yxf/8e8Bl725KORS9bvGCGW+bKMyCTOOKwmwBWoG6G+l+1iAqR9 fZMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686307641; x=1688899641; 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=HJ5HI0lL3qjrViOVTfhSFThyUieC3Zv2QHm9pLeOb3Y=; b=Pmyur8i5PsjbAkZgYIGjzylBl2iNt8+GB47if17YvF7kcvf5WsWrlw2ds/kjzrhkH+ 2l1dAPOBpyy477UFOYfvpOi+BQEsIJPAHBWaA1UV5t4h1l1DlsZ+1FLk+9HfaCUBijTT lvuvfnOBrYrrXOGCHrwtXBIWkglfRi001DnhK8CHD7/qJluCe2Q2TbeOUnmMI9ljZlm+ zPrMsmHIw7NCsOvksEVqEROUUH1K+k8gq9voYvb8oM25sKK8fTvQ7fqpi2PVQIVSs3OG T5kPLv6AUsFxARIz52N0aLKWkeE344NyoQEwrj/zi+ECJx694sZ20YFKN0OoxNSkoQas YPDA== X-Gm-Message-State: AC+VfDxG11VLpm+IZ/08RlZGGpHgfue7/ws7ATDjxobJ/Ga2Hzt6opqO iaCUj/khueeRK8v4KMC9EfL9RIIgnfsVmAMbsE1HEw== X-Received: by 2002:a5d:4bd0:0:b0:30a:eeee:2fba with SMTP id l16-20020a5d4bd0000000b0030aeeee2fbamr558252wrt.34.1686307641228; Fri, 09 Jun 2023 03:47:21 -0700 (PDT) Received: from localhost.localdomain (23.171.88.92.rev.sfr.net. [92.88.171.23]) by smtp.gmail.com with ESMTPSA id k10-20020adff5ca000000b003077a19cf75sm4108102wrp.60.2023.06.09.03.47.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 09 Jun 2023 03:47:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 00/22] target/arm/tcg: Remove inclusions of 'exec/helper-[proto/gen].h' Date: Fri, 9 Jun 2023 12:46:55 +0200 Message-Id: <20230609104717.95555-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Hi, This series tries to do what Richard suggested in [*]: Targets that have a tcg/ subdir should have helper.h.inc moved into there. At the end, include/exec/helper-gen.h and include/exec/helper-proto.h become unused and go away. but only for the ARM target, to first see if this is heading in the correct direction. Instead of having TCG generated helpers included by all translate/helper units, they are reduced to the few places really needing them. I expect the build step to be slighly improved, since the compiler doesn't have to compile and track unused helpers definitions. [*] https://lore.kernel.org/qemu-devel/cad000d7-f408-9337-9328-ccb262c5fcc7@linaro.org/ Philippe Mathieu-Daudé (22): plugins: Remove unused 'exec/helper-proto.h' header accel/tcg/cpu-exec: Use generic 'helper-proto-common.h' header target/arm/tcg: Remove CONFIG_TCG #ifdef'ry check target/arm/tcg: Rename helper template headers as '.h.inc' target/arm/tcg: Extract iwMMXt helpers from the generic 'helper.h' target/arm/tcg: Fix iwmmxt-related code style target/arm/tcg: Expose some iwmmxt methods in 'translate.h' target/arm/tcg: Extract iwmmxt code to translate-iwmmxt.c target/arm/tcg: Reduce 'helper-iwmmxt.h.inc' inclusion target/arm/tcg: Extract VFP definitions to 'helper-vfp.h.inc' target/arm/tcg: Reduce 'helper-vfp.h.inc' inclusion target/arm/tcg: Move neon_tbl() from op_helper.c to neon_helper.c target/arm/tcg: Extract NEON definitions to 'helper-neon.h.inc' target/arm/tcg: Reduce 'helper-neon.h.inc' inclusion target/arm/tcg: Extract SVE2 definitions to 'helper-sve.h.inc' target/arm/tcg: Reduce 'helper-sve.h.inc' inclusion target/arm/tcg: Reduce 'helper-mve.h.inc' inclusion target/arm/tcg: Define SME set_svcr() helper in common 'helper.h' target/arm/tcg: Reduce 'helper-sme.h.inc' inclusion target/arm/tcg: Reduce 'helper-a64.h.inc' inclusion target/arm/tcg: Remove inclusions of 'exec/helper-[proto/gen].h' tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc target/arm/tcg/translate.h | 11 +- .../tcg/{helper-a64.h => helper-a64.h.inc} | 0 target/arm/tcg/helper-iwmmxt.h.inc | 114 ++ .../tcg/{helper-mve.h => helper-mve.h.inc} | 0 target/arm/tcg/helper-neon.h.inc | 205 +++ .../tcg/{helper-sme.h => helper-sme.h.inc} | 2 - .../tcg/{helper-sve.h => helper-sve.h.inc} | 46 + target/arm/tcg/helper-vfp.h.inc | 136 ++ target/arm/{helper.h => tcg/helper.h.inc} | 488 +----- accel/tcg/cpu-exec.c | 2 +- plugins/core.c | 1 - target/arm/debug_helper.c | 7 +- target/arm/helper.c | 7 +- target/arm/tcg/cpu32.c | 4 +- target/arm/tcg/crypto_helper.c | 6 +- target/arm/tcg/helper-a64.c | 11 +- target/arm/tcg/hflags.c | 6 +- target/arm/tcg/iwmmxt_helper.c | 6 +- target/arm/tcg/m_helper.c | 12 +- target/arm/tcg/mte_helper.c | 5 +- target/arm/tcg/mve_helper.c | 16 +- target/arm/tcg/neon_helper.c | 28 +- target/arm/tcg/op_helper.c | 28 +- target/arm/tcg/pauth_helper.c | 5 +- target/arm/tcg/psci.c | 6 +- target/arm/tcg/sme_helper.c | 11 +- target/arm/tcg/sve_helper.c | 20 +- target/arm/tcg/tlb_helper.c | 5 +- target/arm/tcg/translate-a64.c | 16 + target/arm/tcg/translate-iwmmxt.c | 1340 +++++++++++++++++ target/arm/tcg/translate-mve.c | 6 + target/arm/tcg/translate-neon.c | 11 + target/arm/tcg/translate-sme.c | 16 + target/arm/tcg/translate-sve.c | 5 + target/arm/tcg/translate-vfp.c | 6 + target/arm/tcg/translate.c | 1274 +--------------- target/arm/tcg/vec_helper.c | 26 +- target/arm/vfp_helper.c | 11 +- tests/tcg/aarch64/bti-1.c | 2 +- tests/tcg/aarch64/bti-3.c | 2 +- .../aarch64/{bti-crt.inc.c => bti-crt.c.inc} | 0 target/arm/tcg/meson.build | 1 + 42 files changed, 2100 insertions(+), 1804 deletions(-) rename target/arm/tcg/{helper-a64.h => helper-a64.h.inc} (100%) create mode 100644 target/arm/tcg/helper-iwmmxt.h.inc rename target/arm/tcg/{helper-mve.h => helper-mve.h.inc} (100%) create mode 100644 target/arm/tcg/helper-neon.h.inc rename target/arm/tcg/{helper-sme.h => helper-sme.h.inc} (99%) rename target/arm/tcg/{helper-sve.h => helper-sve.h.inc} (98%) create mode 100644 target/arm/tcg/helper-vfp.h.inc rename target/arm/{helper.h => tcg/helper.h.inc} (56%) create mode 100644 target/arm/tcg/translate-iwmmxt.c rename tests/tcg/aarch64/{bti-crt.inc.c => bti-crt.c.inc} (100%)