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 lists1p.gnu.org (lists1p.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 9EE7ECA5FFF for ; Wed, 7 Oct 2026 20:36:23 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xEYN2-0003aW-0h; Wed, 07 Oct 2026 16:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xEYN0-0003aF-Lb for qemu-arm@nongnu.org; Wed, 07 Oct 2026 16:36:10 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xEYMy-0004NZ-Rs for qemu-arm@nongnu.org; Wed, 07 Oct 2026 16:36:10 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 697JNrHp1650955 for ; Wed, 7 Oct 2026 20:36:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= tincLlY51BeBIO8WOMtjDuc7KZgNUNib8lMdX2hKPyA=; b=pD/lEXFJHmskFGd6 SZ9/ICNLurhdHV7yR70cZqsASixuUN+HlKzR50ixfgP9b6ZC83To/06jDkiZ3bqO DfoMRlOy8iPZfJ8dzeDuLAVzd7rCOymb1lhTM21MxIJEdzMgXmfeeDzLVJUTJBXp XsKwNqCpYMrXLtL1pKphEx/E0Pi0Z80UHkAzxDFlRNUWOXEJplo8N3785neEuWxS XUXuXesDfWac2Is+SWnvDZJE2nbNqsotFF1p4Ab5S710o3Vk6pq2WQBEftM/Hkdh rfkNsk5sarosVOLioN7rkiIUxGavDS0rObHZ5QbOzkSpy6ZesCcb3Uh3wt9IHDNO 3kSYdg== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4h5fc5bch6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 07 Oct 2026 20:36:06 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-3516711cce6so905858eec.1 for ; Wed, 07 Oct 2026 13:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1791405366; x=1792010166; darn=nongnu.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=tincLlY51BeBIO8WOMtjDuc7KZgNUNib8lMdX2hKPyA=; b=NxGRTNe7an0XOqIXTv+BhMTPKZXUndhJmdMHIFUch1xOFVjDgyyxJkX5TeMuN6SfFj HscNBW1MD2Eev82tIO6JGQ0SWTKYESADDLiYYnjLBV7D64kvR9MpQaOkP8Y8GxqR/fCq PpXC70pH+YAoKXVbBBjXUtZR3IODg+iPnsPC91dVNLzNu8eq1nZyQV6C434uT4CCY5cU Z9Lzs+tBmInfgxP5YM/dH5kRm+Lp6o4RRXummT4VjDbpFyvaP5ZrmDkeQLFnu/VFHXil 54mrTmLEq17qZ80wzzV/1S4rnCul3gvPsR7Q0iWYx546+Q0RVXLCohC6QepHOdetRPvw L2Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791405366; x=1792010166; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=tincLlY51BeBIO8WOMtjDuc7KZgNUNib8lMdX2hKPyA=; b=f4tuOsy9Y3ZaHnPJnNMC8BmORS+FAiyvctsaSAo7vdndB/vvloYmVbs3gkpA0TTeYB TcLVPn8vGf9txwr8tefca9kS6NZHqnLm1opld6SzgON095k5xcNGhAv938CLeEbCbWDQ wEMU9Oz/CIggw0fwG3Dn19Y8HUvOykN0OgscCn1Bipe1zMDXXKwylhnIjjB+uvqPyqL8 /HOqCVlogLuGowHFTfUZTwU7rc0qaL4PknDPvcA40+n0PMNUieQjJulYknrvAZ2GYdRl X9Zc4acHDHveUyS3PkTOnOuKf0ZelAtxUa+pJed3N/p4QVTT9+e7My9u2lB7f5g4FVHD rKTg== X-Forwarded-Encrypted: i=1; AKwUvBx8XvGuhwK1zGogZksYksyEKAiRLDx3n6Lt2Dd5b6ubfla5rUXvajUmhMJmGX/8fcAWxxfRWBBRFQ==@nongnu.org X-Gm-Message-State: AFuF++klv+qWQvh5HxjjnwEv+xEMr0eUujfds54nrYpwZcJ6fZCk14yD hwRPUiTmGxZkjP26pyJ1wLi3DQ0wj1VcY1WBCw1o7P7E8c7QimvhdL/yTdOeMq+Ij2ES2riFjfj 27kg5hpvYdwF7uFH3gnA9hL0dZEO91cwfrQgvJiS8uzTU5yhOgQUPOV8= X-Gm-Gg: AYBFou3cZokrYzLwnVuyi1UhnQcZL1tzrZ6dqq/E0XSWVf/iud98j0oWx78x0iUxK26 5rSR/P9Ookjelr4ZiuYZvuUVvOnZ8DdSaPNdQC3pmJnnGi8iDJ1ls2jcmADyHPcSYHgdNmEsNqG EMvVi6kI+5TlzyVatP1BpDAz4DctPuCxWCn9lI68FTNrC+7lbGvKgO8u0Du58KtRvF+4JiDzHX9 BZDYSFosoEyia4LbCQwGroaWgdLcv3C8i5Vvnww/2CWl4J7BQR7IsDuFpEDkJrNUiWgx+eKQjeO /kTJ3tSzNFHwo5E7RoOKoACMHu1Vt29yld7+mXlCrblRpMjJto/P784/9PfzDwySpUGPamwHeC8 6kYcGuwNzLG7gBXhvIOyBNuVRIDPQ6wj9XKzG2GoHx2g9XjTmLywITFkytbm0gVMXysedSA== X-Received: by 2002:a05:701b:270e:b0:144:eb3f:563a with SMTP id a92af1059eb24-165a64014d5mr311723c88.15.1791405365870; Wed, 07 Oct 2026 13:36:05 -0700 (PDT) X-Received: by 2002:a05:701b:270e:b0:144:eb3f:563a with SMTP id a92af1059eb24-165a64014d5mr311691c88.15.1791405364944; Wed, 07 Oct 2026 13:36:04 -0700 (PDT) Received: from [192.168.1.199] (192-80-163-190.dyn.novuscom.net. [192.80.163.190]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3515afa61e8sm10632193eec.22.2026.10.07.13.36.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Oct 2026 13:36:04 -0700 (PDT) Message-ID: <51f90aaa-e37b-490f-a207-a31f14407df8@oss.qualcomm.com> Date: Wed, 7 Oct 2026 13:36:02 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 7/8] target-info: Replace handwritten architecture checks with generated code To: Yonggang Luo , qemu-devel@nongnu.org Cc: =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= , Cleber Rosa , Stefan Hajnoczi , =?UTF-8?Q?C=C3=A9dric_Le_Goater?= , Laurent Vivier , Zhao Liu , John Snow , Laurent Vivier , Richard Henderson , Joel Stanley , Fabiano Rosas , Kane Chen , Andrew Jeffery , Troy Lee , Jamin Lin , Stafford Horne , qemu-arm@nongnu.org, Philippe Mathieu-Daude , Peter Maydell , Paolo Bonzini , =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , =?UTF-8?Q?Marc-Andr=C3=A9_Lureau?= , Steven Lee , Alexander Bulekov , Darren Kenny References: <20261007115253.328-1-luoyonggang@gmail.com> <20261007115253.328-8-luoyonggang@gmail.com> From: Pierrick Bouvier Content-Language: en-US In-Reply-To: <20261007115253.328-8-luoyonggang@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYxMDA3MDA4MiBTYWx0ZWRfX5WkJdaSZHY2H +g/6D9R+udlvWlaRer8sfwZEcLi4pDQnEETQXnCIpduNkhPLvqJmqcORzhhUc1vmTV2QQaNZv1t yK5nA+AIz3ZhQGNpGjtvpQjlDOMr9cs= X-Proofpoint-GUID: Dd6THKaOx9YJYW2dX1s6Yc3xS6Hwl0f8 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDA3MDA4MiBTYWx0ZWRfX8o8iRTffgqdP 41zZUnODYWuKvx7ZinrwEfNT55aF6r//IVFeSEGetgyMdww12jeZeC07g3HAdkPzSm3P7o22K5X H2SBlngKSfnWFYyP16d+CZopdzq3wo/2eG4PQE4hhrjGrVRgPE5kYV/uqaZPVhQc/pI3aY/q/kO S38znUKVoA3Hvw3NOeUsAxu7JuzOY+td9j4P9ZbHYemzckgCPY2gyVwvUrJiR8Cb5AmyR0SsVk3 AzZ82KhvaiTuUMoAhqJMFZ1bsJQMNhZ+Rzw7J2AMUuSwmUJE0LPwwQ31xMJzGFPmBG2J0MozMM6 57cnKamIYc1F80BC9Oz0p6/+mRJ2Uf6E98OFydm5Xq7G01XeuMkB3QpgSFe/OPo4OJj/llTwRHk Or41079lmsvm3wMP+hqluKpVyurewFx/+W7daI7perp1y0lqcf243SknujtnQK9JnsOo3Ml4d7r UQffDMLfjPPWxLcSU8Q== X-Proofpoint-ORIG-GUID: Dd6THKaOx9YJYW2dX1s6Yc3xS6Hwl0f8 X-Authority-Analysis: v=2.4 cv=a6+lZkSF c=1 sm=1 tr=0 ts=6ac6ad36 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=9852oil1ID9t5xBSyQ/BEA==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=pGLkceISAAAA:8 a=LWoprZIH4OQ42_rLm-wA:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-07_06,2026-10-06_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 clxscore=1015 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2610070082 Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@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-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org On 10/7/2026 4:48 AM, Yonggang Luo wrote: > Add scripts/gen-target-info.py to generate declarations and definitions > for exact-target and base-family architecture checks from system target > names and their TARGET_BASE_ARCH values. > > Provide target_is_() and target_is_base_() checks for an > explicit TargetInfo. Retain target_() and target_base_() > as wrappers using the current target. > > Wire the generator into Meson using all system target definitions so > the available checks do not depend on --target-list. > > Signed-off-by: Yonggang Luo > --- > include/qemu/target-info.h | 76 ++++------------------------- > meson.build | 16 ++++++ > scripts/gen-target-info.py | 99 ++++++++++++++++++++++++++++++++++++++ > target-info.c | 62 +----------------------- > 4 files changed, 125 insertions(+), 128 deletions(-) > create mode 100644 scripts/gen-target-info.py > If I had to pick between simple and manual boilerplate, and a python script generating C code, I would tend to choose the former. In this case, the set of targets is bounded, so manual code is really the way to go for me. If the repetition is really unbearable, macros are a way to deal with this. However, note that we will not need all the target_X to be defined, so I would prefer to not see any new variant added as long as it's not used. Regards, Pierrick