From patchwork Tue Sep 10 11:28:32 2024 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: 13798366 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F706EB64DE for ; Tue, 10 Sep 2024 11:29:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snz3B-0007kr-A0; Tue, 10 Sep 2024 07:28:49 -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 1snz39-0007h4-HV for qemu-devel@nongnu.org; Tue, 10 Sep 2024 07:28:47 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snz37-0003Pc-QL for qemu-devel@nongnu.org; Tue, 10 Sep 2024 07:28:47 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a8d2b24b7a8so517831166b.1 for ; Tue, 10 Sep 2024 04:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725967723; x=1726572523; darn=nongnu.org; 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=FOStTVlTR7gBcQgAt0bLPJDUQd/JCSgZdNVPc04Dy2A=; b=mp0DcR6+zDnA9ffYem07iDHwfNISxMsV60tMQWnQkR077Ph4xYDkY69wa+cGFvCZTY Y78wjnlTlVOO7/LgsGORTS3hlLCi1lt5rSNyIaBtqzSkdJQPpxsdO5uBE97+7+0vSoEJ WCIn7v78ahDCgyKryNrv1weEmEFuz+rNape54RN/Vr1IOmH7RAJTSvLt6rTC5NY8qTnH SD3zYD24ONoNlj1dHBmIecMkfk+97K0rQOBauToJftPkKLdXnRZ20CWTeq6/N8L1Tay1 cUZwQ08lKauQwAhr+9mi/2FnBjsMdjSklgpARVG1OOVjhtfqwoMZv7dw/OMsKtJWMYyx wBpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725967723; x=1726572523; 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=FOStTVlTR7gBcQgAt0bLPJDUQd/JCSgZdNVPc04Dy2A=; b=i7dBO/mpry4Ahoe0TM+SUgSblCPrtyngXuIivRESnoDBBt1SFJdNECUQXIK6OL8WNK dGV0H2hD42N9QQZyeVhZLTwsfoviX5NgFGuDecGAJl7HXHqhDXQ6y3iGfxB4FNI4dMF9 kbtaz2jfagfHaSwJgT7na5oUuHXuwTwHTzlMw5hKsXK2pmIjcarSS7t/9EK75TzNIUV1 Xo7AakK2A8/WDBbS2YQNb0KLtvXUJ5wH7OQKFP0GKlT06LDfuAGkRNsb/tCWbgkuWj3a fXOSTBKWSO9m4LNcVcJVMxeqqFA1WdrQNAOOnnfirSggBnO3B8nDKeSQze7sCF9Y5DfJ ErYg== X-Gm-Message-State: AOJu0YyWZismVhRCiWBS7bYv2y9jpvMJZrbqO1huvdaHZfGCZIKJNBCS w8Js/yC6grEP1H3Ee3VjJODKJhobC3/syyWeIE+BaORku/rysYnKQdD4PNZ7iKBIewchuR6YXRT U X-Google-Smtp-Source: AGHT+IFxWzB7XYj76ZmgG7/k90Mb5LGOtdXXbEMGIcGV/r7/OexQes18OKRKEZHBcTU2JviVyqVE/Q== X-Received: by 2002:a17:907:e8e:b0:a8d:4954:c209 with SMTP id a640c23a62f3a-a8ffae0018emr47262866b.22.1725967723340; Tue, 10 Sep 2024 04:28:43 -0700 (PDT) Received: from m1x-phil.lan ([176.187.217.32]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25833c90sm468921566b.25.2024.09.10.04.28.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Sep 2024 04:28:42 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Brian Cain , qemu-trivial@nongnu.org, Anton Johansson , Alessandro Di Federico , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] target/hexagon: Rename macros.inc -> macros.h.inc Date: Tue, 10 Sep 2024 13:28:32 +0200 Message-ID: <20240910112833.27594-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240910112833.27594-1-philmd@linaro.org> References: <20240910112833.27594-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Since commits 139c1837db ("meson: rename included C source files to .c.inc") and 0979ed017f ("meson: rename .inc.h files to .h.inc"), EMU standard procedure for included header files is to use *.h.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented in the Coding Style: If you do use template header files they should be named with the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are being included for expansion. Therefore rename "macros.inc" as "macros.h.inc". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Brian Cain Reviewed-by: Anton Johansson --- target/hexagon/idef-parser/README.rst | 4 ++-- target/hexagon/idef-parser/{macros.inc => macros.h.inc} | 0 target/hexagon/gen_idef_parser_funcs.py | 2 +- target/hexagon/meson.build | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename target/hexagon/idef-parser/{macros.inc => macros.h.inc} (100%) diff --git a/target/hexagon/idef-parser/README.rst b/target/hexagon/idef-parser/README.rst index d0aa34309b..7199177ee3 100644 --- a/target/hexagon/idef-parser/README.rst +++ b/target/hexagon/idef-parser/README.rst @@ -138,7 +138,7 @@ we obtain the pseudo code with macros such as ``fJUMPR`` intact. The second step is to expand macros into a form suitable for our parser. -These macros are defined in ``idef-parser/macros.inc`` and the step is +These macros are defined in ``idef-parser/macros.h.inc`` and the step is carried out by the ``prepare`` script which runs the C preprocessor on ``idef_parser_input.h.inc`` to produce ``idef_parser_input.preprocessed.h.inc``. @@ -266,7 +266,7 @@ in plain C is defined as #define fABS(A) (((A) < 0) ? (-(A)) : (A)) and returns the absolute value of the argument ``A``. This macro is not included -in ``idef-parser/macros.inc`` and as such is not expanded and kept as a "call" +in ``idef-parser/macros.h.inc`` and as such is not expanded and kept as a "call" ``fABS(...)``. Reason being, that ``fABS`` is easier to match and map to ``tcg_gen_abs_``, compared to the full ternary expression above. Loads of macros in ``macros.h`` are kept unexpanded to aid in parsing, as seen in the diff --git a/target/hexagon/idef-parser/macros.inc b/target/hexagon/idef-parser/macros.h.inc similarity index 100% rename from target/hexagon/idef-parser/macros.inc rename to target/hexagon/idef-parser/macros.h.inc diff --git a/target/hexagon/gen_idef_parser_funcs.py b/target/hexagon/gen_idef_parser_funcs.py index eb494abba8..72f11c68ca 100644 --- a/target/hexagon/gen_idef_parser_funcs.py +++ b/target/hexagon/gen_idef_parser_funcs.py @@ -50,7 +50,7 @@ def main(): tagimms = hex_common.get_tagimms() with open(sys.argv[-1], "w") as f: - f.write('#include "macros.inc"\n\n') + f.write('#include "macros.h.inc"\n\n') for tag in hex_common.tags: ## Skip the priv instructions diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build index 9ea1f4fc59..f1723778a6 100644 --- a/target/hexagon/meson.build +++ b/target/hexagon/meson.build @@ -284,7 +284,7 @@ if idef_parser_enabled and 'hexagon-linux-user' in target_dirs 'idef_parser_input.preprocessed.h.inc', output: 'idef_parser_input.preprocessed.h.inc', input: idef_parser_input_generated, - depend_files: [idef_parser_dir / 'macros.inc'], + depend_files: [idef_parser_dir / 'macros.h.inc'], command: [idef_parser_dir / 'prepare', '@INPUT@', '-I' + idef_parser_dir, '-o', '@OUTPUT@'], ) From patchwork Tue Sep 10 11:28:33 2024 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: 13798367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D68AEECE564 for ; Tue, 10 Sep 2024 11:29:46 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snz3M-0007xC-9U; Tue, 10 Sep 2024 07:29:00 -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 1snz3F-0007tn-Pz for qemu-devel@nongnu.org; Tue, 10 Sep 2024 07:28:53 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snz3E-0003Ql-0X for qemu-devel@nongnu.org; Tue, 10 Sep 2024 07:28:53 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5becfd14353so5183913a12.1 for ; Tue, 10 Sep 2024 04:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725967730; x=1726572530; darn=nongnu.org; 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=7IJQz062XEcKffx5qVwimty50F+XhBG7KCKIdS+RdzI=; b=tod/dAOe9RXC2QPs8KRRIJFPfVln6pfWNVHzJN7GYDFKyORfqOzg3jAcq8o/m9DTjL I2C3/g7sjVhsmjDXUG44Pz17PMFutc1oGmsbLSf5glc6/LRvF+6G0Z4MZ3jNDoNstl9c 8b4zumHdEg/hq9YPvfP39k9n1tsJ/op6UZ6+aD34NGZTWCSOR3w23jw3E/2fjiH8gaqW aie+QwzwxsimvlEVk8rXkscWx6lzCKXPbRA3UCL4exXbZhY4YXaYckzBEzNBxf2B7tY7 ndwyg7oumvU0eojUzUZp2lWbPOfmOUN80nItqGFzRGMOCPvgnE6sI0q1JuDOkLvYd1jE ee/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725967730; x=1726572530; 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=7IJQz062XEcKffx5qVwimty50F+XhBG7KCKIdS+RdzI=; b=pXkJdzwm8V6cqjdtUlgcGotBUNjfsHDpW5EO+0IpkFAvp7EkpsnDRywl+Ms0gl3kKw g1ojPflGbxYdYzZYRuQUbYomfkPLebQ28rxmRokRsSn8koqXXk4RzyAkLZWwxOKXM95c k5ekpQ34H7c2NgOpmf4657E7qHFf608rS5MARyuOSukCfab6mZI4RoNmXB65TVoRFIvv tpsTwEY+kEeB8lZ+FnmsB8PU6MqCouUL5tfdcPyQTZ3RcsaWI/Alj8jB585lURfdck37 1y/hAg4tpXyC5pEhoiJIifVc9rDBvcMUuZViVkXSbq3tSrMTuZXiXEwAchCuvIM14JiL wHow== X-Gm-Message-State: AOJu0YzYRpb1TT7efc80fr3Z2muInk5ZOMWBfgKwssOYN0gH4TzCySrI h6cmDO0WdkcSh1Ufg/ulc7yEdUw7VcpIwvD3/99pRX5AomXHdpJDFm6cDP7PBYjBGvIJ8j83Y4J d X-Google-Smtp-Source: AGHT+IFJx9ZYaXhA7CsNHXFW5t+enU0rDqsDQwXZzYNe6Wm9vw3DlrUA+sRGnzf1FmPkn0oymjVanQ== X-Received: by 2002:a05:6402:5419:b0:5c2:54a3:6b3e with SMTP id 4fb4d7f45d1cf-5c3eac064a2mr6508715a12.16.1725967729845; Tue, 10 Sep 2024 04:28:49 -0700 (PDT) Received: from m1x-phil.lan ([176.187.217.32]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd520cesm4111925a12.50.2024.09.10.04.28.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Sep 2024 04:28:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Brian Cain , qemu-trivial@nongnu.org, Anton Johansson , Alessandro Di Federico , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] tests/bench: Rename test_akcipher_keys.inc -> test_akcipher_keys.c.inc Date: Tue, 10 Sep 2024 13:28:33 +0200 Message-ID: <20240910112833.27594-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240910112833.27594-1-philmd@linaro.org> References: <20240910112833.27594-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented in the Coding Style: If you do use template header files they should be named with the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are being included for expansion. Rename "test_akcipher_keys.inc" as "test_akcipher_keys.c.inc". Signed-off-by: Philippe Mathieu-Daudé --- tests/bench/benchmark-crypto-akcipher.c | 2 +- .../bench/{test_akcipher_keys.inc => test_akcipher_keys.c.inc} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tests/bench/{test_akcipher_keys.inc => test_akcipher_keys.c.inc} (100%) diff --git a/tests/bench/benchmark-crypto-akcipher.c b/tests/bench/benchmark-crypto-akcipher.c index 5e68cb0a1c..fb88106a0c 100644 --- a/tests/bench/benchmark-crypto-akcipher.c +++ b/tests/bench/benchmark-crypto-akcipher.c @@ -16,7 +16,7 @@ #include "crypto/akcipher.h" #include "standard-headers/linux/virtio_crypto.h" -#include "test_akcipher_keys.inc" +#include "test_akcipher_keys.c.inc" static QCryptoAkCipher *create_rsa_akcipher(const uint8_t *priv_key, size_t keylen, diff --git a/tests/bench/test_akcipher_keys.inc b/tests/bench/test_akcipher_keys.c.inc similarity index 100% rename from tests/bench/test_akcipher_keys.inc rename to tests/bench/test_akcipher_keys.c.inc