From patchwork Mon Jun 19 15:55:03 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: 694078 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp2442032wru; Mon, 19 Jun 2023 08:59:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7z+GfMkGWrluj4GIYEy5jh2kICtfLBsaR82Ax4KFvBpdF53Snqc9IfWsOYiemQQPWnc5kI X-Received: by 2002:a05:6214:c4b:b0:625:aa49:c342 with SMTP id r11-20020a0562140c4b00b00625aa49c342mr11928858qvj.54.1687190342752; Mon, 19 Jun 2023 08:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687190342; cv=none; d=google.com; s=arc-20160816; b=fL+SyBtLqFxjay3X3wQiOUyXPQsEIZC8vaqUWryiWK1uUmXzvhl6e3J8AIlYlzzvLK 8ojNwCmcuz40yDZ3BxcUtF4LVlzWBxsvUxMvuIkhFWMNDhBmIa8eUYt61iohF90RKKnr OV+1GIToOhvj0QNhAmaZlQgHtLGwMDg2tT4w2GvZJ7iv/fen4kyJEb+/W5HOou5xT42O D/RchGMhjXne3Dznuv4qyIofj/B/yYlsCq85vqwngOZZAeShcEnYLUvh8vF3F333g7Ne rSShTEz/0qRwsVaI3am+11XngOdRch6yguLZZ8BLRp4xXcVzr7haojtR7+Mi2WS3TKl3 Aq9w== 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=QH3Dc3MYnhR8X77zbXMGBO+f7H+t3l8LmCN8dybEbDo=; b=yc14d9GSp7z9tuMabkShreRfvqbek15nto5KBfA3gkQz92AFhPx38qT9S9M9bX2cmF SM9nUtwHOrsQkptwjyaIrjY7BPnnBRj65lPLhD0mO5vo34gxL/LZeXy9/z95v54sgqO8 IADmPRhBqnHOmTU2prfbSpVpdkrGzHB276WE6B1H/91lahiqzkwVErvUrCkrbGGYm5hc x5nCjte80mtgye/PUXKmddMkHcuqKEHqJBjAuZadT5CRGgejFkL3pzf7zahIJ6aEHi1z /j9g3z7Jtq45E5QBmIZXnSVUTDlvepnEnWn/cNeimnW9WMzVe7bUMVv3UPfU/ZJCM3iz l8kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P8TSQ4FE; 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 i4-20020ad45c64000000b0062612cf2b52si72822qvh.253.2023.06.19.08.59.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Jun 2023 08:59:02 -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=P8TSQ4FE; 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 1qBHGK-0001Ps-1m; Mon, 19 Jun 2023 11:57:52 -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 1qBHFg-0000Yz-7H for qemu-devel@nongnu.org; Mon, 19 Jun 2023 11:57:13 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBHFd-0005EN-1l for qemu-devel@nongnu.org; Mon, 19 Jun 2023 11:57:11 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5193c97ecbbso3753504a12.1 for ; Mon, 19 Jun 2023 08:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687190227; x=1689782227; 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=QH3Dc3MYnhR8X77zbXMGBO+f7H+t3l8LmCN8dybEbDo=; b=P8TSQ4FEMknDpQxKe4swMqWz5HUWBIt4I1TLSKldHv4bPiA+bFLyWXoUaCjj1bNwFk AIJKic/4JS3Dnc1wuQxzga6eC6dDboxoxQU3ZS8lVP2CNlYzk34Docpb0WRpCvJIpkRs oQZRw9Iyw95mXxHiSzvmE24dccBg6t0x18wXTihH1NyIW0xfZ1zW+2EBvBeN4kzdf76o d6NDULLDcOnE+3yGAfMsKmvjOZoHvpg39k0rLWQhvRInYW2+7hn8RQPxdglLRF8VKqqA HL86l4rafPva6KbuRYEkE3NYv0ZTuhmyhEhFEk0VUb7zsOwWVGAo6fSAQ1+A0FTogZvx IBKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687190227; x=1689782227; 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=QH3Dc3MYnhR8X77zbXMGBO+f7H+t3l8LmCN8dybEbDo=; b=Fs13gRnkcHGnsvk9mS464KejrLP3ZVhI1wAvc4fSOeZkMcK3Rfc+n+dfU/vg9rHdKY IYGYdqwlvMP5UkwvVy3VXtcCNKZ0fI1GG4PI5T+xQtXyV82Ts1TepQW8TuoSbGm4WfDx RKiUtXuLJfOKPN0+3+HfIhk7PhaKtsyJTpGzsGhnK42q7c6hykEsbdXkgiu+CLyZJ5vH Mz4gLz7i/WX9TzR/5v2OKXy1MYWVsqFnrnWl26vuc0qy9WORkKomkOPX3EE7w6q4rlMX IBU+6M4cGI1ta5CLJ6rrkIEN2RQsQeyVB6qyVm/igxn6gF6FhKWq1RGbY15OdIxk9WaZ YLsQ== X-Gm-Message-State: AC+VfDyEN42ra8a9yl7yS3vTNVvxhbzzy/Bn+MrFxzcXN3S7rAAMrYvS UyJC5rWz/r9ayaXg/uRYNuJi6g7qHeDlal2sdN4LsQ== X-Received: by 2002:a05:6402:da:b0:518:7415:3b61 with SMTP id i26-20020a05640200da00b0051874153b61mr5386724edu.23.1687190227276; Mon, 19 Jun 2023 08:57:07 -0700 (PDT) Received: from m1x-phil.lan (sar95-h02-176-184-10-225.dsl.sta.abo.bbox.fr. [176.184.10.225]) by smtp.gmail.com with ESMTPSA id o8-20020aa7d3c8000000b0051a575c76e6sm1726632edr.43.2023.06.19.08.57.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Jun 2023 08:57:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-arm@nongnu.org, Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v3 27/34] target/arm/tcg: Reduce 'helper-a64.h.inc' inclusion Date: Mon, 19 Jun 2023 17:55:03 +0200 Message-Id: <20230619155510.80991-15-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230619155510.80991-1-philmd@linaro.org> References: <20230619154302.80350-1-philmd@linaro.org> <20230619155510.80991-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-x536.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 Instead of including helper-a64.h.inc via helper.h which is included by all TCG files, restrict it to the few files that require it. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/helper.h | 4 ---- target/arm/tcg/helper-a64.c | 4 ++++ target/arm/tcg/sve_helper.c | 5 ++++- target/arm/tcg/translate-a64.c | 6 ++++++ target/arm/tcg/vec_helper.c | 5 ++++- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/target/arm/helper.h b/target/arm/helper.h index 159ed9664f..aae2a38407 100644 --- a/target/arm/helper.h +++ b/target/arm/helper.h @@ -110,7 +110,3 @@ DEF_HELPER_3(ror_cc, i32, env, i32, i32) DEF_HELPER_FLAGS_3(crc32, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32) DEF_HELPER_FLAGS_3(crc32c, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32) - -#ifdef TARGET_AARCH64 -#include "tcg/helper-a64.h.inc" -#endif diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c index 6312238676..782b6b6e94 100644 --- a/target/arm/tcg/helper-a64.c +++ b/target/arm/tcg/helper-a64.c @@ -35,6 +35,10 @@ #include "fpu/softfloat.h" #include /* For crc32 */ +#define HELPER_H "tcg/helper-a64.h.inc" +#include "exec/helper-proto.h.inc" +#undef HELPER_H + /* C2.4.7 Multiply and divide */ /* special cases for 0 and LLONG_MIN are mandated by the standard */ uint64_t HELPER(udiv64)(uint64_t num, uint64_t den) diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c index 79a42af591..64f744bf6a 100644 --- a/target/arm/tcg/sve_helper.c +++ b/target/arm/tcg/sve_helper.c @@ -21,7 +21,6 @@ #include "cpu.h" #include "internals.h" #include "exec/exec-all.h" -#include "exec/helper-proto.h" #include "tcg/tcg-gvec-desc.h" #include "fpu/softfloat.h" #include "tcg/tcg.h" @@ -37,6 +36,10 @@ #include "exec/helper-proto.h.inc" #undef HELPER_H +#define HELPER_H "tcg/helper-a64.h.inc" +#include "exec/helper-proto.h.inc" +#undef HELPER_H + /* Return a value for NZCV as per the ARM PredTest pseudofunction. * * The return value has bit 31 set if N is set, bit 1 set if Z is clear, diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index a3d4265f85..73697f0cc9 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -58,6 +58,12 @@ #include "exec/helper-info.c.inc" #undef HELPER_H +#define HELPER_H "tcg/helper-a64.h.inc" +#include "exec/helper-proto.h.inc" +#include "exec/helper-gen.h.inc" +#include "exec/helper-info.c.inc" +#undef HELPER_H + static TCGv_i64 cpu_X[32]; static TCGv_i64 cpu_pc; diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index 99f81df9e1..dcfb3cfc96 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -19,7 +19,6 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/helper-proto.h" #include "tcg/tcg-gvec-desc.h" #include "fpu/softfloat.h" #include "qemu/int128.h" @@ -41,6 +40,10 @@ #include "exec/helper-proto.h.inc" #undef HELPER_H +#define HELPER_H "tcg/helper-a64.h.inc" +#include "exec/helper-proto.h.inc" +#undef HELPER_H + /* * Data for expanding active predicate bits to bytes, for byte elements. *