From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772150; cv=none; d=zohomail.com; s=zohoarc; b=apQbjcPEc9g9MrtBouByA5P2bOwaR8GlYFGzTw9gA8bO9k9XrY45p7D6UTy/8VhQj+LRF6/81Qb/D1YVVE/GK8wXXGxvtiQR+25XhcdM1MsKGTtXGt00OXEEm5tHHPoS+UB2czafPPI6HQWP1A1aFhN/GZ1UZlXXaslKFJOn6+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772150; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=BtNk5J68yc+OQqfv2wRsl+/eO1+Dbsy+IlAZdqdOsuM=; b=PUmIVZ8UyXL36+XGpk5jftxx+y1WqyTqJF0R1rDt2UaRrNWwBaJoZC+5p1kEt7ALonKHu+gT8H6MFpp8HeynK9Lp+BoYwNapoAzoxjBmZzCL2CXJG/QQpfj8SabRAKdz/CWCEybTj76G8Cw5OOgCwGVgP4i9OsdN2AXaPeb5aPI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772150176686.5372682519836; Fri, 23 Oct 2026 09:15:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHts-0003oJ-DF; Fri, 23 Oct 2026 12:13:48 -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 1xKHtq-0003nq-Lw for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:13:46 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHtp-00024G-3N for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:13:46 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6Cqf2215811 for ; Fri, 23 Oct 2026 16:13:43 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc810e-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:13:43 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f2373e9b4so112803585a.1 for ; Fri, 23 Oct 2026 09:13:43 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a30764e9e7sm12438955e9.2.2026.10.23.09.13.40 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= BtNk5J68yc+OQqfv2wRsl+/eO1+Dbsy+IlAZdqdOsuM=; b=IRfELSqCS5tKFEIo n13vs60Us4rQSK+EQhn0yCBOUtEZ/pSNzY/ACoSksSN9u6xtmjsw3hsmc7donQ0j gJNXhCnZQkZ43pvsYp6Kd3oahcp2PoVC1YLYV4rFVtXrmbgSg5+ci9rZcfHs/dRU ZjOajwJ9XrNQYg7w+pDcbzTpfH81z/V/iK527MJEfZzSUfw99cEXeAuoJa9FWVpC 6I+QjoygRp5VvsKBRK+EsatOl+16lD5JDzq6Xf/1lE/hS99RiJGHAo3E2OtT1JAh K1qpBO6jW+nSv6Dpq4RWiccf1gJDX/imK/hQB+3K1Ou9WXbScwmIqvSSCf0CkydV p2z7BA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772023; x=1793376823; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=BtNk5J68yc+OQqfv2wRsl+/eO1+Dbsy+IlAZdqdOsuM=; b=cRu/dgyxRITLz1soLA/uaB5IliKJYWD41XzQkECeYF2j/0bRJEUsCwVKUeps/oSp+W cOULJP5cGVFP6KLvs29xn4y5hxXuFj3e0OnbYO86rUUeSdYn82UAgCLpAwO0lHNNqo06 HsDEYs8vLa+KiWNYUvr9MTEtNdJIlJuI02ChTTZPnQIdRXbCOVsw6CxDt05X5gznbG9H 410jlVBNSe1IvyfNIKiD9VR9zJ40CYCw1UgwU5rxP22zYXKbYHms+iF8dpr0lXcVsZq+ 6XosSwZoi8e3eoIt8P3OM6DqDH22r1Vsu1B+c1HK7ABoTRuq3Li2lFAwty+yfgemvaSr yf6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772023; x=1793376823; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=BtNk5J68yc+OQqfv2wRsl+/eO1+Dbsy+IlAZdqdOsuM=; b=B2kP4ByzeuCBApdP1RWtFGjlyR9zE2613wrvLTCYm6IKujiFK75GEHSvQgD6Qa9kIF jN1EWHvN73GXm76BmsA0kPOr/IGWeSjeJCVPz7vPMwa4yGKW2lu8ukpQB6XNx9IIsLe+ EB7fvA23f8caaqa+oWTSFMgYqSUgOkhWlHrc5hLVc3LXp8Ix6AhpFXDruClqLaV9v1wK jhidDSVEizzH5A8ADh7b1/9oy1dZUrDw8uZ/KBJGppwEvO5Gq3F4IfUYk3mTUP/oZzgT dgMenSxG154Qh72ASqD/NZ9O60M+KbZPUyUFgpPvK10ZcWARlt3IS1A+Hl6ty/pz0YQt ilAQ== X-Gm-Message-State: AFq9FYLkNHjg1RsFhftmexvUQ8GgQw+PXio25smMoRyTYYvWFZq4gmPH 3HD2SXUPERfaaqefqH5aXybfAPGEruXBMhiKBSeGVEzmpl2otc1HYOXm0r1JaKRuQKN7qwYKAwg wL9sCgr4ZxUtLfBygA4qnlZG/0PCnnTBgTS7CAgCkL3b4loOmMxLIAQ7FSKRq4oAXQhrG X-Gm-Gg: AYBFou2nDou1zLbEZ1aks6z3XcZjKk1ukj0NLtgs754LAt0xJKVDd/LPwgRWV7q1BpP oy9M9PnnM4viyXks6nHXw7X9YlUabS/AR+iEoWjCtLa54kTuuVjcuudcuyy3wQ+YQeElgSqMDCs yKOJHwGuu0CXyrBTAWDBJrOS6ogb2RB6TAgZ80Jq/0juOcvhK9Gngal33zdeJ28r1pty36jTfcz CGioIsnoW9nxfok2j2Aag8Ccp1XqIbAtmuwNMIYIShMHUvtayHdcVE/YknSS338g9yIAY14rzjH Z9wy3ccP4SmXq8/0YXUvBHSvcpt8mNe8H/87++ILCIGeEASKaVpB/V9fMJXTsEzlljy2pidFtwi 0g+3tGLewbIbVdMGA2CZ6mCGQ34x7Cdbvr6mBVb/m X-Received: by 2002:a05:620a:2795:b0:93f:a7e:e0f0 with SMTP id af79cd13be357-93f6fa1fb08mr447258385a.82.1792772022714; Fri, 23 Oct 2026 09:13:42 -0700 (PDT) X-Received: by 2002:a05:620a:2795:b0:93f:a7e:e0f0 with SMTP id af79cd13be357-93f6fa1fb08mr447255085a.82.1792772022066; Fri, 23 Oct 2026 09:13:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 01/83] accel/tcg: Refactor poll-while-halted flow in cpu_exec() Date: Fri, 23 Oct 2026 18:12:09 +0200 Message-ID: <20261023161332.60153-2-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX/Mwo2BD4L9q0 YL6LRuVfuwWZ3TPzSyFIe7xK08ze2XJ7ai6412vTSeYfpDBFfK5B7UG5GZoPeMpIiZpuVm+qTmC 57QOrJYZJKnfBWh45CowytCbvxWcYSq9rcmVT3Hzfu2yqc96KUumYjARrK51jxb3dvE0kyAuY26 y2FYEkhvpAyUuVkP0WKaTWPoGGy5fXyrhqeCokkMK/VvC+6AR2tprbxzkBTxkEluqU4dxZHxgpq LIN3VNNbhv+fmra3nLvAgJxk0fO+BnOlE8e0K1jdcZXeYq0cqMGMd+dKSoJWFhb3EH7uVAyKVzn cGPs/u2t0o1mrWrI5kOQyfds5LFXNOTjp4PDsIsrlpkXtNjZYzXT9zKyJVxKuQQssLu0gsGwOAB KDGIF+cycRv2xZ2zoVKnBuqrxd1TYh1AViELv518q5CInu0Orz6abh98sSjBjq+uKoo5kktu0gC uCs0jOOQbCXNkZ0r51Q== X-Proofpoint-GUID: qkd0Tav5K5QDp9LxB1XeXl5o14mCl-ge X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb87b7 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=xF3Xt6V14tk6trZ56bgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=O8hF6Hzn-FEA:10 a=PEH46H7Ffwr30OY-TuGO:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: qkd0Tav5K5QDp9LxB1XeXl5o14mCl-ge X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX9wr02+xHmdJp j4mqFrSzWZ73m9rob5hAZ6V6WSYGCMbiHkb2DFnBmGbAloWtCm3RS2kL6EhryOCbTJGw+SWEDXc /5bjn6IlHHAkZXZC65zWsR82FlY9sYI= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772151765158500 Invert cpu_handle_halt()'s logic to read in cpu_exec() as "if halted, poll for async events and find work; if no work, return". Rename as cpu_poll_while_halted(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20260930174946.82195-2-philmd@oss.qualcomm.com> --- accel/tcg/cpu-exec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5b4bca5084f..853c4b2f67a 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -656,18 +656,18 @@ static inline void tb_add_jump(TranslationBlock *tb, = int n, } =20 #ifndef CONFIG_USER_ONLY -static inline bool cpu_handle_halt(CPUState *cpu) +static bool cpu_poll_while_halted(CPUState *cpu) { const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; bool leave_halt =3D tcg_ops->cpu_exec_halt(cpu); =20 if (!leave_halt) { - return true; + return false; } =20 cpu->halted =3D 0; /* allow execution */ =20 - return false; + return true; } #endif /* !CONFIG_USER_ONLY */ =20 @@ -1029,7 +1029,7 @@ int cpu_exec(CPUState *cpu) =20 #ifndef CONFIG_USER_ONLY if (cpu->halted) { - if (cpu_handle_halt(cpu)) { + if (!cpu_poll_while_halted(cpu)) { return EXCP_HALTED; } assert(!cpu->halted); --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772089; cv=none; d=zohomail.com; s=zohoarc; b=LwBo+1Qy4Js5YvXd714iYHzbqRuYYTWqetyosWAEMXxBdkrr3lE/qYsM2x048+JdNUMKrpF3xuWF84N066uBsTh4vAGvD0CiAVqCZn+3pwFWaugtEkLZ5AdsNi2wwNfKYU9lDFmyqRnJYsMacJ9BTyIYeKlApbF+4CZQ91ECeRk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772089; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ghyi54x7016l+OJN9TsCoDTp/Xdc0pg6+ZCI5lLUi6A=; b=GT1WWG74f5YkiwEVpBc/M15JGbyJ/DZ7On+eooinkLzOhUyf7DyrIb4/WyTPqaEJ1ClwPXuq0gPxB1n3+q9v1M2gtzoSo0l7EVKUAZ4XYSQeeFWWwevwclYJuRlqyzD3PyDwh/XEnum1frbDiQaIWsIS/Z8D+Un1TSjFp2VVWtc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772089579689.4027820532524; Fri, 23 Oct 2026 09:14:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHu1-0003pI-7b; Fri, 23 Oct 2026 12:13:57 -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 1xKHtx-0003of-Fc for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:13:53 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHtv-00024Y-Pa for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:13:53 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6qst3001100 for ; Fri, 23 Oct 2026 16:13:51 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7cn0vhw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:13:50 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93cb6391e89so229175585a.1 for ; Fri, 23 Oct 2026 09:13:50 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312eafc80sm18139015e9.3.2026.10.23.09.13.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ghyi54x7016l+OJN9TsCoDTp/Xdc0pg6+ZCI5lLUi6A=; b=WtrSlI0mFcXsQD6b 4WEpQMbwYMVssaSFrGy5Qe0NLU/P+j/sU8Vy9zIb1Mp7SD2zM0fLfPMYq4OvWqF7 K9UddCp1wjhgO7om8r6AtSL/Ylld0/sLl1UK9PDfDZVxU3iGWLM31GGbsItMR6SP cp84Rde5Cay+7Bt8IZk7r4yn4aAWlmWAwUXfoie8skqzkNJvAch8d5N1mLqBXye5 7HnYdsuphMj34Y65q49RDsV5txvf8vlE6W6frJQiNbVR8bGtqnAmv8PaqOl3F4EH oABoaEiqlEm8jkJDYjyJV49PyGgOXc9UvshshF7G0um1DFRwirZ7TZr3QWvPIkXE JsTFvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772030; x=1793376830; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ghyi54x7016l+OJN9TsCoDTp/Xdc0pg6+ZCI5lLUi6A=; b=K2Ia2LDv4Yebwo1eWLorSvygiKJbZCI8K0xeEG/ZuqxMYsYvvkBB/gFrH70z3U4hGV Oq9JQEzRpTphfGqKL9T8mBKgWCzccNXKNIc1nFN3pgR/CD0TwqQFCr+w4foxbIMo6eu7 tQevExxlAni2aPEDv2Nj8L+4uVXaOILASa+d7IasUt1eME9W7HH1/cmBufY8VuhJM9Fg BdnXOrDUVORaoy9ueGYRzlDZ2BNnOWkrtwfcrsYvQq3RQxoa1IeTNZAJ0zGroiQ/gQb6 a9HH1kXN14w1Wg6RcvewoQR5gJ3iFcUWoyaYLLoEH2OaOKMFd1MRFU/Yhiv0Oqjuk4oY myFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772030; x=1793376830; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ghyi54x7016l+OJN9TsCoDTp/Xdc0pg6+ZCI5lLUi6A=; b=I2SdrtDiLWFogKTpyI6sUAdsRs/UMq0CEJKTI1N98u7h8SZVEOYF+RUD0JV59fvdmA ENE/6jkFGf8RDyoqbdvwwAC/29m+3XD3Ont9S8pF4Sd7aQBEglwBj+SKUcp1v57qoWVk Q3wrdibg7xMUFKZz8E87mfA12K+g/ddLPQvMtpQ3dmZmKZy1YmZLkGCuaKpw7TCDqBH/ 5vF8tV9HEMBUnqsl2ohuTFXFrYIIy+CqNmuZo5bKTsRD0YgWvKw0LUF2Yltbbx8tHxMv BIT3iqI4yyXUPwv6oQSbYvvrGIM0azdkENCSvACDcm3HBsC6V2LNV9Meiu/qjF07wrlT Bnag== X-Gm-Message-State: AFq9FYIAYFeHxmQSb3sekmIlKw1oCBRrGsb6Vc8gmbhif8IXUPSj9ut5 2QT7SlLFrRGBvJNQ3pXc95K6Ad92skaDRqUSZRVy88z1GP3sF3S2HXCc5DX4gJd8BtiCbpFDQFh kkphERG72SZGV9CtVHi65Zu7LKV6ITJiYpWm5kphmwJXmSy9ZK5m7OOvpHpNFjI0yrMt7 X-Gm-Gg: AYBFou255lzJuOSSx40jPUqyFyfLOG0/rTdWU+ejMg1Smxr3ewrDitN4ePMXMK5Brrg Rs9UpqjQcovCk+FK5cgmo0ptVDJ6EPdNsNKKj9is/NtxX/lJaDcZ3BdCP10DVuUAuNhDiBMH7MM 1Ud879w825ySr9beFo0ro3S504BqI3X8n0ABpPIbdHf72wdV5b1+88/xw0xBBbiBuvEDUzRz70p 8U7JMU8YV8WAAddIq36NQbAfjnrw3f5dltZMT3bUA5xTRqQo3fnMfNHsRmQlOZzy1ZgGxiW9RGF c1k96Cz192RI2tHPWf79a8AWsSxHMOYC/Dcabv4afY0V5QDaeTk6C9w83h37wYfLyDfcCoEulqt AVwxK8umbxiJmafrxHm2hy4ZkyUnsrwNI+UUYpRsx X-Received: by 2002:a05:620a:4483:b0:93f:e52:40ec with SMTP id af79cd13be357-93f6f8a5381mr476663585a.81.1792772029977; Fri, 23 Oct 2026 09:13:49 -0700 (PDT) X-Received: by 2002:a05:620a:4483:b0:93f:e52:40ec with SMTP id af79cd13be357-93f6f8a5381mr476657085a.81.1792772029287; Fri, 23 Oct 2026 09:13:49 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 02/83] accel/tcg: Introduce poll_during_halt() and leaving_halt() Date: Fri, 23 Oct 2026 18:12:10 +0200 Message-ID: <20261023161332.60153-3-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX6Z/DjCKq1Ht4 0J40LojmAbiFip4d0w0p/kYwrldCAzDrfp9f/b+wTL1AmAzQdIN4NgOB/hv4O7LW9GJdX2TNQCJ GqZaI8pvBf3uvbJR2kG9Woyruit72bMd1g61MvvXL5zVRWT/uEov9jr+c5ACtp5y6mKkJnRROXb AgahEIr9wOB1OuM6q0BFcYksG6pB1cdyXSXtRppmj1iFulxCWEuCaRt3gFYza5yXzz5TVnoPKU2 yTgU3ndqF9k7TLPa1v3fNo/YkAJQWzfsPyxupiDgsj4RsYG0iJ9jsJWB/UAZw/ZUs8IiyFoQDSh 6ZHLF8Vvl8/hGbzFeFnh3csymLL9HAO7lfH1qAt2FVsS9or95hYaxCObtWoJPghjHzio8cweHdl 8qmjNCczJ8IhJk5rr2pm3ZbZtUCG5uIx+dRrMXCZxslg2xPu9ksZJpSoSMsC30vOTC3crYO0Yb8 Me1aUaPUVnS2idL81gQ== X-Proofpoint-GUID: WFLguwosG9YiOPUgygv00rimbwz4sVqq X-Authority-Analysis: v=2.4 cv=a9mlZkSF c=1 sm=1 tr=0 ts=6adb87be cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=20KFwNOVAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=DbqnPDNGgojIjNu1nyEA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: WFLguwosG9YiOPUgygv00rimbwz4sVqq X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX+geL2RjD8Onq Fnu+TaUqDV9xZW1a57jUbj3Ij7f9/KTB38MmQhSgZU3K+O2UpwPWpEYVe8xW3F+SF+CTUZHx9El Fl9oHg7TwpZ/GR+UHqAqC95WwKwCqvw= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772090688158500 Split target-specific halt handling into an optional poll_during_halt() callback before cpu_has_work() and a leaving_halt() callback after work is found. Keep cpu_exec_halt() as a legacy alternative for targets that have not migrated. Require each target to provide either cpu_exec_halt() or leaving_halt(), but not both. Inspired-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20260930174946.82195-3-philmd@oss.qualcomm.com> --- include/accel/tcg/cpu-ops.h | 24 +++++++++++++++++++++++- accel/tcg/cpu-exec.c | 21 +++++++++++++++++---- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index 3ff6e6810e0..1ee5d3d8bdb 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -169,6 +169,27 @@ struct TCGCPUOps { */ vaddr (*untagged_addr)(CPUState *cs, vaddr addr); #else + /** + * @poll_during_halt: Poll target-specific events while the CPU is hal= ted. + * @cpu: vCPU context + * + * Called when the CPU is halted to handle target-specific asynchronous + * event processing before instruction execution begins. + * The caller does not hold the BQL. + */ + void (*poll_during_halt)(CPUState *cpu); + /** + * @leaving_halt: Perform target-specific cleanup before resuming + * execution. + * @cpu: vCPU context + * + * Called after a halted CPU has detected pending work and is about to + * resume execution from the halted state. This callback performs any + * necessary target-specific state transitions or synchronization befo= re + * instruction execution resumes. The caller does not hold the BQL. + * Either this callback or @cpu_exec_halt must be provided (but not bo= th). + */ + void (*leaving_halt)(CPUState *cpu); /** @do_interrupt: Callback for interrupt handling. */ void (*do_interrupt)(CPUState *cpu); /** @cpu_exec_interrupt: Callback for processing interrupts in cpu_exe= c */ @@ -185,7 +206,8 @@ struct TCGCPUOps { * if it should remain in the halted state. (This should generally * be the same value that cpu_has_work() would return.) * - * This method must be provided. If the target does not need to + * Either @leaving_halt or this method must be provided, but not both. + * If the target does not need to * do anything special for halt, the same function used for its * SysemuCPUOps::has_work method can be used here, as they have the * same function signature. diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 853c4b2f67a..122ad9e2e49 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -48,6 +48,7 @@ #include "internal-common.h" #if !defined(CONFIG_USER_ONLY) #include "accel/tcg/iommu.h" +#include "hw/core/sysemu-cpu-ops.h" #endif =20 /* -icount align implementation. */ @@ -659,10 +660,22 @@ static inline void tb_add_jump(TranslationBlock *tb, = int n, static bool cpu_poll_while_halted(CPUState *cpu) { const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; - bool leave_halt =3D tcg_ops->cpu_exec_halt(cpu); =20 - if (!leave_halt) { - return false; + if (tcg_ops->leaving_halt) { + assert(!tcg_ops->cpu_exec_halt); + if (tcg_ops->poll_during_halt) { + tcg_ops->poll_during_halt(cpu); + } + if (!cpu_has_work(cpu)) { + return false; + } + tcg_ops->leaving_halt(cpu); + } else { + assert(!tcg_ops->poll_during_halt); + assert(cpu->cc->sysemu_ops->has_work =3D=3D tcg_ops->cpu_exec_halt= ); + if (!tcg_ops->cpu_exec_halt(cpu)) { + return false; + } } =20 cpu->halted =3D 0; /* allow execution */ @@ -1061,7 +1074,7 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp) /* Check mandatory TCGCPUOps handlers */ const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; #ifndef CONFIG_USER_ONLY - assert(tcg_ops->cpu_exec_halt); + assert(tcg_ops->cpu_exec_halt || tcg_ops->leaving_halt); assert(tcg_ops->cpu_exec_interrupt); assert(tcg_ops->cpu_exec_reset); assert(tcg_ops->pointer_wrap); --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772074; cv=none; d=zohomail.com; s=zohoarc; b=WLaTUNxGjWNmZmJ9S1/v39DNy9o6+S4kkzn2O5LHHjH9NOdCfXyPYEINBj9DZ+JL1lAGD7ZpLoTAQf2hjpH/pWUblAdcWnoxE4ex4n7nWbyvHv5AN3ViNTS2JSaHoizRLqSswOSY+0zwAGZbQPwXDdq8zbDmu5MwNCJuqXayLC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772074; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=d5GalUR0CbSEpC1GLCKW/ZNqBCp/ZFfGLVsPpJHc4mc=; b=drCk8g5L4czh8FlPVEg/a959gg+VYb0grE0przYinsxGleJrDUMU7GvywlvWn+a+S7O3hZBFtIzd6UoiCVa59VpCzss27f8BCfM1yvfSarUQ15Vpdj4JScH+HM9AOht4a6USpV9YCEc1A5vpaCK9JKb0FmVIAbgTKqPHvSjlFtk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17927720742443.4996184253262754; Fri, 23 Oct 2026 09:14:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHu5-0003pr-Gn; Fri, 23 Oct 2026 12:14:01 -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 1xKHu4-0003pb-8e for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:00 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHu2-00024m-Jy for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:13:59 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG3hfF2931009 for ; Fri, 23 Oct 2026 16:13:57 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas6r1bh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:13:57 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93f5844cb60so192982185a.0 for ; Fri, 23 Oct 2026 09:13:57 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d37ca1dsm994517f8f.6.2026.10.23.09.13.55 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= d5GalUR0CbSEpC1GLCKW/ZNqBCp/ZFfGLVsPpJHc4mc=; b=NrJhFsHdZ8S4k9az TBi0qQw1JraXZJiJyr6HITDzs/ajxnXagXCoSVvBEt4TdaHfWdXPk+dU4MBY+9BU mkVrdk3Y7vE5x1V5pnJcD9C8j7cSKxje5pAoGsoxwy/yhEBj+z+nMkI+omL9vf9K dqH2scotMwZeiOef+O2NaQo1cJsjbKEs5VSqJRcFK9vbCWhQ5zPjcL7cqKPPuPlF QCLZean/ODDT5B6j7/GHuuguK4CdBQLAiA9bSyClSpob6DQ8A1eyFYW6a9+67dQB opGCI1xsRxzK11mIXBZUl+fnySOGWGegqH11iu6f3eDWE2k5GahMRwEWQdc3z9i4 2eTsNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772037; x=1793376837; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=d5GalUR0CbSEpC1GLCKW/ZNqBCp/ZFfGLVsPpJHc4mc=; b=YtmWn5fDa3Lw+nDxdCMLBdLCS8Dg5tvIK42QWISI5bjWwD12lf/60oM8zhV2NZ5Rzp isbDKdOBEJLiDrSUQStWrQ8QsuWqgTsFlHvP/x5AZ4jBUiwYbqG8Pc5pfVdWv06Ggde0 F0IHTwMsH4hZn1CtXphvhnty8SFTHbr4k36xN0zGLnDK6/MHHlp8PiSzzGD354Tinu0s cUKjTuE6HaA9lHJllajX8z1/yfvMnA7xVTbH7vOVwKawtkaKGixHDCfEpFAuiLxm65rg YwyYFjHDln6FXDX7njHcehjH/G/ntL0gisblXwpVCliO//ANFk4YWag+TYw4p+PhnGJ7 wylg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772037; x=1793376837; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=d5GalUR0CbSEpC1GLCKW/ZNqBCp/ZFfGLVsPpJHc4mc=; b=daH2tWOGYaqt+eVFxSbNyzg540daUCGq7qrCoRCaxYx/38bRXPBTJETvFPrI+F6gm2 VNXE3GcCRaZA79Dh88HTfCg2nTURv/Ebok2EOToleocU1mOMaRrfi9auERC76w4iYV6S jTjBQIw3Fl0ukQgD2LchLj2YgO+OJQevIzz1h+s4gbyEokEj3o/7LYa1hY7lC+CWOSVg yxNWBb4ZJ0qy7z6YmR8JBAH1umsPto/BoZ3GqfXZEGqsWx1o8TaSOmxoAynnZrS3heUq nbzcDOakU3aiFsDEi6NONMSlwf5A6FXFHvDR6j3WcHJGC1t0I9SB10UJKyJ6xyyL243k AZoQ== X-Gm-Message-State: AFq9FYKV0wu484xM8tqBVEovVLRPdW0bLlei3uqAl/SJhbf5d38LSDHE thpxUKEQa57TEQhu1SIwNmp6hB93IXRxWaMM1HQu44DxJgQXSLlG02SzZWzHav0KzAq3/8EEZGd XbQg7P8GiUKXMR67bVF1+VGAe9Jwe3l/+I4418tIa9Wvr278DekCVE4XuFENtDAwdX8iZ X-Gm-Gg: AYBFou1TBgT2EvqeZLCVI2OlpTq3M36E7v5DXkCi27K6zgPpmOIAhq0NBuBFpNcUKGd U1F5PH5hTMOSE233hSBoZbFocxT6SknCF5LULtT0Xs+6bag/w2UpkD7rufuOg4xDlp74OlNBVhR H0PTXEp0glNImm7k8ts8qQYkOA6nj16z5o60fqP6aV2jTPH1LkRDnTseNiCsge4kT3GgKXlfNi4 tnkXZ36dCsbJP59xS59rBaRWNAzleBU+rSAuDU54KMS1TOc7LOqHXhXQmL1la/ePAAmGYNbcJUG nkxbu42B6wvlpqde8Ui/EG6ipvafFGRKhd0ebKQQDK7j1a09IyklepwtpCKwmjcoF2fo01Xzhhb OZHcOs/h2P4le24AXHjAt24dBrZR0zmTWEIYB8s+2 X-Received: by 2002:a05:620a:1786:b0:93c:d209:4ea1 with SMTP id af79cd13be357-93f627549fcmr961218385a.24.1792772037013; Fri, 23 Oct 2026 09:13:57 -0700 (PDT) X-Received: by 2002:a05:620a:1786:b0:93c:d209:4ea1 with SMTP id af79cd13be357-93f627549fcmr961214685a.24.1792772036577; Fri, 23 Oct 2026 09:13:56 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 03/83] target/arm: Split leaving-halt handling from arm_cpu_exec_halt() Date: Fri, 23 Oct 2026 18:12:11 +0200 Message-ID: <20261023161332.60153-4-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfXxR7fO4tWjeJS itJPNxzm4F+fSMGli0aSKI9lM4SyLhOn3HWhHI18tNBIKJrThhNFfu2S5MXWXOCIGEQwEZABcgW UMgPY2QP9jyn8qGlkeCW/K+R70q3K7+2Txsw8iG81DsWzs2mt4oFb6IIZ2xXo3noqdOJmuALiYn EnRStqbw5lmPMuGiP0Dq2eC134zbEA1uG+c9XwGLjmX2BQkjcekTQhk6F9vBR9OyeqaxkkMzoZw LHPLzKqczLSPR55ZbrYw4sODSukyMzd+bQzieK+i69QhCmbsYMbC38Iteq75oC7S+KoAH6P27vi rfsFYS8d70nuWmp5OWZdZ1GgsM3ZKrzre+L1auZvPUFfz6as7+7gHHFj+YBRBsq/GeQxQmKTcTo h64DUmo57xROtEzMjXCoXuu8lLtUXEdaaSP4bHHH/RECKNCGQtUeYO5rt2M9zbZtyfPGsYAd0EY 9D++DkTHapiVrb4Ftpw== X-Authority-Analysis: v=2.4 cv=DK0acCNb c=1 sm=1 tr=0 ts=6adb87c5 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=snbnvTbt-5-dSQZ-83gA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: Z-zrMdKwXTDJOmNx3EMMj1t5o7ql4lPm X-Proofpoint-ORIG-GUID: Z-zrMdKwXTDJOmNx3EMMj1t5o7ql4lPm X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX0YJbHSsZ3e3G to0+v0Yd6o1hCwDpwXq9GjWtkonsHBU5EUwy+JvXnRCAH70N5fM7NsMM3VUJQ07yd4khqfUQDVT wapxS26lCxBJatky+LdpPgUPTY8CmIE= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 priorityscore=1501 adultscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772076340158500 Move WFxT timer cleanup and halt-reason reset into arm_cpu_leaving_halt(). Keep arm_cpu_exec_halt() focused on deciding whether the CPU can leave the halted state. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20260930174946.82195-4-philmd@oss.qualcomm.com> --- target/arm/cpu.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 73fdc6e460f..af0c64d196e 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -872,18 +872,24 @@ static bool arm_cpu_internal_is_big_endian(CPUState *= cs) } =20 #ifdef CONFIG_TCG +static void arm_cpu_leaving_halt(CPUState *cs) +{ + ARMCPU *cpu =3D ARM_CPU(cs); + + /* We're about to come out of WFI/WFE: disable the WFxT timer */ + if (cpu->wfxt_timer) { + timer_del(cpu->wfxt_timer); + } + /* clear the halt reason */ + qatomic_set(&cpu->env.halt_reason, NOT_HALTED); +} + bool arm_cpu_exec_halt(CPUState *cs) { bool leave_halt =3D cpu_has_work(cs); =20 if (leave_halt) { - /* We're about to come out of WFI/WFE: disable the WFxT timer */ - ARMCPU *cpu =3D ARM_CPU(cs); - if (cpu->wfxt_timer) { - timer_del(cpu->wfxt_timer); - } - /* clear the halt reason */ - qatomic_set(&cpu->env.halt_reason, NOT_HALTED); + arm_cpu_leaving_halt(cs); } return leave_halt; } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772068; cv=none; d=zohomail.com; s=zohoarc; b=MwpVKnlVMrypiAtCdGjJy2CMLjaic1UbvRZNklr4zXcDonEtccLGGjH+jVLYk7JII3SbL4fs/mu0kkzfW1g8FXc+guE08TyYig0vax7oBK4/c27jZMeiuNdh4ctQT0tOJjYLNyD+5TMX3xB2iclx86Y7NvtcUcOq4i0PNk8I1mM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772068; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=tdwGQb0aM+NgFUeVe/gbj55Onpockxz5WXDTMIYn9B4=; b=ETU/2pznBQnnwH65UIbqa/xqH7IpZbYxUSU9LjBeyrTy0tAJPcl8hzO528ZGSj+BiegWBZzdeZKTBeF2gpbnkPNNKdyeWK736r0ALBglGHPr83C8BQ68JMG95uZCNSI5lLlDWSVAKNWzN7PHUcsr/DzHuhf6DBFuspi+CUS4nQ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772068615444.4488619629801; Fri, 23 Oct 2026 09:14:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHuE-00045U-Qg; Fri, 23 Oct 2026 12:14: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 1xKHuB-0003x6-RA for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:08 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHuA-00025E-4p for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:07 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6SAZ2216171 for ; Fri, 23 Oct 2026 16:14:05 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc811a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:14:05 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93f33438950so241145385a.1 for ; Fri, 23 Oct 2026 09:14:05 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3f0b8asm762327f8f.11.2026.10.23.09.14.02 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= tdwGQb0aM+NgFUeVe/gbj55Onpockxz5WXDTMIYn9B4=; b=nhehg+KLtOqbx2kX QFCKP8l6hc45TTabdZrpeXrCA8P0kWfvOCQEF1Ixol8R+D7s8OKql/fYkmilI3my LAwTDnnw8Au1C1rpsvM7C9SJk5q+hqHjC4Jb6aA535Giq74cKCSGA0iI1B71kV2/ tyGCfnxxaDSvTRltoMCJE1rF4zVOjTNAWCjfKKnoy3Oy82Mk9Cu2C5vzP5oAOM6C Ohe5BW25ru2u+oSy9QETeT11+WHQfehXsHKE6aV+oa+9iJXZDBa54NT6fwwzG0Jf Ol7tzNEE+4CkLkFvXvjnL/kixkGmHUnOJVjc9D9srfwETKX7Y8koohhxIutyUqT0 0Fl5/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772044; x=1793376844; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=tdwGQb0aM+NgFUeVe/gbj55Onpockxz5WXDTMIYn9B4=; b=PHsV+yF7Qs2ObHaob9vUJEjDnsKikLLZi2A9c02n517TEe2y9+nSTVZU08Pc7MnvS2 8g2fgMDZJN1Hx4DS3uv16O/tmmwpKrp7dVJ659b4m7DpofM68VwpKwupw7hKDPQPv2f2 jSzY1PeNXv7u/dGcazGMBLjcBAj8/nsJ9Wc1Kt2CiOoTfbekeNr0/b03lk4edpciy108 JpV23R2NMwkexjWJ6qVZsJ2IJY/bBevfrvdVmeCfbgAaYLnAhpR1nqOH374MweASgHv8 PfeeUq1wfjuKFgzrsrOuTMP/Sf9bG/x16vLt/bYaf0TrGHW2Ou84q/rdCLEiwW/NhTOI G1hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772044; x=1793376844; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=tdwGQb0aM+NgFUeVe/gbj55Onpockxz5WXDTMIYn9B4=; b=2UcEuJt/1jxMIuhGmGLeoJz+PHMOvMY9ILGHJlVHDuo+CBOCk+QI/euYc5hFaODqAY 7WGnBkBsQ2lTrl009arBnE5y5SpZELvWzARkpqcWLHDTJX2b9H/a9rDmJwFtOwwhJmNH RbsG4dChvxA9n2sxTL8ggo9X100K01eaFjcwvy/OVVXQIj4ZGBlzXHb2+Nuk10likD8E bRi36pjwGkcCTg7eubEJk41RphTVX2Ebm9qOKocfQh2S9jXbXGnCznE50OBODq3chcUM h+C7slUrNurW3MatwfLmRFd8dH/p7UAm1+U7M8L1sNINfoB6dpw9+NxwsOdE7GRgXDSI ywTQ== X-Gm-Message-State: AFq9FYJCeecKY2Lue+Y2BaKIvDPD/QIARyelHwHHOp8UAmagYd2ZYwLd VGofa+AoW8aFQfeBMlwkJ3wEciBJ8OkhIBbNISGNYu9dmRrE5Anu34RU4l6+uJyMiTwC7Yb3/2W rA627/ZHvB1cM6oD4zgvMrVC45SI18gHufDznWtYsehCr/xRHhX4bAn77K100//AfbqmP X-Gm-Gg: AYBFou2lGIW3VeORxGrFt0m65CNDMKgQdZtaHkRq0fF0JHEma8msAllwWDSDHrKFkkL U5epW4Pw3jiAu6kjuJhB+vE/ZW5wHBpc+XFmAp90d9wXqJeHWxP94zHa4CErfqbY8zp/4TdjkdJ 5yWRyIFLXiwpRAN187h0YvuQAqIsttJS7/c5+5JzOGATxRQH5aTpkzYcJsB8BcurT+f4ytBVC5g yEZVX6V61IEp3mU+q69KsB5G0zBlQrphf1yVsHPXN2U7P896OHds1rTxAhjk22Yn4LTbvu3emoh 34J3cY9haSHzt7AtHf6zYH0OnHCDSfLjqKCVADY2Mwy9EBT2F1vHaqCu+uqazDWYpD8AWIfmoj7 g7t5MVL02Y2mECginHA7L8Fb9VbN0ZxvrrGem5axv X-Received: by 2002:a05:620a:25cf:b0:93e:4833:82e7 with SMTP id af79cd13be357-93f6f7975c6mr490753585a.46.1792772044488; Fri, 23 Oct 2026 09:14:04 -0700 (PDT) X-Received: by 2002:a05:620a:25cf:b0:93e:4833:82e7 with SMTP id af79cd13be357-93f6f7975c6mr490750185a.46.1792772044041; Fri, 23 Oct 2026 09:14:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 04/83] target/arm: Convert cpu_exec_halt() to leaving_halt() Date: Fri, 23 Oct 2026 18:12:12 +0200 Message-ID: <20261023161332.60153-5-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX8rzh8ai/rPPX fvYkL8VVctl6NnJ72HmTmSBdiz8eXtWqTTN+DIDMqecmn6LYwlUeMJ4e8ECppbStrXEWsBZeKR1 udPZewtO38rhpxBj1Q7idESHQZI/JLUqdXQLRX04Zu2FnaL2oGygDZvrdFBRdPsppVx2YLyjJq3 rWl8Sy+nnp1lW4Y4zZU7a4hIGp4dns6rL8/FxGjqXWXdifGirPf0j5qgdKaVBinAWuuQXUUUREP LI9m1Yd2N0jpqlvOE0dU2R/igTkoNKNTgxFM8ZNoSs3rC6a7/XCdVm4XXsj/TrWMHxQPyw1exep htAexdbkPMzzxD7f62QB3EIsiB785Jshv3rUz5/8BLoGuU2SuxCO6y0ND3JdFR1cJhd88qatpxG QDy+zFBaW0Dl1tL/BMNuCfsnB2Wt9F9rMMPvJArSD3M0AYkX6qYpMHjP/Th038139CSTB56bP8k fAG9kYQdL6fNlyd2h7Q== X-Proofpoint-GUID: oKCQaLMR7X4n4vlwau-AehriJkETaMyg X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb87cd cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=AtaPWBxvZOLBLR1XvpsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: oKCQaLMR7X4n4vlwau-AehriJkETaMyg X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX8e7YOwlrghVu qJs5aT8ut2fIz45NjmW63qUWtsfFPwQu2R2gSmfsnANbTfgvnhPLkKYCvpVAEirDDp6xrZYu9/x 2MaXnmFZ5RefQgC/mbQidKVaD3uaXOA= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772070327158500 arm_cpu_exec_halt() now merely checks cpu_has_work() and conditionally call arm_cpu_leaving_halt(), which is now the generic flow in cpu_has_work_after_processing_async_events(). Register the leaving_halt handler to use the generic target-agnostic flow and remove the arm_cpu_exec_halt() wrapper. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20260930174946.82195-5-philmd@oss.qualcomm.com> --- target/arm/internals.h | 3 --- target/arm/cpu.c | 12 +----------- target/arm/tcg/cpu-v7m.c | 1 - 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 06092d29b36..509ed236a1a 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -431,9 +431,6 @@ void arm_restore_state_to_opc(CPUState *cs, #ifdef CONFIG_TCG TCGTBCPUState arm_get_tb_cpu_state(CPUState *cs); void arm_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb); - -/* Our implementation of TCGCPUOps::cpu_exec_halt */ -bool arm_cpu_exec_halt(CPUState *cs); int arm_cpu_mmu_index(CPUState *cs, bool ifetch); #endif /* CONFIG_TCG */ =20 diff --git a/target/arm/cpu.c b/target/arm/cpu.c index af0c64d196e..03a0ae02ebb 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -883,16 +883,6 @@ static void arm_cpu_leaving_halt(CPUState *cs) /* clear the halt reason */ qatomic_set(&cpu->env.halt_reason, NOT_HALTED); } - -bool arm_cpu_exec_halt(CPUState *cs) -{ - bool leave_halt =3D cpu_has_work(cs); - - if (leave_halt) { - arm_cpu_leaving_halt(cs); - } - return leave_halt; -} #endif =20 /* @@ -2627,7 +2617,7 @@ static const TCGCPUOps arm_tcg_ops =3D { .tlb_fill_align =3D arm_cpu_tlb_fill_align, .pointer_wrap =3D aprofile_pointer_wrap, .cpu_exec_interrupt =3D arm_cpu_exec_interrupt, - .cpu_exec_halt =3D arm_cpu_exec_halt, + .leaving_halt =3D arm_cpu_leaving_halt, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D arm_cpu_do_interrupt, .do_transaction_failed =3D arm_cpu_do_transaction_failed, diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c index 48b31d5eac8..1093c6cbf63 100644 --- a/target/arm/tcg/cpu-v7m.c +++ b/target/arm/tcg/cpu-v7m.c @@ -302,7 +302,6 @@ static const TCGCPUOps arm_v7m_tcg_ops =3D { .tlb_fill_align =3D arm_cpu_tlb_fill_align, .pointer_wrap =3D cpu_pointer_wrap_uint32, .cpu_exec_interrupt =3D arm_v7m_cpu_exec_interrupt, - .cpu_exec_halt =3D arm_cpu_exec_halt, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D arm_v7m_cpu_do_interrupt, .do_transaction_failed =3D arm_cpu_do_transaction_failed, --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772080; cv=none; d=zohomail.com; s=zohoarc; b=hHUl3PETwT1W7NXWWDqyw69CWVwkus+d3zdT9us6nquvF+Whtw5swhfd48ITBKtgTDQJMZ+zGVBYg3qPAP1DvJN+em1AlkkR20Tzuzv0TTGlM5aTDPXqBmcnZ7rHG+qD7+HT/dJWCSaqDNGErdvu1bv5Rb4VcTJ9ctO+BddgUgY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772080; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=JGuSDdbF+gKq1CjGy8ZOCv1di4B5ChfDXsMTbBiueuU=; b=BZx1ThQ0yISl4cjm23CJoEZbBEPiGJaKEw6Ezqkq1ABg4va7FwIDhCWogkH2xFJEjlgAWfOwrdys+Q8i+imVwfmkfrgWKNkrm7o9288DtC2uWR0VxGfTAT8ln/46qlvF3P+KyhKUayK9+Dc7QrQSMQDalrvV+rrKclMVRVnL1pk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17927720803901001.9746126384955; Fri, 23 Oct 2026 09:14:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHua-0004T6-Ol; Fri, 23 Oct 2026 12:14:34 -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 1xKHuO-0004IF-01 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:24 -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 1xKHuK-00025W-7b for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:17 -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 69NE63LT4064343 for ; Fri, 23 Oct 2026 16:14:13 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrcgeh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:14:13 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-92e82060977so214314385a.1 for ; Fri, 23 Oct 2026 09:14:13 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3f9f28sm737553f8f.21.2026.10.23.09.14.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= JGuSDdbF+gKq1CjGy8ZOCv1di4B5ChfDXsMTbBiueuU=; b=Kc1uuZOdzsn17Ss/ 8mggoNZWRzxNgRvf3qGM6JX33zIvxA4hPGVT+tMtG6R8t36Ygtbl4otU/gP53Owv i3wxK6wywlmmwlMzqp17bvQa9HEg+OhR2pYtDC1ikB2fyRgAKJ/yKkSWkNez+uXW +heJ6KWU/BvVr6U+YmPZSWo5Wh0dbpe/EDaTPLEFYt8IKVoxmVfeKSKigaCZ9Agn 9S1tUotY3krh87o1p7Wyys0PlJg/A06dLIXecQzPqyqJb4gEKnPlJckmf4BCiLMy tDx4bJfxTK19r0acfcqhZVj3hVFT1f3P+2KWhKg8LxyIgqvsreFbtHLdxdN7fXx2 bkSvMA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772052; x=1793376852; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JGuSDdbF+gKq1CjGy8ZOCv1di4B5ChfDXsMTbBiueuU=; b=URUy5oNvhCvBrK4FQUe0jg0iU7cAS/7CTuhRfC+RpwV2LiarmR0ZCNR4dvRW976w+X +oTOANKbSqhzNZHklSJFUBt7S9Fs2gqntkVVuPVkiste68atYFoMLzAuacFGRj48jpjn LoWkTUhBW42HCJI+J90tOqqOv+k5SJR4bt4oH/cuzX4u+zEtiexYtdajGrLMhjgS4DDx jbE7IwIBrww1OExa+iKrK0tjCasHkJomfN8Wg6UlYu/GZCQudaIrgJOE51jVnlwyQu0+ /ULCiLaIkzLyynb7Ylps1KQQnzKRJe7dl1Fyub3jdx9xJYZ69rv0gtEA9Im+8LIAT+0+ OsIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772052; x=1793376852; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JGuSDdbF+gKq1CjGy8ZOCv1di4B5ChfDXsMTbBiueuU=; b=0HxPsM3YMX+uWutUH97/rNUGdpLMXO65OpJ6kwdeJMDVUbKFZXDIvrWGqnMKZCP/gm Ou7a1K5Sgayt1MBVrfu0r0V8Xe9EN22ZDObnC+E4NJCkHxyyj3lO1Hifx37T1sFyZJSr Nq9zZ0f2+OanToXKS5VP87c/LZM/n6RYGOzOADGT+jKBAsGDfj2DqrrgRzKNo99bxcjQ 98eMLtwzAaGHv3X8cbWyOC4JEzg54ydqyZHEl0nQwvyh302liqQR1Yg4++mu6lK0IP6a mMhOS/YCTP9/Ge05BurI4145e6jOS0JsxzJfomri+H7G5UWK/3C8PkDPMi4cV8GQxzn2 Xiyg== X-Gm-Message-State: AFq9FYKnxKYfMpdYTCWwHQiOOrFHsle8ix1csvzo/xQgNC3JssJADmSv spETTavD41P2qBdjPcuQrTOJcoiwtFMiDrWSf5jWpYaROLP/tXQ+uxWU+goE79zcNPCqkHaH1Ov oqCN0mz6kI0eO+WULhNUc5FowAp+OwOR+ZJ+QwMEaXwTrf1VpV8SAm3ac13bJf/VzIVkQ X-Gm-Gg: AYBFou0Xa1D3V0vWxG8NIvBcClYwas+mY4zMOM7SkLNfhY7xIS31VwyE4Ljg8olZ71q bosc7D3Ize2Acwh+fNjhHINJcvi5ONi5opn5oKsFkVKfDPt42c1xBusa0YscBaNpKQlYYOrdsrr Ok7FU8ntStUYnStDkcO8zW6Uca8QWWK0TnDA/aPZbW6yFMsCe5f/dio6zblOPjekln3+1OcQFb7 AMi5p0Mt8cjbFU5bTu6+zVSCtQ3PQ+oe2tWUJX5mT69FxAxffDkgWJ32llGOrS1Pph/R67AAFP7 k7PCNAOp896m3ayJ5IFoijnbRx3nHcZnwt7fuEt8CzWN6gOtZyB0qSW6jHO8GFD2s9Xiy1i88hB iO5yjIDEOomgp+EU5UOxAcn4occIp2mnKZgO2Swfz X-Received: by 2002:a05:620a:3949:b0:93f:2479:2b4 with SMTP id af79cd13be357-93f626db296mr1010202585a.10.1792772052533; Fri, 23 Oct 2026 09:14:12 -0700 (PDT) X-Received: by 2002:a05:620a:3949:b0:93f:2479:2b4 with SMTP id af79cd13be357-93f626db296mr1010196985a.10.1792772051936; Fri, 23 Oct 2026 09:14:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 05/83] target/i386: Split APIC polling from x86_cpu_exec_halt() Date: Fri, 23 Oct 2026 18:12:13 +0200 Message-ID: <20261023161332.60153-6-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 6IExVtEhXWlp0eLjvhWeFzTaKdnA2wOc X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX0fjtfYz9s9BI CoQs+R8XdN/V150WmX0nvAJZWOmK3KmMdgGJBDAZYQVKoqH7aW9w6PDlruzBJs9He5eoweDdJNb uYmCLAoSHsJDdpG77A9CvOrrM3Xq1dE= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb87d5 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=h7OMh5kjI76PbTVxvEwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX5LEFHRoAPA6i VnGPMAm2Cm3+H/0gOccGNjr0lrF9pVsQZa4uGyzP4r8KsEzBuFfiGnel1lcRBY0L4pHsNCJBEup A/yK+3tUwy47ME4ZDDnZ+G3wK7ryu4lNXmI9kijGH9qjlX1pWKXcrKBAzWZWISxOUjrOHV0xv50 uesORbH98cuh8k6RCtUx9UDBJMo4NUZABMr5hhU1SFSfkIhT//cmr238xe3cmrQBdumuOC9vTBc gFohKfFRkOp1eaPQ+SYg+VZdLl3D1dMlnMmyI3Wp/Ku8SMP1KhehpeHxWs8aUzyYa1QIcFKzxmG pLeHgWIAjgxbGXTSXnhCGypz0mGNk27/TiChXhJhZoh7zqjZKieNFtQ+TTP4VY/HYYBqcT6bcWw 7XvyOXqFT5FDiFxNmbjwRBxFvtJEqhAr98vhbBDbnJtmUj309xqHgHUyYEUJQRw8v/7g96RA9dp ysRHSGuZpov7QEiyM4A== X-Proofpoint-ORIG-GUID: 6IExVtEhXWlp0eLjvhWeFzTaKdnA2wOc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772082559158500 Move APIC polling into x86_cpu_poll_during_halt() while keeping the remaining halt handling in x86_cpu_exec_halt(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20260930174946.82195-6-philmd@oss.qualcomm.com> --- target/i386/tcg/helper-tcg.h | 1 + target/i386/tcg/system/seg_helper.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/helper-tcg.h b/target/i386/tcg/helper-tcg.h index f4b2ff740d5..58e8ca0bc1b 100644 --- a/target/i386/tcg/helper-tcg.h +++ b/target/i386/tcg/helper-tcg.h @@ -37,6 +37,7 @@ */ void x86_cpu_do_interrupt(CPUState *cpu); #ifndef CONFIG_USER_ONLY +void x86_cpu_poll_during_halt(CPUState *cpu); bool x86_cpu_exec_halt(CPUState *cpu); bool x86_need_replay_interrupt(int interrupt_request); bool x86_cpu_exec_interrupt(CPUState *cpu, int int_req); diff --git a/target/i386/tcg/system/seg_helper.c b/target/i386/tcg/system/s= eg_helper.c index 8c7856be81e..9ce608a0bb7 100644 --- a/target/i386/tcg/system/seg_helper.c +++ b/target/i386/tcg/system/seg_helper.c @@ -128,10 +128,9 @@ void x86_cpu_do_interrupt(CPUState *cs) } } =20 -bool x86_cpu_exec_halt(CPUState *cpu) +void x86_cpu_poll_during_halt(CPUState *cpu) { X86CPU *x86_cpu =3D X86_CPU(cpu); - CPUX86State *env =3D &x86_cpu->env; =20 if (cpu_test_interrupt(cpu, CPU_INTERRUPT_POLL)) { bql_lock(); @@ -139,6 +138,14 @@ bool x86_cpu_exec_halt(CPUState *cpu) cpu_reset_interrupt(cpu, CPU_INTERRUPT_POLL); bql_unlock(); } +} + +bool x86_cpu_exec_halt(CPUState *cpu) +{ + X86CPU *x86_cpu =3D X86_CPU(cpu); + CPUX86State *env =3D &x86_cpu->env; + + x86_cpu_poll_during_halt(cpu); =20 if (!cpu_has_work(cpu)) { return false; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772122; cv=none; d=zohomail.com; s=zohoarc; b=fUKR8P+DMlz0Ndfj1de9N8R7u3bHDbvcHZZjhkqeSHeYdNmVbA1vkHb5K/U8X8XlkUzqsrPTZPdm73cWb74valLF+z/PaKz8eENQihfAMf07pc2yo+oJbwEfIRDWhZIxhztKFqKbsGxFE0igGDdYlHqMFROT88R8GdKiaY+HJY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772122; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=oEtO3TXJ7yS5COlFIX1s7AsquxuY7dAeP+Qpp0El5hs=; b=MLtLuis0yFfysyudzhEVd7Av+61D7/NMu5IINHrF9r5UO3GZ1EQcK973q/c8hfez56HkAJJ16XfgFyeHY/xJ7CPBSnABV0jIkFlYxU7i+4rzjQ4MTmsftNrRzoRMtmOvH2fH73AFe7UhzpK84iQn+Z4dkNv0hjbEwLz6pdhriGw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772122003814.2071449740722; Fri, 23 Oct 2026 09:15:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHul-0004qy-44; Fri, 23 Oct 2026 12:14:43 -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 1xKHuU-0004Pt-HG for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:30 -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 1xKHuS-00025t-88 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:26 -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 69NE5vmX4063370 for ; Fri, 23 Oct 2026 16:14:21 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrcgf6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:14:21 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f559420f3so107356885a.0 for ; Fri, 23 Oct 2026 09:14:21 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29cdb2bd1sm18993295e9.8.2026.10.23.09.14.17 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= oEtO3TXJ7yS5COlFIX1s7AsquxuY7dAeP+Qpp0El5hs=; b=H34RchTZyju2tKeb A/1/EBmg8PWzTCtNVIone4dYhYtNCMp+TBZepj3g7rxoRqj17nlPARu5V1hXm7FP 5bcK/WM+S406NNr1QBpgzAJFqs1zdrt23yQFXbnLmQMn2+44hbIObTbUNxhXBToX 2IHpMABMt1zcm3sXWOGV9jzWhRRv0EJu7Sg2/sfZLdRQSol2PgFconq7B0vv6Upw rrn4o070RB5AHfKxlyGMmhaDtJSYNLiTM3tRP2NLX8d7Caa6N3DWy4GqDhMNgx7B 7K7mL1BPbycUazm49m0Ur09JXCB7oPVk8q2XoT33KNr8anGoEYIi5aZZYj+TX6PV GW7yYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772060; x=1793376860; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=oEtO3TXJ7yS5COlFIX1s7AsquxuY7dAeP+Qpp0El5hs=; b=gXngkYATzjUVXJRVuFsGhpul2MtKfRWOc42X3KDkKhQh7S+aUEa7b4kywwaq1JKNXw rzrm1zRvp4uIRFch9RDQd+aXVmBhfeEtun9ZwqtMKUf2tv5uVrDqdJcCG1Umv0nAzBDI aSXODYDpvAuPGkDSnIh+mGvkCVzok3dBdmmcFuah28rnBLO/KIld7zqzOXcrJaOxmEmO JdxtYAlv5iOPLna5UxwUziUKlTc20193eRdnT2RASGXHSZkKx8hUWXwq//Sky7tONk2b MzkK9QYQwXKQRpq+PhAmm8RwwzzszBahNVIDbMV2r95rNbIM51axJyKlBPT2AXfLsLiy HxNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772060; x=1793376860; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=oEtO3TXJ7yS5COlFIX1s7AsquxuY7dAeP+Qpp0El5hs=; b=wNNkh8nCKIjcd7VWjJgmIQeD6aJ8QBebQIlqb8GLvWvwLlnIlGcXKItYXcEFRGqkMs XgiEXneULAal5euCpVLSSi237p/YV2+EWhU+sufHf76A0L8C3IrOcf2A9QwiYV9FJfm7 TXo2sJkw+HcxGSXw5sWi424L1J4ky5/N2Fstw17FoFC1IILBpGoJwGQELwNnWXhdJyoS 22rhLSk19+o2tQNahMCAJrYuQnMgJIbEmVsMQ+MnBV3wWSd+clz+FizuW4ocr6Kyyi/T A8TqbLTpNax++kUdTx8KHpmhzz29LRRydfpQhhePZd3fX2JMAu4SA0i9Rzg/hTNRRlBI 4o9g== X-Gm-Message-State: AFq9FYKLTLep1HErMarF4IStQ657RDZTjTo4UWuJrniR0PKUI0GoCtmG weuIpAEenLGLU6TMCDBuFimDrkFFhqjndN0bEQMA9xw0rtVEDg5Yc2IfGhrjkcwJsF8lRcng5W+ zaCVkHEUPnLRRr/uQ98yCNNs/7huZThyj38Lg4DEmeGVE2YpiE1T2Jepn/RE1m2ekFHYJ X-Gm-Gg: AYBFou3J9Iilf2w+iBO2Ng6zpJFqB6/CH+tcKHKVOK8bfcza1+mVtZDYbk0S3ev4ZVY CCsCWoNuVtt3Q9u2iAIIjeHM/OSgGnKgW4MHrugMVFXoSbAggytX7K6sC83FqmTS5GRrYEPvD36 h1cuymQLmJsxUz57XUQGF3tem9PA0ug74Y6qVyf81/1H0jqRHOg1GfM4oPRCr5Y9wuFTE01zPHm TpZz3oZA5isQW6wwmpyuadVd3Ik3ONOnZK0n8KFif0G/33WejKhXRG0RhNm2gfEX6vZkRvbzZBb STQAxF4k+3fffjjavxRh5bo0E7WcoLIf2Pgmk848xtb3SnsPmPfFHpIAX0tMfbr8gMJZHHO2X1K w6bH6js4LisNQC994b/iCi6L26zLQOfNM8HX0YEnX X-Received: by 2002:a05:620a:4042:b0:93e:78b7:fa4e with SMTP id af79cd13be357-93f6f94fe12mr485250885a.37.1792772059844; Fri, 23 Oct 2026 09:14:19 -0700 (PDT) X-Received: by 2002:a05:620a:4042:b0:93e:78b7:fa4e with SMTP id af79cd13be357-93f6f94fe12mr485245685a.37.1792772059255; Fri, 23 Oct 2026 09:14:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 06/83] target/i386: Split leaving-halt handling from x86_cpu_exec_halt() Date: Fri, 23 Oct 2026 18:12:14 +0200 Message-ID: <20261023161332.60153-7-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: uDWKIm2mD-Z-Qk-t4P9bv9HUM6Fvyl4N X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX02pZloyczxit u1hMGPNsjVhqgepl4oFmXB6e8o4LRRw/sw6R21sOGh3f7yJrIKuN2dnaak6iYlmXP8rpod+JJth eDBOOvMrmEDSfauYmUgcIcVkBi0pWeM= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb87dd cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=GiXQl85om2WzCxkx9rAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXxs7RGKAE6o9u A4UHy+j8NfTuq0zqztJ9puUfXsf4HmuqosmbaGgqMgIeAN/60rNCO01zrcqWFYUSg3JxY/oCHnu 9Tvp8a/qOBmkDg/LVKKI/cR5VKJyFfdD/yZou1qo9HCX71DSb2kZ81EXdYs+tVxGV7BuUcEPpOi MEsvKuiSMbMp5hgssXNYpyTkcCfHSscKYBOM5DQDu3ZmkJTvmgDGQlG7BqEvFPzvG2/E1TIdGTi 3KZTy1D7NyCyxO/Us9Sn+6UC441YR8UUfXJRdnYMH1Cjr3o7h3t7kaDqjD9u57vjj+zfBMaYBDx b9Pm+6kvmsottkkMeiF14t25toDOlF0yXXJOC1/42TcslIZlgEwo6w8X40cYi/BcOZIxIBH5fAT gtXCv+E2pLepB5qsf/m8UkatkexfE9oes5TaGMw0rT1xOaVL2QUOdtnHZk1QiKa0uABRyqV3I9R aWliL1grjzHb9b0xYiw== X-Proofpoint-ORIG-GUID: uDWKIm2mD-Z-Qk-t4P9bv9HUM6Fvyl4N X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772123337158500 Move debug exception handling performed when leaving HLT into x86_cpu_leaving_halt(). Keep x86_cpu_exec_halt() responsible for checking whether the CPU can resume. Document that #DB IRQ delivery through do_interrupt_all() runs in the vCPU thread and does not require BQL protection. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20260930174946.82195-7-philmd@oss.qualcomm.com> --- target/i386/tcg/helper-tcg.h | 1 + target/i386/tcg/system/seg_helper.c | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/target/i386/tcg/helper-tcg.h b/target/i386/tcg/helper-tcg.h index 58e8ca0bc1b..96accb30a80 100644 --- a/target/i386/tcg/helper-tcg.h +++ b/target/i386/tcg/helper-tcg.h @@ -39,6 +39,7 @@ void x86_cpu_do_interrupt(CPUState *cpu); #ifndef CONFIG_USER_ONLY void x86_cpu_poll_during_halt(CPUState *cpu); bool x86_cpu_exec_halt(CPUState *cpu); +void x86_cpu_leaving_halt(CPUState *cpu); bool x86_need_replay_interrupt(int interrupt_request); bool x86_cpu_exec_interrupt(CPUState *cpu, int int_req); #endif diff --git a/target/i386/tcg/system/seg_helper.c b/target/i386/tcg/system/s= eg_helper.c index 9ce608a0bb7..566b3d4d80c 100644 --- a/target/i386/tcg/system/seg_helper.c +++ b/target/i386/tcg/system/seg_helper.c @@ -140,22 +140,31 @@ void x86_cpu_poll_during_halt(CPUState *cpu) } } =20 -bool x86_cpu_exec_halt(CPUState *cpu) +void x86_cpu_leaving_halt(CPUState *cpu) { X86CPU *x86_cpu =3D X86_CPU(cpu); - CPUX86State *env =3D &x86_cpu->env; - - x86_cpu_poll_during_halt(cpu); - - if (!cpu_has_work(cpu)) { - return false; - } + CPUX86State *env =3D cpu_env(cpu); =20 /* Complete HLT instruction. */ if (env->eflags & TF_MASK) { env->dr[6] |=3D DR6_BS; + /* + * do_interrupt_all() is the normal TCG exception-delivery path + * and runs in the same vCPU thread context, so #DB delivery does + * not require BQL protection here. + */ do_interrupt_all(x86_cpu, EXCP01_DB, 0, 0, env->eip, 0); } +} + +bool x86_cpu_exec_halt(CPUState *cpu) +{ + if (!cpu_has_work(cpu)) { + return false; + } + + x86_cpu_leaving_halt(cpu); + return true; } =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772115; cv=none; d=zohomail.com; s=zohoarc; b=FI4OLBcJwyD/K+CMy/tNEzUjbOT9K5yGfQvW1++/wtk9YnNoXQx1f4HFsnk1O68rOxPwkQapnpVDQX+uvVmwAQLAxEZOnjuh0Hyzyoh4XRoRWObqu68hh9/EWBo+61BpWklq2ySYSIKTHP4ABGStfcu8mXCHGgE3/7ipwkEOqSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772115; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=yyjhp+Xe8BcOnZkMVuSHJIWJ73JZWvyw1/KmLw6zgts=; b=QwMfZyt8Pfuf87vH5NHT3kpnN/h6uohHefY4bTWLSJV7d97NTqCj4BDHCIlR3xqwCz9FPEnKgTHK48BnNAtWNhQrfa0XywkgO1lfUa6lVNzEr45tPnA9wlYQ1KsefHJCGqrJB8oQJlbxCz6rtBBk0gavnpmRUFHEgOCaqiTrdR8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772115397919.651990159198; Fri, 23 Oct 2026 09:15:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHul-0004td-D9; Fri, 23 Oct 2026 12:14:43 -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 1xKHuZ-0004TR-9Q for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:31 -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 1xKHuX-00026W-Io for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:31 -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 69NE5xGS4063478 for ; Fri, 23 Oct 2026 16:14:28 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrcgfs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:14:28 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f32050e72so340679285a.1 for ; Fri, 23 Oct 2026 09:14:27 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2b065c850sm15438495e9.13.2026.10.23.09.14.25 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= yyjhp+Xe8BcOnZkMVuSHJIWJ73JZWvyw1/KmLw6zgts=; b=RBkV9DCiZsVFvvfF Oe13Xggr5V1aMGoyOWxIoDdyyz/2JTAdQcnVjfZY3bCugurGIgmKAsmwREngvNkL o28AA3ajWYr3fKWsEvBncrwpw5EBiyQvkE/mySTWiqbjh9MUUzViqLjJEBMrpQE2 A2JuXifniGqpcEkz+hFZO0efcVTyAE1+ZYZQQtZwjgMmQOwdIDBB91YagnheRS3i fZ3LMP/7J7WadH5MH1JMt9qlFst/RiUyyMueCBgsMY5mFvRjEYoD1aadNr5eGlCj D1qirr5+zy8twkuXPaRzxjH8DadJ/oMv0BjkSYJ5d7h1sKglLxZlQwvoeVFB63dw YSGO9A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772067; x=1793376867; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yyjhp+Xe8BcOnZkMVuSHJIWJ73JZWvyw1/KmLw6zgts=; b=jBXJA27aL0+R+S/NNz+dc4YTiDXv/+6WKnayIAGn5RXof7t/YCVJi5mWvMOBIIJn2h QTgFFRE8nt9wgbTvTC5sxBURMIkKrEFMCJ2xdSiiLUjaYYdU8rE3+8B+qfYhR2uANH+V cwRHIMvnjBcrtUD58soXO0gvkOpGT6Say8MQPpq/RHqpgeQvfLJTRSfBM5GVsTGBKG+t saNPYn5btUOjAUEMKL7Kv3/94DbT2ZcN3889I5pC/X4S+RxgQAKOaurmYrav2pWLusoU dmbOJt2CvXdTG84szq8EaZ38y06UekUwAD3z33ZmvA9xhGfODxXmRdqOytWxaKnIHlos lC8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772067; x=1793376867; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yyjhp+Xe8BcOnZkMVuSHJIWJ73JZWvyw1/KmLw6zgts=; b=oR/5eZQoMnjH0Iv8cYufvxCJitpeFGwFTvNf8dJJVAB7zUJhzGnZQEYEZs3h6WKn/W qCpWhOjssdPn0dNHwigApu+SYddbnSu+F4RIeeirEEouRZLv/n/M2GX9O4ZjWpJ7I30x KSlx2dzndC4EBYubWILltlTffpyllmvCqRM0X1CThGY8z9LdcIIzKaWh21w8LTB+MmrO cgPgx887JjyJdESWW+jXPrF+9RgHIkAxOMhPMGv9I+G8PzzPC5EA974SM00V6RH+YLds UIo67ifa4Lt0EzTmqU25gXZY8HqKO+VprQZolpLznznAuxwQvSWQp3M6fFzGbEu2PBLh pTEQ== X-Gm-Message-State: AFq9FYLRhm2R/fKIFQfQ1EFlA5oh5gCgqe8sA6hcEgYUid1Li8HosVgU /HzVZpPgnucaUgS8O1Gv42EE5XLlz60qsdMgXXEH5KsgnrLDF/RdjdVhPwq9QB9s/s1aM8ChVwr ujbdQ6U/mG9+vNL7BvHjrh7fQngTY5aYJ6cZrRG6Vlr2tdMGuDQqQHsz7AoRZre0KlbZT X-Gm-Gg: AYBFou0emgfCfTlK2tvJT3Fp/AqjYeSADr2xthHHHwQKVFXqBBelr+ikfw3Urdqpw66 5SDXkcD0xNGKSdH/JxsDEuJ4UDzhR7B6PzRYv4XdOxfOCWYpT8BLlhvlaFtpOPoLTC6EiqTTdSs HGmiFr79+sgPkRfzVkSFipYnnWcYiBGapTZN6Gbl94hDOUtUEDsSyfOpCpEunJWoFBb3GM/xXrK h2G3GqTabMt4Bdyvch1UzLC72lTyGL0JZAXPcRqngedWCLmuz500oilg5DUcAy729EXac7nA60I xW2L2hHy20P9jkUnGB9HNrRVtLKYwGb/1fjneNgY5arwKbuazt0Jfk7tPp79t7ih99jmRq9jzXq L/mRFnkaKWFKQ1vaDqtOfOYD7O0JYiqT6Ugb+6AKa X-Received: by 2002:a05:620a:2a02:b0:93e:c12c:fbc6 with SMTP id af79cd13be357-93f6fa28e8dmr491686585a.83.1792772067059; Fri, 23 Oct 2026 09:14:27 -0700 (PDT) X-Received: by 2002:a05:620a:2a02:b0:93e:c12c:fbc6 with SMTP id af79cd13be357-93f6fa28e8dmr491682385a.83.1792772066569; Fri, 23 Oct 2026 09:14:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 07/83] target/i386: Use generic halt transition handlers Date: Fri, 23 Oct 2026 18:12:15 +0200 Message-ID: <20261023161332.60153-8-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: ZUVD1i_yqsTXPA54VXOttuUV3SMFQgjr X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX8aMUymwNfE/X IffVRo8uCfJztLhXVFADEKchc3CWd8M1lDnzf3T5HGLqsiUb/9O88GSJaZ/oReovmbuCde57435 0YtdqmHT8CQMX7X3ueJKkT2vizc4sws= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb87e4 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=xWu8-Agft_6X_INOG6MA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXyTLSsgwdSOoE Mw/MiAM4hdaa4nGWUy30ltyQWNGNlYjCNJsiGB0Fu8Y+Cx+k870bW9UU28bjnwm7WM8gr2TL8Sj 0nZYxEXNa7clq4ehUpGrK26EyCpRzkgWFK+5cXnFm2PybaqlzGIff8XWLjn72Dj/swErg1abtOV JauqbvSc3UWjxxTsMEQPbmlRIaE8MaiZyNmIgirS5Ku1jwlYBhp34iW3GXxfHeKUQKDoeHtOroS AnLCiaFOQRizDvAOrpI5atI58O3ae+ZEd6P2E7On0HQFxPsoz/PcIIS2EtC6oj29kmc27XA2xjt zezCU6HZVux9A10ZOgEwZiM43HDhq5iwAmgvarb6U8T4uCNCqG9E8TTw+6wJJmvQ5ybW5P5+xiX dsk41NaTCGpOdKtrntVJFin6nHMeYy5LkxFiDVytWtlhOOseT1JqU+LoK8Y+lIicJCCP1TKfnd5 gfjLcoRkni4IKzWEfXQ== X-Proofpoint-ORIG-GUID: ZUVD1i_yqsTXPA54VXOttuUV3SMFQgjr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772117216158500 Register x86_cpu_poll_during_halt() and x86_cpu_leaving_halt() with the generic TCG halt flow. Remove the target-specific x86_cpu_exec_halt() wrapper. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20260930174946.82195-8-philmd@oss.qualcomm.com> --- target/i386/tcg/helper-tcg.h | 1 - target/i386/tcg/system/seg_helper.c | 11 ----------- target/i386/tcg/tcg-cpu.c | 3 ++- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/target/i386/tcg/helper-tcg.h b/target/i386/tcg/helper-tcg.h index 96accb30a80..4d543556a9f 100644 --- a/target/i386/tcg/helper-tcg.h +++ b/target/i386/tcg/helper-tcg.h @@ -38,7 +38,6 @@ void x86_cpu_do_interrupt(CPUState *cpu); #ifndef CONFIG_USER_ONLY void x86_cpu_poll_during_halt(CPUState *cpu); -bool x86_cpu_exec_halt(CPUState *cpu); void x86_cpu_leaving_halt(CPUState *cpu); bool x86_need_replay_interrupt(int interrupt_request); bool x86_cpu_exec_interrupt(CPUState *cpu, int int_req); diff --git a/target/i386/tcg/system/seg_helper.c b/target/i386/tcg/system/s= eg_helper.c index 566b3d4d80c..e24d01000ad 100644 --- a/target/i386/tcg/system/seg_helper.c +++ b/target/i386/tcg/system/seg_helper.c @@ -157,17 +157,6 @@ void x86_cpu_leaving_halt(CPUState *cpu) } } =20 -bool x86_cpu_exec_halt(CPUState *cpu) -{ - if (!cpu_has_work(cpu)) { - return false; - } - - x86_cpu_leaving_halt(cpu); - - return true; -} - bool x86_need_replay_interrupt(int interrupt_request) { /* diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 9db9795a3b2..167ff7695ae 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -182,7 +182,8 @@ const TCGCPUOps x86_tcg_ops =3D { .tlb_fill =3D x86_cpu_tlb_fill, .pointer_wrap =3D x86_pointer_wrap, .do_interrupt =3D x86_cpu_do_interrupt, - .cpu_exec_halt =3D x86_cpu_exec_halt, + .poll_during_halt =3D x86_cpu_poll_during_halt, + .leaving_halt =3D x86_cpu_leaving_halt, .cpu_exec_interrupt =3D x86_cpu_exec_interrupt, .cpu_exec_reset =3D x86_cpu_exec_reset, .do_unaligned_access =3D x86_cpu_do_unaligned_access, --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772119; cv=none; d=zohomail.com; s=zohoarc; b=LZ0cR/siNQVeTAva97jIdDzxynBdPh8I7bgbaasZaIf3Dr93BDaR13TvDpIKbU2crcr1AYQQBvaaTKagz457MQ64U+/S1qIOe1qhYZ6do1eYAa+yn1XnDio6MtBkIWZW+imgwWtkoRU4Mx1AuFzByjrspyUjXZDPCtdHY7qSDPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772119; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=chcsydOzYjGZYjKR3ymCPHisdiVWvP4EYSmzidp8kug=; b=nT9b4FxneZ8f3mNps9rJYw+OJcjakP4wcGbWhttqVSqyRVpd/cgVhEhZL9YK05hFDFcnInOh7hacQGo1EJqWvl1Ip4vDCfux7u6vRc3NExdFEYMqNaHRbzc83PGH/t7jRu+TYAr+FeedHQj3bNjOeSxI/LKY7fuhSRAJZMnQkII= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772119585702.4196607098686; Fri, 23 Oct 2026 09:15:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHup-00054l-SO; Fri, 23 Oct 2026 12:14:48 -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 1xKHul-0004rk-4f for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:43 -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 1xKHuh-000271-Kc for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:42 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5vMu4072851 for ; Fri, 23 Oct 2026 16:14:36 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7bw0wtd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:14:36 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93c5ab5c136so167460485a.3 for ; Fri, 23 Oct 2026 09:14:36 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2fe0e577csm9083385e9.0.2026.10.23.09.14.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= chcsydOzYjGZYjKR3ymCPHisdiVWvP4EYSmzidp8kug=; b=UNx1dKSS9Wo3UERB 71fXRCHTepR7p9Ts79jXLTxY+v6VeAqflLEhnTTxyIhwRpvRQKsQM9dL9Z0MbCED 30pMRHJivjB0U0bXSjb6BhklT1KY9yv6lEPTlYPfK6/KuREkCcn80qiLEX5M3tJL 9iVUwmn7bYmGMpskThLw9N6opK4TIWhW8HwCIo7mXfGbc8VYbYeQ6Kfj0hG/IEdK 5IqySQBPTt+vqgqzIp4rxZJDLB0ktUaWzTjOUKFHi+/4pwV3qPlAVm1gS/YuEZTK 5D8Hy8MhuDnUCVLDU4dZHHJTPUAsdlLy2aULtJBhTdMPAmaSYYGuQz0yO0meVfaw wI6/kQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772075; x=1793376875; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=chcsydOzYjGZYjKR3ymCPHisdiVWvP4EYSmzidp8kug=; b=KTz0wLvfcR1yZxxjE/S+YL8/zYawuRF2gbwaphd6QztoLCdPhxj81KVqjx4jzcHoLh sKz/n/BHMZJNmELY5LGdl0RLHCZZEJWeHpc8bpHZuZFR5qSlcalRlSp96/lQg+IMcASO q4yvxnPmX0EexxvzEpxOTqkYjHlaXCYZShNlwO55cPrVNeUwR2B4va9sLK+FuhP2sZCS pu68bpi1fxXrqffbHc1SGvbe/3y12hXl+okgtCNiyTkbPTk5DIuSzpSs/6et8/LD/k8L IBXHfBRilzpYRN+uzFiAyje6v+BgOESMog5CkvPrGIxJXnpdZiOPvZEW7xpI2c0G54gT 9N6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772075; x=1793376875; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=chcsydOzYjGZYjKR3ymCPHisdiVWvP4EYSmzidp8kug=; b=GjBK1f2rsd2i65A0z2t/Gwr/7cqePusytIjhsvzBNOXZx8N9geBzmTYcewBwf4v66a p0j0yew+aSx424Becv7RGJWhtsR9onfieHvv6J/pq/Km+1L4YInipm/b/tXoaR4UmboY i/b9P19NvSfiuLk8aCpLjCmo9wocv+qAfoPf+LW5XrwSgR16nVOohDM/e8EcrczkM/TT n557VU/ouBUTBJQgnXXtkbuj6FydsudQkr/pwMWW7bCTWVSReEUNAZK8xbm29ZAd5gT4 EAObPh8p59XT9dQ5C2OiSUWnfua/zbzPISy1fzn7g2D4KxqC0U+mr9MaEG1Ud9ZJ8rTd OW4w== X-Gm-Message-State: AFq9FYL6CJyyE6+ZNv2xbSVho/WPgwt+dNbbDMzCS/ruFqfhsy/mcW4s 1qAAOr7Q3UPTq1JfnYKyPSEYANi6bpaB+3FkZ0r0kO0ahIJWsauo1Sihk7Vi7gsS0yz4m3EUZ9E HFT4YXjk7HiE8QRMnvWZ+4qTfCMEYsH7ADo0HJEAcSPngAZXoQXVptQpC/0FwAfr22jmQ X-Gm-Gg: AYBFou1MTOe3vBuQx/cZ3DzlQRRGKCh6jhiRJFPU4DFyB5/4sxvRQRJWbx4nRhkyUeT Y3KeLgyWLMKV8hkwUxF2d3DjFAzPdc04V9pZmrHiiVRgkVW+PBU1VwG+bewIUtNdDKVnm+Mbp3a AI8AIVhYxpAbF4INpYVZ1FtcgZt2V6sw+AbRycu4dOlnKfgJYQ+zyYGhBxJ0JLyaBqSzRBQHLW8 hT1+tTd6I3Edzwu3N4nk8iYgjhYIYEjGJdB+8wPj+7oxfdXrWk+XfnhaYc/4+TNx+1cQ/Nj+plD EprlWyL3E3iofmc80csZjV+XnJJ+yT637oKUlxqeuf11FuZmaaQdEbSFuKm2dwi2Cke9hOscVGw 7c0iPDwyh4+tnm2RbIqfxIPKzo/YJRK24gs6FyC2K X-Received: by 2002:a05:620a:6841:b0:93f:2ba5:1704 with SMTP id af79cd13be357-93f6f657f8dmr451616485a.18.1792772075058; Fri, 23 Oct 2026 09:14:35 -0700 (PDT) X-Received: by 2002:a05:620a:6841:b0:93f:2ba5:1704 with SMTP id af79cd13be357-93f6f657f8dmr451611085a.18.1792772074331; Fri, 23 Oct 2026 09:14:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 08/83] accel/tcg: Remove the redundant cpu_exec_halt() hook Date: Fri, 23 Oct 2026 18:12:16 +0200 Message-ID: <20261023161332.60153-9-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: fGeXPfR8RpamDe63sPucTPkrKvtS3Vzq X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX4OGCFMXZBjMQ zwyxgCnWM62h2/1uph6dpM0tK3ngzmK5aGMp06Cx7RLZVjMBHat/IdygdFUXuMzKNV6iiYeJncH 4UvIdjyFrL/vuS1gQFRXYwQMAd9noho= X-Authority-Analysis: v=2.4 cv=QdTzLcbv c=1 sm=1 tr=0 ts=6adb87ec cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=Fma_We6Em7EAR7gKL-MA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: fGeXPfR8RpamDe63sPucTPkrKvtS3Vzq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX68dNbnmMQ3JR 81k9/PQAqHrUEKfNAhB0/luNt3T4sa1o30tOOPLgZtFmouGKm9ZwQ43tlMjypdDwDCSFGgd20xn 1vzG5var/Bzgg/WGG+Zjv8zaHljK0ocyaWhYDdJ+UpboWIq5C5sVO31r3KIqDHPETmjFc7Tuh7k ni1G4qXhZ/VT/BGQ5d57nd4UZn+zXzKfk16z33DuaYRziFEps1BI2YI81zKEUHqi+C5YvRXfZ05 CukPXQSeKt5f7iahjg5Ad9PGi1vAm6FWDJcqx3EDzZx5cy2TsZtzPiYR/W6MYf9iPOBRpNPk26x LsV3jkacNlwk+V8IVDXqiSEXw16tZMydvuMH1ODjqz4uT56l0gnMEO9SQ7RJ4Yqi1kLKq+0KRwi 0T8C/d1Dh5DKaoTnMhfRg8QjBJWpeWm3EJwx4GI3aBflKlpvBN/b9b+JlkGE/r7Pt2SmQuWhhqT anqRIGvU3mvrR4m/iNA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772121360158502 All remaining users of cpu_exec_halt simply alias cpu_has_work(). Call cpu_has_work() directly from the generic halt flow and remove the redundant hook registrations and interface definition. Make affected cpu_has_work() helpers private where possible. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20260930174946.82195-9-philmd@oss.qualcomm.com> --- include/accel/tcg/cpu-ops.h | 18 ------------------ target/loongarch/internals.h | 1 - target/riscv/internals.h | 5 ----- target/s390x/s390x-internal.h | 1 - accel/tcg/cpu-exec.c | 23 ++++++++--------------- target/alpha/cpu.c | 1 - target/avr/cpu.c | 1 - target/hexagon/cpu.c | 1 - target/hppa/cpu.c | 1 - target/loongarch/cpu.c | 2 +- target/loongarch/tcg/tcg_cpu.c | 1 - target/m68k/cpu.c | 1 - target/microblaze/cpu.c | 1 - target/mips/cpu.c | 1 - target/or1k/cpu.c | 1 - target/ppc/cpu_init.c | 1 - target/riscv/cpu.c | 2 +- target/riscv/tcg/tcg-cpu.c | 1 - target/rx/cpu.c | 1 - target/s390x/cpu-system.c | 2 +- target/s390x/cpu.c | 1 - target/sh4/cpu.c | 1 - target/sparc/cpu.c | 1 - target/tricore/cpu.c | 1 - target/xtensa/cpu.c | 1 - 25 files changed, 11 insertions(+), 60 deletions(-) diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index 1ee5d3d8bdb..4195a29e1e4 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -187,7 +187,6 @@ struct TCGCPUOps { * resume execution from the halted state. This callback performs any * necessary target-specific state transitions or synchronization befo= re * instruction execution resumes. The caller does not hold the BQL. - * Either this callback or @cpu_exec_halt must be provided (but not bo= th). */ void (*leaving_halt)(CPUState *cpu); /** @do_interrupt: Callback for interrupt handling. */ @@ -196,23 +195,6 @@ struct TCGCPUOps { bool (*cpu_exec_interrupt)(CPUState *cpu, int interrupt_request); /** @cpu_exec_reset: Callback for reset in cpu_exec. */ void (*cpu_exec_reset)(CPUState *cpu); - /** - * @cpu_exec_halt: Callback for handling halt in cpu_exec. - * - * The target CPU should do any special processing here that it needs - * to do when the CPU is in the halted state. - * - * Return true to indicate that the CPU should now leave halt, false - * if it should remain in the halted state. (This should generally - * be the same value that cpu_has_work() would return.) - * - * Either @leaving_halt or this method must be provided, but not both. - * If the target does not need to - * do anything special for halt, the same function used for its - * SysemuCPUOps::has_work method can be used here, as they have the - * same function signature. - */ - bool (*cpu_exec_halt)(CPUState *cpu); /** * @tlb_fill_align: Handle a softmmu tlb miss * @cpu: cpu context diff --git a/target/loongarch/internals.h b/target/loongarch/internals.h index 952c98f74ae..9d064d1948b 100644 --- a/target/loongarch/internals.h +++ b/target/loongarch/internals.h @@ -38,7 +38,6 @@ void cpu_loongarch_timer_cb(void *opaque); uint64_t cpu_loongarch_get_timer_counter(CPUTimerState *timer); uint64_t cpu_loongarch_get_timer_ticks(CPUTimerState *timer); void cpu_loongarch_set_timer_config(CPUTimerState *timer, uint64_t value); -bool loongarch_cpu_has_work(CPUState *cs); bool cpu_loongarch_hw_interrupts_pending(CPULoongArchState *env); #endif /* !CONFIG_USER_ONLY */ =20 diff --git a/target/riscv/internals.h b/target/riscv/internals.h index 9f1dec6748f..5466879a4aa 100644 --- a/target/riscv/internals.h +++ b/target/riscv/internals.h @@ -201,11 +201,6 @@ static inline target_ulong get_xepc_mask(CPURISCVState= *env) } } =20 -#ifndef CONFIG_USER_ONLY -/* Our implementation of SysemuCPUOps::has_work */ -bool riscv_cpu_has_work(CPUState *cs); -#endif - extern const struct SemihostingCPUOps riscv_semihosting_ops; void riscv_get_dump_info(const CPUState *cs, ArchDumpInfo *info, const GuestPhysBlockList *guest_phys_blocks); diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index 9dd2243d486..1dfd4317d28 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -248,7 +248,6 @@ bool s390_cpu_system_realize(DeviceState *dev, Error **= errp); void s390_cpu_finalize(Object *obj); void s390_cpu_system_class_init(CPUClass *cc); void s390_cpu_machine_reset_cb(void *opaque); -bool s390_cpu_has_work(CPUState *cs); =20 void s390_get_dump_info(const CPUState *cs, ArchDumpInfo *info, const GuestPhysBlockList *guest_phys_blocks); diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 122ad9e2e49..9ead35418d3 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -48,7 +48,6 @@ #include "internal-common.h" #if !defined(CONFIG_USER_ONLY) #include "accel/tcg/iommu.h" -#include "hw/core/sysemu-cpu-ops.h" #endif =20 /* -icount align implementation. */ @@ -661,21 +660,16 @@ static bool cpu_poll_while_halted(CPUState *cpu) { const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; =20 + if (tcg_ops->poll_during_halt) { + tcg_ops->poll_during_halt(cpu); + } + + if (!cpu_has_work(cpu)) { + return false; + } + if (tcg_ops->leaving_halt) { - assert(!tcg_ops->cpu_exec_halt); - if (tcg_ops->poll_during_halt) { - tcg_ops->poll_during_halt(cpu); - } - if (!cpu_has_work(cpu)) { - return false; - } tcg_ops->leaving_halt(cpu); - } else { - assert(!tcg_ops->poll_during_halt); - assert(cpu->cc->sysemu_ops->has_work =3D=3D tcg_ops->cpu_exec_halt= ); - if (!tcg_ops->cpu_exec_halt(cpu)) { - return false; - } } =20 cpu->halted =3D 0; /* allow execution */ @@ -1074,7 +1068,6 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp) /* Check mandatory TCGCPUOps handlers */ const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; #ifndef CONFIG_USER_ONLY - assert(tcg_ops->cpu_exec_halt || tcg_ops->leaving_halt); assert(tcg_ops->cpu_exec_interrupt); assert(tcg_ops->cpu_exec_reset); assert(tcg_ops->pointer_wrap); diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 12e86021663..7d1d036e1d3 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -265,7 +265,6 @@ static const TCGCPUOps alpha_tcg_ops =3D { .tlb_fill =3D alpha_cpu_tlb_fill, .pointer_wrap =3D cpu_pointer_wrap_notreached, .cpu_exec_interrupt =3D alpha_cpu_exec_interrupt, - .cpu_exec_halt =3D alpha_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D alpha_cpu_do_interrupt, .do_transaction_failed =3D alpha_cpu_do_transaction_failed, diff --git a/target/avr/cpu.c b/target/avr/cpu.c index f8409f32ab9..a01e6fa4751 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -246,7 +246,6 @@ static const TCGCPUOps avr_tcg_ops =3D { .restore_state_to_opc =3D avr_restore_state_to_opc, .mmu_index =3D avr_cpu_mmu_index, .cpu_exec_interrupt =3D avr_cpu_exec_interrupt, - .cpu_exec_halt =3D avr_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .tlb_fill =3D avr_cpu_tlb_fill, .do_interrupt =3D avr_cpu_do_interrupt, diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index f20d6de6f63..304031e97f0 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -821,7 +821,6 @@ static const TCGCPUOps hexagon_tcg_ops =3D { .cpu_exec_reset =3D cpu_reset, .tlb_fill =3D hexagon_tlb_fill, .do_unaligned_access =3D hexagon_cpu_do_unaligned_access, - .cpu_exec_halt =3D hexagon_cpu_has_work, .do_interrupt =3D hexagon_cpu_do_interrupt, #endif /* !CONFIG_USER_ONLY */ }; diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 07b49e51326..7b1309a7c38 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -270,7 +270,6 @@ static const TCGCPUOps hppa_tcg_ops =3D { .tlb_fill_align =3D hppa_cpu_tlb_fill_align, .pointer_wrap =3D cpu_pointer_wrap_notreached, .cpu_exec_interrupt =3D hppa_cpu_exec_interrupt, - .cpu_exec_halt =3D hppa_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D hppa_cpu_do_interrupt, .do_unaligned_access =3D hppa_cpu_do_unaligned_access, diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 5e182922b7d..a95fdfc2b62 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -117,7 +117,7 @@ bool cpu_loongarch_hw_interrupts_pending(CPULoongArchSt= ate *env) #endif =20 #ifndef CONFIG_USER_ONLY -bool loongarch_cpu_has_work(CPUState *cs) +static bool loongarch_cpu_has_work(CPUState *cs) { bool has_work =3D false; =20 diff --git a/target/loongarch/tcg/tcg_cpu.c b/target/loongarch/tcg/tcg_cpu.c index 4b1d44a1644..7ea2a1eb933 100644 --- a/target/loongarch/tcg/tcg_cpu.c +++ b/target/loongarch/tcg/tcg_cpu.c @@ -327,7 +327,6 @@ const TCGCPUOps loongarch_tcg_ops =3D { .tlb_fill =3D loongarch_cpu_tlb_fill, .pointer_wrap =3D loongarch_pointer_wrap, .cpu_exec_interrupt =3D loongarch_cpu_exec_interrupt, - .cpu_exec_halt =3D loongarch_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D loongarch_cpu_do_interrupt, .do_transaction_failed =3D loongarch_cpu_do_transaction_failed, diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 9b52ad5fc23..c7771cbf643 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -710,7 +710,6 @@ static const TCGCPUOps m68k_tcg_ops =3D { .tlb_fill =3D m68k_cpu_tlb_fill, .pointer_wrap =3D cpu_pointer_wrap_uint32, .cpu_exec_interrupt =3D m68k_cpu_exec_interrupt, - .cpu_exec_halt =3D m68k_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D m68k_cpu_do_interrupt, .do_transaction_failed =3D m68k_cpu_transaction_failed, diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 389a5124b12..6013a8def8e 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -448,7 +448,6 @@ static const TCGCPUOps mb_tcg_ops =3D { .tlb_fill =3D mb_cpu_tlb_fill, .pointer_wrap =3D cpu_pointer_wrap_uint32, .cpu_exec_interrupt =3D mb_cpu_exec_interrupt, - .cpu_exec_halt =3D mb_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D mb_cpu_do_interrupt, .do_transaction_failed =3D mb_cpu_transaction_failed, diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 0fead20d651..c069aa1c0b7 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -716,7 +716,6 @@ static const TCGCPUOps mips_tcg_ops =3D { .tlb_fill =3D mips_cpu_tlb_fill, .pointer_wrap =3D mips_pointer_wrap, .cpu_exec_interrupt =3D mips_cpu_exec_interrupt, - .cpu_exec_halt =3D mips_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D mips_cpu_do_interrupt, .do_transaction_failed =3D mips_cpu_do_transaction_failed, diff --git a/target/or1k/cpu.c b/target/or1k/cpu.c index 66c00c0930c..42d9351b6d7 100644 --- a/target/or1k/cpu.c +++ b/target/or1k/cpu.c @@ -266,7 +266,6 @@ static const TCGCPUOps openrisc_tcg_ops =3D { .tlb_fill =3D openrisc_cpu_tlb_fill, .pointer_wrap =3D cpu_pointer_wrap_uint32, .cpu_exec_interrupt =3D openrisc_cpu_exec_interrupt, - .cpu_exec_halt =3D openrisc_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D openrisc_cpu_do_interrupt, #endif /* !CONFIG_USER_ONLY */ diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 578dd9194eb..0431c0e0ae5 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7498,7 +7498,6 @@ static const TCGCPUOps ppc_tcg_ops =3D { .tlb_fill =3D ppc_cpu_tlb_fill, .pointer_wrap =3D ppc_pointer_wrap, .cpu_exec_interrupt =3D ppc_cpu_exec_interrupt, - .cpu_exec_halt =3D ppc_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D ppc_cpu_do_interrupt, .cpu_exec_enter =3D ppc_cpu_exec_enter, diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index b202a4eb6ea..f9946f54ced 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -963,7 +963,7 @@ uint64_t riscv_cpu_get_mip(const CPURISCVState *env) return qatomic_read(&env->mip); } =20 -bool riscv_cpu_has_work(CPUState *cs) +static bool riscv_cpu_has_work(CPUState *cs) { RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index e07ca95e49b..80c04636175 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -306,7 +306,6 @@ const TCGCPUOps riscv_tcg_ops =3D { .pointer_wrap =3D riscv_pointer_wrap, .cpu_exec_enter =3D riscv_cpu_exec_enter, .cpu_exec_interrupt =3D riscv_cpu_exec_interrupt, - .cpu_exec_halt =3D riscv_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D riscv_cpu_do_interrupt, .do_transaction_failed =3D riscv_cpu_do_transaction_failed, diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 9b8473d71cf..69946928995 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -227,7 +227,6 @@ static const TCGCPUOps rx_tcg_ops =3D { .pointer_wrap =3D cpu_pointer_wrap_uint32, =20 .cpu_exec_interrupt =3D rx_cpu_exec_interrupt, - .cpu_exec_halt =3D rx_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D rx_cpu_do_interrupt, }; diff --git a/target/s390x/cpu-system.c b/target/s390x/cpu-system.c index 784bf4e90b9..715ff3ca945 100644 --- a/target/s390x/cpu-system.c +++ b/target/s390x/cpu-system.c @@ -39,7 +39,7 @@ #include "system/tcg.h" #include "hw/core/sysemu-cpu-ops.h" =20 -bool s390_cpu_has_work(CPUState *cs) +static bool s390_cpu_has_work(CPUState *cs) { S390CPU *cpu =3D S390_CPU(cs); =20 diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 85afc5dec9a..e7f81fabff6 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -384,7 +384,6 @@ static const TCGCPUOps s390_tcg_ops =3D { .tlb_fill =3D s390_cpu_tlb_fill, .pointer_wrap =3D s390_pointer_wrap, .cpu_exec_interrupt =3D s390_cpu_exec_interrupt, - .cpu_exec_halt =3D s390_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D s390_cpu_do_interrupt, .debug_excp_handler =3D s390x_cpu_debug_excp_handler, diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 3bbdee301d5..55c73a1da35 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -312,7 +312,6 @@ static const TCGCPUOps superh_tcg_ops =3D { .tlb_fill =3D superh_cpu_tlb_fill, .pointer_wrap =3D cpu_pointer_wrap_notreached, .cpu_exec_interrupt =3D superh_cpu_exec_interrupt, - .cpu_exec_halt =3D superh_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D superh_cpu_do_interrupt, .do_unaligned_access =3D superh_cpu_do_unaligned_access, diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index ae9bdca9df8..1529f9570da 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1074,7 +1074,6 @@ static const TCGCPUOps sparc_tcg_ops =3D { .tlb_fill =3D sparc_cpu_tlb_fill, .pointer_wrap =3D sparc_pointer_wrap, .cpu_exec_interrupt =3D sparc_cpu_exec_interrupt, - .cpu_exec_halt =3D sparc_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D sparc_cpu_do_interrupt, .do_transaction_failed =3D sparc_cpu_do_transaction_failed, diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 84a05e3d363..82b56c3cd56 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -223,7 +223,6 @@ static const TCGCPUOps tricore_tcg_ops =3D { .tlb_fill =3D tricore_cpu_tlb_fill, .pointer_wrap =3D cpu_pointer_wrap_uint32, .cpu_exec_interrupt =3D tricore_cpu_exec_interrupt, - .cpu_exec_halt =3D tricore_cpu_has_work, .cpu_exec_reset =3D cpu_reset, }; =20 diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 7c25b9ab707..99c8bd4b5fb 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -325,7 +325,6 @@ static const TCGCPUOps xtensa_tcg_ops =3D { .tlb_fill =3D xtensa_cpu_tlb_fill, .pointer_wrap =3D cpu_pointer_wrap_uint32, .cpu_exec_interrupt =3D xtensa_cpu_exec_interrupt, - .cpu_exec_halt =3D xtensa_cpu_has_work, .cpu_exec_reset =3D cpu_reset, .do_interrupt =3D xtensa_cpu_do_interrupt, .do_transaction_failed =3D xtensa_cpu_do_transaction_failed, --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772126; cv=none; d=zohomail.com; s=zohoarc; b=gPIS/pWC5erYAOFbujKFAAydlShiOm0yYv9fmUXYgxVbbEr+P3UE52zZlyBf3nnFoW9ftNpnaBLiUVv5ffnz4nlrnLsAbZ1H8EfUn8W6RMX7UcK0EvfA2J1+P0aNB1gEIAgmuQOmWsjecKrPPDkgqJPXBDAipHJIrWk39IJ9EpY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772126; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=wut0XX83wStumCYoHR6qDbC1UUGLI5szhsFIfyrOcrg=; b=CwVrByjm7gkjQbFaV9HLQ5fJ2dge2gisakdn8kKy+mjT7UdsE+43FpwLpCg1v3ZRtdAyeENfnmaWyUyC42m+ijvunCT01FJ1Q8C+UfuokB7AGAC5r74E9W12jLP8wtXWBOeqlYc/ScSKF1BZaJOcsAqvsHnRKat+iopPqfsfEB0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772126066144.45793903868912; Fri, 23 Oct 2026 09:15:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHvD-0005Wv-6s; Fri, 23 Oct 2026 12:15:11 -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 1xKHur-0005H5-Oi for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:51 -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 1xKHup-00027R-Pb for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:49 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6DnN2462566 for ; Fri, 23 Oct 2026 16:14:44 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmtvhw9-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:14:44 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93909014c85so208863385a.0 for ; Fri, 23 Oct 2026 09:14:44 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d427e68sm784753f8f.52.2026.10.23.09.14.40 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= wut0XX83wStumCYoHR6qDbC1UUGLI5szhsFIfyrOcrg=; b=H9eyk28zX4rddYMW dgRSpkmtT4OHGuBPUiwrgSzuDlxJhZ6lwn+MK1A0Nva4WM/GnlvRpyZru8Yn6KqS hoFPDzzO2L6sUOUtCrGWk/qoNMC7Ql11wAP+XgPVHQEmyIlFbmkm07L9X02+9s52 Kofzq60f26JvYuD6YcCegW/ty4nuVT6wbI1b+qPG/rHMbJxlgStSLwMYY3lFd+4X +hxr97DMm61FvL3ZNh7HCHmLPBdi3CrBoFxX5zsoJfFxwSeX/xmhnx0wu8Ap+b3V nRzXt2PAjpcsik43BnbI5pqFddmxp7t7dJPcaiNdmh+HyQsYxlaTlXtOj0Y45Qpb N6hBEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772083; x=1793376883; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=wut0XX83wStumCYoHR6qDbC1UUGLI5szhsFIfyrOcrg=; b=c+53HwJFyJIObKFPhBJklQj3izAS50oap8kyJ3iipTwBNVZxXLz2eNCi2jflYBXa9A 6dMJRBCmiZowrOEppZoVcohYI1xfYAa60QTNvNQjTdvRDJiaUoSPkHakcPGA3NflcNHl W/ro9hgzwNpZsgoBj3Ehm2gig/NeDEPJbZZ/Mnlqu7lHFVPt6GRfn8k6SSZ9rBSR/Mmp E7MB8B3+nPtBxMYZTy4KXcsSgVNLtWJjj7tLpqQdjufDQvXZih8PDfJXzp29nwF9C/VL +gTLeHuJktayo2YwxPKBIs2DYRW6KGSWFqff1RbJTEr1sda8kZeuTaCg8PZyUUeIXUu4 gY6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772083; x=1793376883; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=wut0XX83wStumCYoHR6qDbC1UUGLI5szhsFIfyrOcrg=; b=vIL4BkBemyDW9U7hkjQ3ViR42oKbT0Q+hkZRKaOsvgIoNHav8RuSBisRKnhT8seJXm LXQwokOTpYRl9bYEmmY64gcgIs+v1mNDurN3+i+chXwtNHoFJT3A6OkvB4RD44o8tF9Z XG1hchwJ68WQViKKgqBhY4b9E5hjOeunoxtZip9prf7ZeItv/hlkNcW4D9USU8VgLie4 1y5g+EXMWl4mxYmymhTyv/FQHPLov+oVCExNUT2wUmT03wnHPl/2+0mNLLnjGGgfYb0T Y3MQOmYiuP68fiqp0pWtOmvJ0ERpBEPp63x0QzYq93AEZxKaCdId//G1RTILiCZBiMoD 0VUQ== X-Gm-Message-State: AFq9FYJP6bKkLIY8T7MehV2crpd0Vy2SBOtO/d9L57d32ua3YD9iV/2k /++hvKmJUleB50tUem2OZRAEwRCdThx4hFWeBerOvwi4VE5xk9lavTSOGfKsJWG98SVVEf8eK2Z Ng9gK/0P1Ey52eperjfYJBTrKFE5vhLXu2WsDlDBD8J2jgftHy2YvRfJyNw4JyYeImjNQ X-Gm-Gg: AYBFou1fvdRpE5CTE10wm2KjKzoG0xDLY8uf0YEGpa3Bs2bwobCuwQ7HBdK9UkQxqjE woUInl2s/HdNw33P68uHaxQLaOtPuRyWUdXdCILKJ/sQvFhNXTlHYsi6GNCaLy4xh2uAcOhi9qa b9oEuutyrMCbckTWJz23Zqjl2Dln3vdTXKeR4uRMo5WehwIot0u0u6NgW0XzxZ3ua13Ba92XrXm qdbGsAwIXdI4q45nXjLou87a1C9EUdgi+72t8xBcuBsN1bvU62fBlvpM/IPi5l48/ryGHIgFWRl 2McNjzrOV/BN5KD/pQ0Ts4fgo/79OWvw04SET7Gpgz23lyr8GxgFD484vB5jfy9r7qvEM2sXJKe qxidYY01QKsAzAs3Qs6fi03Uj8Y14WCU+j3Kl0fWQ X-Received: by 2002:a05:620a:6883:b0:93f:3e45:a419 with SMTP id af79cd13be357-93f6f7cee4dmr451577785a.38.1792772082928; Fri, 23 Oct 2026 09:14:42 -0700 (PDT) X-Received: by 2002:a05:620a:6883:b0:93f:3e45:a419 with SMTP id af79cd13be357-93f6f7cee4dmr451571785a.38.1792772082241; Fri, 23 Oct 2026 09:14:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 09/83] target/sparc/gdbstub: Replace gdb_get_regl() by gdb_get_reg64() Date: Fri, 23 Oct 2026 18:12:17 +0200 Message-ID: <20261023161332.60153-10-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=Gt3XaU1C c=1 sm=1 tr=0 ts=6adb87f4 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=XEEDF0r_pM4_IqxSCIsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-GUID: JCZRwPvVjZTfolcDP5VIotF_C4J6WF-G X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX/XuUHFUtt6Jk 7IN1noOZIG4/reE1dZ8RFJ++T9eW9lOGRL+jNkEN4y86s0BEhQZY+lDNgMSkAbrH3LVKQLcePRd 8Yc3ju1Z/w48BtW+PwcTiNrgWGAY9NyEGaoH7Qd1PV39z6ITXIPnn/5xcWzINsUdgwFjIx8frCk 79KaVfwZv//HoBtetH8uN05qHTgBWagQCla2bHu/YVa80hMOWGU/d+6CBchEExrbh1bZMwzzveU yi+Ek1cW8NNhScNmm5eoiSKQK3C8t9d38qRAWZ5JraifkfEVISuNici7+B1REEdsCJdbB6QLd2T OzhkrRuK9hpTFsBZJEH4BCz7MkDufGipcjlfB8zzbnP3k2fbyx/ZOkEhNqtZcqxXLYZcfVVxmpR QM6p7hV0FXjhBXNsmg0Ec5joHuedTHewUopven8c77gjJtZfHM7KQ+VUT8Hg36muNOJv8Al/5VT MWc2cCBN4RAE1E8sRfw== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX6RtNGz21J46s vhrGt5+B5pvY7kClOJEGIOymHL2k7ajjsMFlvGxeXKnaJqt7TDmlZIDO17EnSYHjg6dQpBcZg1o naMbbC4RWVNc+lmDLjZL81e9HTZU0So= X-Proofpoint-ORIG-GUID: JCZRwPvVjZTfolcDP5VIotF_C4J6WF-G X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 adultscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772127367158500 The gdb_get_regl() calls in sparc_cp0_gdb_read_register() are guarded within: #if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) /* 32-bit */ #else /* 64-bit */ #endif Since the #else branch is only compiled for 64-bit targets where gdb_get_regl() forwards to gdb_get_reg64(), we can call the latter directly, dropping the use of the deprecated helper. Assert the invariant at build time to be safe. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261007232326.66240-2-philmd@oss.qualcomm.com> --- target/sparc/gdbstub.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index 2874ce1b350..d3ccf533839 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -106,22 +106,23 @@ static int sparc_cp0_gdb_read_register(CPUState *cs, = GByteArray *mem_buf, int n) return gdb_get_rega(mem_buf, 0); /* csr */ } #else + QEMU_BUILD_BUG_ON(TARGET_LONG_BITS !=3D 64); switch (n) { case 0: - return gdb_get_regl(mem_buf, env->pc); + return gdb_get_reg64(mem_buf, env->pc); case 1: - return gdb_get_regl(mem_buf, env->npc); + return gdb_get_reg64(mem_buf, env->npc); case 2: - return gdb_get_regl(mem_buf, (cpu_get_ccr(env) << 32) | + return gdb_get_reg64(mem_buf, (cpu_get_ccr(env) << 32) | ((env->asi & 0xff) << 24) | ((env->pstate & 0xfff) << 8) | cpu_get_cwp64(env)); case 3: - return gdb_get_regl(mem_buf, cpu_get_fsr(env)); + return gdb_get_reg64(mem_buf, cpu_get_fsr(env)); case 4: - return gdb_get_regl(mem_buf, env->fprs); + return gdb_get_reg64(mem_buf, env->fprs); case 5: - return gdb_get_regl(mem_buf, env->y); + return gdb_get_reg64(mem_buf, env->y); } #endif return 0; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772156; cv=none; d=zohomail.com; s=zohoarc; b=IiRn0Bb/A3mhCivo2d57Rme5fngQomLG1s9bBkgivySS/3ixjka8Qn/fUs1zocuKXLRl5CIZP1iSNpI1jsme+nyuwz54ej5MdVOw1bZj9cyu44+4iBLvPWxyhGZwV87JsyE/Dz3KPvoV6B80brUR6OQrMks6S3EoHggt4b1fBPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772156; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=r5ztHSxtnM2xlbH+JNVpudFMc8yyqAiO/5A2XjXGEAQ=; b=NFgMBYMXvcFMEQ3B/5tN4Q0RVaeLaX/mTB9qfm9G+XZemO/50A5gCkVUgCoMHP7DymRsDByCkrP6c84JVBZrn2hyzXw+GTyxHJF+nAAuUsWiYUtjJ2p+OVDCjshg1ILCiROuITW5gDRtH9ZpdRE1V0ceSjKzwjfuxZEhKysG+iU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772156235378.76490286599744; Fri, 23 Oct 2026 09:15:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHvF-0005op-4g; Fri, 23 Oct 2026 12:15:13 -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 1xKHuz-0005Mp-Bc for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:00 -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 1xKHux-00027q-5A for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:14:57 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6rYb1492211 for ; Fri, 23 Oct 2026 16:14:51 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauxyt-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:14:51 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93caa0ce0cdso133063485a.2 for ; Fri, 23 Oct 2026 09:14:51 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d416241sm728957f8f.43.2026.10.23.09.14.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= r5ztHSxtnM2xlbH+JNVpudFMc8yyqAiO/5A2XjXGEAQ=; b=D3cytxMC4vYCmrFo XDowlqFXrbZPBrcgoTWiNw57bbQIaFdGpIV73vzzzlTsBdJVume71//Dgr7rZ5V0 cS58L5bPetK8/ozHDlSizbTfliyio4Phg40UDh1Ca6mZiqRfwaAw7TG32R1Ab1VA Am/1o78kI24WiIqDzJumk7C4Eg5AcRiU/OtsHSGQD25DoMA4YjNqVjhhbHNas8Qg YikTtTOndF00uodA2S34ELRj1PDMPY964b0kU/eM4jW3+kb8cBij3DC6FLjT/ZTN 9mSBDd7ytE4LfOWFEy6Avt0kvJOdHD332p3JWPX134vhN5jRi+M1rNpdKWO6l0uh /+/Wlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772090; x=1793376890; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=r5ztHSxtnM2xlbH+JNVpudFMc8yyqAiO/5A2XjXGEAQ=; b=fZObYqEsQSPbilvaKQg11xHv6zHnCk085CLr0bogF2leRcMrahsYisJ9eOWfOjBm+x 6GO2UsCePszwRQLi5Meklo7j5hWaAVO3M8KGOmsIdyFw3aH3Mzv6N6Ya9psP409fCuBd MpsNYJhcRjsPMm/HRPGu/ZLRq/o+Du0OMf35jc5f8F7pXi9XpfpS7HjvacCpLe+xYnPZ SIekWItT9sUJYLROnzcjh6Um7eQWqXkB6Lgm3yMLL3dxq9F0+xNOth8eNzvN3UbLXCXi KjybqioEAxWpyr9lnSNd5TNVqkNIivGdZoL9y+oqhtZ2cHEbxjs21w1NAGCxZ6OZiCd3 KJfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772090; x=1793376890; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=r5ztHSxtnM2xlbH+JNVpudFMc8yyqAiO/5A2XjXGEAQ=; b=cmTwx5M96GgzsMCgW97bQ0LPUxgXtmg3dLKa8hW0zYLsUtCTJf0h0/HbpbQjpjPV9l zAgr/LhfuKDA/Jr0rQux+zNkuccHg7d9FUycSfb6BfBBQT5SdLcYzbwtd9iFmhkIhKVb 6SGpPYKBChq82wQ6BqkcLwpyiq84aD/YrLmxvPgG+GU3er2M86HQFZSc2k0b6mo6gZqU +pN8fBcSMs3VMFjcq9qspxpZBePgv8CQFSPMWmkRElV9+DSEt5QrXm7GrOp5yagucOxs EgpUZwueuEqcpeXN+l1kx7hGEpklWk7cpeNNzj53DvP8kydkyaeH2mQNnc9ib4ONne0Z k56A== X-Gm-Message-State: AFq9FYKiNmU8MGCam0kPtOr5V3luMNJMWm2kW+6jd0wfpEZuMx1033BB cl9271zxro6/FGDDLWedV4DpxVOZFKwdrTp9HDHPfoajN+3wJkR33QsuxEZve6fn8Y/kX/8h3lJ 4AudiM8jmlqitzcc4xspAIpba0J9smJ7bvFdnhwcPu2LTTPGO2qkcPrR2C7zxfr0rn2ri X-Gm-Gg: AYBFou1WafdVm546S7yuxC7kXNvGqI3SIVmMuKXG6ZYy5VqJx65R446axHKigaIPlp0 BifM339E/zKt7SxD/VtWGMvy40OZSSopgcucVfPX3xRsqCtzg48uQKApT++Mam5sffckLKWn/Kd +BzjtSuvnmHHY5EMYEyaw7CEnMmkNEV7kl/M+qJ0MQ/ndeyTYIiOFUI5WvINFnv4qsPgVTxHc6q iq/8Kj1Q7gEbjar1AprDy8zIwFHbicyV7fbuuDkz9A6c1u67EHlTpOAVCKef/GCW8pDf2zR1vM8 BV4wUQ0sDDoVwQ4RHpTYS4q0mpTABKQMfYvgriQQYs7veku0nKu4W4phcBNhCs0h5k3U++fSMC6 utQAWsFa8Q4shvhhywOLAEY5LhUMWVxQ/mTtHaMm6 X-Received: by 2002:a05:620a:439b:b0:93f:211b:a7a with SMTP id af79cd13be357-93f6f907cf2mr477026485a.29.1792772089931; Fri, 23 Oct 2026 09:14:49 -0700 (PDT) X-Received: by 2002:a05:620a:439b:b0:93f:211b:a7a with SMTP id af79cd13be357-93f6f907cf2mr477022485a.29.1792772089394; Fri, 23 Oct 2026 09:14:49 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 10/83] target/mips/gdbstub: Reduce to a single gdb_get_regl() call Date: Fri, 23 Oct 2026 18:12:18 +0200 Message-ID: <20261023161332.60153-11-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb87fb cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=_MRS0-8QzHIUbcTvO48A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX8SRc2dEFoIlT yWLZpe3rYQ/isxqmjAVLgspa922b+/Mwqy+vcGsXahHYYDBMQB99Y67KLM/xlKmHEzBhcWh+l0E 84QqT9ErjfTQXccxRDPs0B8ko8emioE= X-Proofpoint-GUID: WXtkGik3xbaCKlRRD3IlgYItfB4VEueg X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX17758+txZLdy 36CbDHWRM2hK2LtXaRh0fBRgzmmKT71XKYpyfN53exIKoJqrV8H3/n2yJFS21yftjP2rLBf6Qoy Q4i3gL2ILya4SwX4EGZoNX5d30La2K7pbpNlVrVQ+k8N+B+c18OskFNQDM4fN368kyeTe4PUYmd fCzzyRqgaJxoDMIZCdRuPaM+4otjNkqMl1IOpC/qJzud9/h/ZUDgJdSEV+QFlHAnWmKA5Gkz40Q bp3ak4UlpBx+isIKFX0MqhRWzkXTsFmk51/Dk1Gm8nM3vFw2vuQxVDK4Bky2WA6soX2Nfd0o1lS whRoYLjdCjrvtdp59CgAYUrUsWDEu2CLPcqSL8WD02psB/YkIMRz6ZgTCQ/1h0uSODQL2R6hgLd nFvPS6/TkKrIUrYsMdTHPzoDC6063bofGLp5HhyJDhEyw1axBUW9zo6dRe5Pa0kvhEgX13tWQ3D 4PnNyokf8goMvr9gUzw== X-Proofpoint-ORIG-GUID: WXtkGik3xbaCKlRRD3IlgYItfB4VEueg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772157919158500 Store the register value in a local @val in each switch case, then append it once at the end of mips_cpu_gdb_read_register(). No functional change. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261007232326.66240-3-philmd@oss.qualcomm.com> --- target/mips/gdbstub.c | 76 ++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/target/mips/gdbstub.c b/target/mips/gdbstub.c index 8e0b08a096c..7598aab6158 100644 --- a/target/mips/gdbstub.c +++ b/target/mips/gdbstub.c @@ -27,6 +27,7 @@ int mips_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { CPUMIPSState *env =3D cpu_env(cs); + uint64_t val; =20 if (n < 32) { return gdb_get_regl(mem_buf, env->active_tc.gpr[n]); @@ -34,46 +35,55 @@ int mips_cpu_gdb_read_register(CPUState *cs, GByteArray= *mem_buf, int n) if (env->CP0_Config1 & (1 << CP0C1_FP) && n >=3D 38 && n < 72) { switch (n) { case 70: - return gdb_get_regl(mem_buf, (int32_t)env->active_fpu.fcr31); + val =3D (int32_t)env->active_fpu.fcr31; + break; case 71: - return gdb_get_regl(mem_buf, (int32_t)env->active_fpu.fcr0); + val =3D (int32_t)env->active_fpu.fcr0; + break; default: if (env->CP0_Status & (1 << CP0St_FR)) { - return gdb_get_regl(mem_buf, - env->active_fpu.fpr[n - 38].d); + val =3D env->active_fpu.fpr[n - 38].d; } else { - return gdb_get_regl(mem_buf, - env->active_fpu.fpr[n - 38].w[FP_ENDIAN_IDX]); + val =3D env->active_fpu.fpr[n - 38].w[FP_ENDIAN_IDX]; } + break; + } + } else { + switch (n) { + case 32: + val =3D (int32_t)env->CP0_Status; + break; + case 33: + val =3D env->active_tc.LO[0]; + break; + case 34: + val =3D env->active_tc.HI[0]; + break; + case 35: + val =3D env->CP0_BadVAddr; + break; + case 36: + val =3D (int32_t)env->CP0_Cause; + break; + case 37: + val =3D env->active_tc.PC | !!(env->hflags & MIPS_HFLAG_M16); + break; + case 72: + val =3D 0; /* fp */ + break; + case 89: + val =3D (int32_t)env->CP0_PRid; + break; + default: + if (n > 89) { + return 0; + } + /* 16 embedded regs. */ + val =3D 0; + break; } } - switch (n) { - case 32: - return gdb_get_regl(mem_buf, (int32_t)env->CP0_Status); - case 33: - return gdb_get_regl(mem_buf, env->active_tc.LO[0]); - case 34: - return gdb_get_regl(mem_buf, env->active_tc.HI[0]); - case 35: - return gdb_get_regl(mem_buf, env->CP0_BadVAddr); - case 36: - return gdb_get_regl(mem_buf, (int32_t)env->CP0_Cause); - case 37: - return gdb_get_regl(mem_buf, env->active_tc.PC | - !!(env->hflags & MIPS_HFLAG_M16)); - case 72: - return gdb_get_regl(mem_buf, 0); /* fp */ - case 89: - return gdb_get_regl(mem_buf, (int32_t)env->CP0_PRid); - default: - if (n > 89) { - return 0; - } - /* 16 embedded regs. */ - return gdb_get_regl(mem_buf, 0); - } - - return 0; + return gdb_get_regl(mem_buf, val); } =20 int mips_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772124; cv=none; d=zohomail.com; s=zohoarc; b=lRKboqvve0YWScdt/96wX9lEgnlbdRnqsdVSP3X1xW7wD/7iWBNwAttMPRJ0bTSz8fW7SFFtS9v6MVcetTJcCWkeNolboJdFanjwNDXzFBTcfQun3K8h1EZC8LR5O0ZLpuZThdVjRL2woAgsd3pDCXtNZ2AEZW7eqi31/rwYPsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772124; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=b8VNFEOUdeLKH7/abdgQIZopNBDubsWT1M1wT73CMKc=; b=mqV7Ttl17zaZ78IWkNEvL9dbjRbGYoroI6blaIUCf8CPExYf4ax9AxI1y+KuxRhuaLwDof7WI4tuxFfvJhZSbJDBEbgPQDqieoxNvqVzLnhc+e+6ERMyY/h7TfiPmoV6uukwikhsFGq/5zPIMiMBrVQ9mEV7X509E5Uzu/gNe98= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772124431234.66881450558208; Fri, 23 Oct 2026 09:15:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHvJ-000655-Vs; Fri, 23 Oct 2026 12:15:18 -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 1xKHv4-0005Rp-SD for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:06 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHv1-00028A-CX for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:02 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6Eib2215922 for ; Fri, 23 Oct 2026 16:14:58 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc813t-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:14:57 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93f20addba1so201408385a.1 for ; Fri, 23 Oct 2026 09:14:57 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3f0b8asm766783f8f.11.2026.10.23.09.14.55 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= b8VNFEOUdeLKH7/abdgQIZopNBDubsWT1M1wT73CMKc=; b=dnyWPWqpbeLYWnw9 CPzOWNQDMJ88zmbXZO7gYMXK4R7nq5/8CcZdbiAN4UZpqiNXPrhKfs1Nc4azGQKs f9mP2GRi3+mxz0q9m+w1L8FIGOSCKwiQUJwuHlK44L37T2Nn1AFbsMoEl+9Oh9yw /r9wJItp1XRJtb97ZSSXc9xQl/i8I04uG7krwyxr1/XZzEdlPcM8Dxn3AsKQJzry t6wkKK07ktsKIg0+Jy9Y79o6aTlXi2vykb8o48fXTZlCq8qOkFx2kOmRqRmH1XsV gLxAp5Orx6CNl3H3VuNtojXXSDugtflhoUabb10b7lQLaQO73pDZ7St2X7KyJrdX 3p1emw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772097; x=1793376897; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=b8VNFEOUdeLKH7/abdgQIZopNBDubsWT1M1wT73CMKc=; b=jR7UGwPeuIuEUvFoc5Slesqr7mrCHLlwTyYVsqQtTd/tW+aDb7VR4PiTneBgGHrlkt aSu8Tev6G127yCdX9xnHZMNiGSv8ELDYaS5M3fVpsO9Qqkued6Xg0lUMPDDeuiFKLYwZ XHh3h3Ei35OBwGwetcMiiSh8FWbM4aiLsB8OsR0RLN5YjL6p72bJ9tXv20tubpyxCCJL w+UpgtlSD0TdOQNYOYalOhB61vlzxI+0X9pTfW9OKmHpLj8vRwORvvuGTlji2ZHLkxG5 cCnKVfBKxQGhpC5uoHQoifbWuqdj3pyu3U4kAR9STsi81M2Qcrfj9Jf0zdnMQ1CcMPSg qU7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772097; x=1793376897; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=b8VNFEOUdeLKH7/abdgQIZopNBDubsWT1M1wT73CMKc=; b=sENcU3/D0D8JH1ChwGY2XQun3HsPL6QNPmB8sbykRUN10ftvkS7u2uD4jCr56cKGdP 2hl9A0i61NZMh0sCo/vw71S1sOxAVd/pa+Wecy8X7WbnNdRPGfgW41iiIp/cx4hvj5wu eXEVaTRla7vp3R8QD0C0iu+k+ASLwhG50QxePnxMvjlEwl7EhHhaJbsirW7Ayg8XEsqb KO8zTH2WtovPVr0EHbdvz7EM+OyGpxUmMyOcOgQJrHlG/lN+rebtJ0GhwY8MUIPHe4F9 PJqggZJgXpFafWTGQb2lLGEF/gfl1jpBTqD+5EDH943f9KrZumnnPHhM4MsqJxjMmwN6 r/uw== X-Gm-Message-State: AFq9FYJ+rAOMRGtW/tnfYXSdqToZeB66fU2nGWECe7G2bgOJD6GVFmUk 7yl9eb1MSj53Q1dX/Xbzh0uHACBAYdLfee4me8HhwPFQTW98tP6ov9Am73w1fwFGstAE2GZpr3G Q6SCK/iEL07mH10HVweeQ0TTqErixnMtwYkgajrfeh/lkLz5P3J9hGibgzsxDSfdWxvaL X-Gm-Gg: AYBFou08m/RF8Plb+1v+OpBlAaaVQiFqbczCqH1TR/5PuA2QK2P/EybsBSrU7Ja99rB dAlnqkbZaX6MOQia8+r8v//+04rJAinBQHbxSF6VSX0AnlU05z/Cv8BOw5KJJvS0lV+uP6TzEww yZWfqlBJpWFXwbyba03nKUgFBbTW6KG6aQ+7SLWtSeEvaXMzgkKC6Cx81rCVNnuLb6MAcqnZ3pF 2tnmNKnO2SQL4GCoukdCNDai47v+sz+Ru0kfZeBDySKdh8jrYcHkSsAG2rtHV4A9c3AGwhL1Qn9 bdijpSVMHnuADmzpv2LMu4hDLAJujcvyo+UEnGz9GAFGyYNThxqxEbEJLLV/Qf5nVnXWoNNFDF3 j2I3KmXh8uCW6M+ADdONnNgV+VfgsZtiPquJqe1+e X-Received: by 2002:a05:620a:3910:b0:93e:c12c:440b with SMTP id af79cd13be357-93f6f8bc772mr531721885a.71.1792772096906; Fri, 23 Oct 2026 09:14:56 -0700 (PDT) X-Received: by 2002:a05:620a:3910:b0:93e:c12c:440b with SMTP id af79cd13be357-93f6f8bc772mr531718985a.71.1792772096465; Fri, 23 Oct 2026 09:14:56 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 11/83] target/mips/gdbstub: Replace target_long_bits() by mips_env_is_64bit() Date: Fri, 23 Oct 2026 18:12:19 +0200 Message-ID: <20261023161332.60153-12-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX+fpnyEpVUvH+ rOspz5L13Sx/i2cx8ZCCLH3pUbRCPtPsO+qeCmYF1l7zMTjpm8xvVrHsKFXKwynB6JwSy0+8PZQ 17hZXWs+E59SgOZB+Km9m3XJQCCxQS4kxXuq0xLomJ7W6us7QoC/ZQWlQN/oAUJpq+wHwRp4ye0 L1xqP2g8o3ArOJqeagG2xbf1XrOEHyq4oUWQd0R9YfVieY5q7DUx5WZHsKYpOHS2wS5P6fAyAb+ +TdLAIZztOZaIp1T0uKrUgsJ8gus7L4m+mESTYuVod7EhgqxxD7hc3cKHLmFOQ24LIlUxEnUKMb ZximE/+pIWUjuM8WQzm0i9Gzs6wwQ8epRDnJgmneHRPwtSIlNulVrOC5uPwCTSTliD1ujUyNble 224YzwF02iBCmMsfWju/8yTsxX4P8OlpMWdqqvtvIIrqs3T6sAJCia30yV8727TZthVqx/3ZfZm R2tEgubY55uS6bnJ0hw== X-Proofpoint-GUID: h-clAmHodS1-8BARgE2utOmI_UD8K6Jo X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb8801 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=4t97mPZE8VEZQuOP_ikA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: h-clAmHodS1-8BARgE2utOmI_UD8K6Jo X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXycuXUkMsL/ts /FEUc4jr5J8T1l/3YDuDXo/F+j+f/ADr/THZrEBhcVzuSD7VflTXY+prMRINAb0+f2c9m8h3I8s xTForM+Ya+RDcwp+ioBcWbtVNsR99UM= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772125361158500 Add a mips_env_is_64bit() helper and inline gdb_get_regl() as mips_gdb_get_regl(), so that the GDB register size follows the emulated CPU model rather than the target build's TARGET_LONG_BITS. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261007232326.66240-4-philmd@oss.qualcomm.com> --- target/mips/internal.h | 5 +++++ target/mips/gdbstub.c | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 7dba22300b1..0c9b1335ebb 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -228,6 +228,11 @@ static inline void mips_env_set_pc(CPUMIPSState *env, = target_ulong value) } } =20 +static inline bool mips_env_is_64bit(const CPUMIPSState *env) +{ + return env->cpu_model->insn_flags & CPU_MIPS64; +} + static inline bool mips_env_is_bigendian(CPUMIPSState *env) { return extract32(env->CP0_Config0, CP0C0_BE, 1); diff --git a/target/mips/gdbstub.c b/target/mips/gdbstub.c index 7598aab6158..78d3e9a5b9b 100644 --- a/target/mips/gdbstub.c +++ b/target/mips/gdbstub.c @@ -24,13 +24,20 @@ #include "gdbstub/helpers.h" #include "fpu_helper.h" =20 +static int mips_gdb_get_regl(const CPUMIPSState *env, + GByteArray *buf, uint64_t val) +{ + return mips_env_is_64bit(env) ? gdb_get_reg64(buf, val) + : gdb_get_reg32(buf, val); +} + int mips_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { CPUMIPSState *env =3D cpu_env(cs); uint64_t val; =20 if (n < 32) { - return gdb_get_regl(mem_buf, env->active_tc.gpr[n]); + return mips_gdb_get_regl(env, mem_buf, env->active_tc.gpr[n]); } if (env->CP0_Config1 & (1 << CP0C1_FP) && n >=3D 38 && n < 72) { switch (n) { @@ -83,7 +90,7 @@ int mips_cpu_gdb_read_register(CPUState *cs, GByteArray *= mem_buf, int n) break; } } - return gdb_get_regl(mem_buf, val); + return mips_gdb_get_regl(env, mem_buf, val); } =20 int mips_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772178; cv=none; d=zohomail.com; s=zohoarc; b=l59NoBiHXo8DvtPMOr8evI0M06ou9maJMHtiMqGZHTZ9RwLXfVC3c+nzPkTPna3VHJg+FlWNhcYZ0EaXSuO5DVC6iNqGn8jEAr6wBT3pZPDS4l4QkI1yPcNAYlVSt7l56UjOCwk45NQkXmsKo8cjoloveo1HtXzQP/JvkVNpzHA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772178; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=bibHLDn0S1CFBZ5JTPhtqnrS/+dx4AWZd1scb02DDkI=; b=Sb5r11gua4dP7uU8TDABfvGNNZdQWTzaToZ44uPzJ/+0RoP7H9O9a8U0OqwPPfBNU/AGiODb0ctsHUvfn0qMCDmSaXcqFbHYdQKbz7f17XkBmQ9s4og8aSLuVOBKfDyH1iZk43Pe82p1w96vzWk0G2fev1Rtlky2vcttTiMzKY0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772178037365.50402090366424; Fri, 23 Oct 2026 09:16:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHvF-0005pZ-E3; Fri, 23 Oct 2026 12:15:13 -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 1xKHvA-0005Yt-Gz for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:10 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHv8-0002Dv-Qt for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:08 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6Cqk2215811 for ; Fri, 23 Oct 2026 16:15:06 GMT Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc8148-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:15:05 +0000 (GMT) Received: by mail-ua1-f69.google.com with SMTP id a1e0cc1a2514c-98a9c848bf0so247884241.0 for ; Fri, 23 Oct 2026 09:15:05 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a318c8f136sm5961655e9.3.2026.10.23.09.15.02 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= bibHLDn0S1CFBZ5JTPhtqnrS/+dx4AWZd1scb02DDkI=; b=MwyqJTltuDmWcEbu oll942/BnUmojXFIeNRO0L5Z9XNaHh+top2N7s4nh+Uu+LUGmdln1OGE/Jlt+QaX 8lYoSsGeMSvDZbjvilYX25+YWI4bex94Bpk4FQ7R6O1OL0qou4RRMn5krs5VFhPt bgxUdnbBm1fNBbcpmF9adI2SNdm5zH3TpX/LtmX4uRHIGH+mC+y+yhpHIdCPjx9V evmR8ZjfPe4W5P3SXiGX2S71TzTbbaTXM73at2XZcuV3HRRq48TaefuoVkNbuzjw /SiV6WAINEgb6FhK5H1gYsJlWPg5vRzEApqcrQa5365Rb7me9BW1vDZZOllzBQQV +LVdDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772105; x=1793376905; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=bibHLDn0S1CFBZ5JTPhtqnrS/+dx4AWZd1scb02DDkI=; b=C4u7xxPC2xOxiYO7gYqgA/0nuUaVQT7piKXqWaewpLtzaP/GJ69Nu6c0M13yRCixFf nWdHChpcZXIQEs8WLP3C1OwWsINpdMXPFf1tHht+vl4XVe51VA0YtMhDGTBNXJa9Oh4d Al8WbnkUbko/u3xAli4tv0p0YupWKEZWzTqRmXTTHZD6RucfUHJzLWglTN6rEHKrjcaZ QyrH61ikME/eyMABmEfrR2X1hTvsUaD96s8UjUNVp7o3BBJ0/FM1bzQ78H1PHDueDwBO HmlB99wKQuEFkJYSoyUj1MwW4qKIEEW+bbwv5UyAiNgs/9bnNFOAP04tWNFxL5wg5EYA 1HPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772105; x=1793376905; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=bibHLDn0S1CFBZ5JTPhtqnrS/+dx4AWZd1scb02DDkI=; b=kuvIYXa2ismaUEjBbnhh64gaF4ubkMMwU2H6KbJiZuHT9kE53+QtoAuhdfU9pTfEPm zM0pjX1Spg+aZzcapWyEaOQ8hSBdoenWXFIr2K9iWz7VkmAK7+oyo3VeQKKcN3jUzF7u T3r/LQv/9n+ccXr7Z0ffW9FRlrVniDzJFceaf/CNzMRNZDvh5+XV+/rCbxBDxEmoZj9+ aW0OjR+HzqxP2KTzypItJZkmF5991QlGOWUM4p20yTHHrrAnKYqfmDsnqcGrq+wA/Oc4 Wcmo8nDH4sdeVrBFAtqllVxereFwrq+00unF7CPub+yRYnHVNAEAhYyyHlvkDeNWIaVe DcRA== X-Gm-Message-State: AFq9FYKXCdvfge+RzH4Cv8d5Azr9Y0jSf6faAFPnLtOKPlfaDP7HPZz4 hBZr5JrAeD7byuNcWBdD2XwDpVpq+6N5lOWwK7P+JZpMDv6+22S/EIYSSzJg2DUcEHGUOLeHIQt T5g45WdTcFTPRBygVWmlLG0YOOX1kb1dGPU5xkJ7uaVOAYzeS+hBRk3QfH7rwH4w3jmBt X-Gm-Gg: AYBFou1W81XQF8cOk+nhkY2XAfa7RwcSSIej5R7YYiQTkIDXNWEMheCHowmSFCpPRoS aUNaHztGTs7akAq/qGuuaWM3HLOID4rVJbhMci8SRayTWl3cv3BD68LmBrvz5xw9fYdo5XhDKnH q3BGyRlf1pRNkKLF7my/Eooao94KuEXM+52xiKjxR0tuMMSgeSeIrFb9I7eYJEF3kDBY5vrBjAb lp/jTL56tc4a30zCnRsfb4sxxTZHU7Sdb5rLovl4R0TSXNMsadBDierHtyiZtxp44XRgs1UINYC PDCk6/j/y/+4LsjVbZTdvKg3Vz/v7st3FhjvlD8eCJJ0FaI6XJaVERvdfx0gWMnjHOil/fQdW2T THTJHMDGWzAwEkUeVhACVt2G5pXXPRhHPHZs7E2e/ X-Received: by 2002:a05:6102:644a:b0:7cb:bc5e:7dad with SMTP id ada2fe7eead31-7ccc32fd429mr1074582137.10.1792772104960; Fri, 23 Oct 2026 09:15:04 -0700 (PDT) X-Received: by 2002:a05:6102:644a:b0:7cb:bc5e:7dad with SMTP id ada2fe7eead31-7ccc32fd429mr1074575137.10.1792772104201; Fri, 23 Oct 2026 09:15:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 12/83] target/ppc: Factor ppc_env_is_64bit() out Date: Fri, 23 Oct 2026 18:12:20 +0200 Message-ID: <20261023161332.60153-13-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXxiqD3oA5LE/e Se1I4ku5w/Zqjhs0SvuHR6R1DeGA+dwnKDBoEtwmIigmC91wJRuG5Fk0GgbKDsT6O7+ivm6F0A6 L+9S5jYjO6cKP5l4q2m3G6IKHuKCGukFwB6oZa3LJDBdlJF1/+uDyCJlVbaxsQYuLaJKBWbw7of pG9ypR9qFp9q9Vh4h/BfrK2DzsUjcYr7oQR7LAJo/Ml0AbJk/7x934wv4CbIQQOB7Hv8WgNK4Ii EAnDiD/cBuiHRRz4ef/qOxFGUV1H8MrY8ek4fF8qB/avWe2EbTbpJxu5w3mhbX8IL5RuPtgD77D 0NCVDtel3oANzkY8dQXCGktU2nAIzNPGaCSVDnGxolNVB5NE5O0n6SO11rq6WGWOxFxSp0mIFJH WHduC3PDr5+27FLCN9GSOMlkxDI4zJY4HK1EVxLX5HWYMCjdqW1Wlhfjx5LZX5TCttD2mWR4RBj s51eSeSzt9WPBzVHtFg== X-Proofpoint-GUID: 6Fj4_gB6VwEJvaoD9rOszm5vwPFVI8Ln X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb8809 cx=c_pps a=UbhLPJ621ZpgOD2l3yZY1w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=VnNF1IyMAAAA:8 a=Kwhbg8pJGtqcix1HUGwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=TOPH6uDL9cOC6tEoww4z:22 X-Proofpoint-ORIG-GUID: 6Fj4_gB6VwEJvaoD9rOszm5vwPFVI8Ln X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXxS7GhxuLVPMg Ot5wifhciYwTd6QfhUsCTvw7ug+XW824yh/iQ8d0Q+5hcJv1NJNWlFcFuwkLnEzxVfi8zS6hE4O EQttuPnhBuBBqhxEQ3enNKUmVmOLY5c= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772180263158500 Replace the open-coded PPC_64B test in register_BookE206_sprs() by a ppc_env_is_64bit() helper for re-use in the next commit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Glenn Miles Message-ID: <20261007232326.66240-5-philmd@oss.qualcomm.com> --- target/ppc/internal.h | 11 +++++++++++ target/ppc/cpu_init.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/target/ppc/internal.h b/target/ppc/internal.h index b3ed57eaf73..11fa4ee5417 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -23,6 +23,17 @@ #include "hw/core/registerfields.h" #include "exec/page-protection.h" =20 +/** + * ppc_env_is_64bit: + * @env: the cpu context + * + * Return whether the CPU is a 64-bit implementation. + */ +static inline bool ppc_env_is_64bit(const CPUPPCState *env) +{ + return env->insns_flags & PPC_64B; +} + static inline bool ppc_env_is_little_endian(const CPUPPCState *env) { return FIELD_EX64(env->msr, MSR, LE); diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 0431c0e0ae5..89a8b14a393 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -869,7 +869,7 @@ static void register_BookE206_sprs(CPUPPCState *env, ui= nt32_t mas_mask, spr_register(env, mas_sprn[i], mas_names[i], SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, - (i =3D=3D 2 && (env->insns_flags & PPC_64B)) + (i =3D=3D 2 && ppc_env_is_64bit(env)) ? &spr_write_generic : &spr_write_generic32, 0x00000000); } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772170; cv=none; d=zohomail.com; s=zohoarc; b=CN1Z9lcCNtqMgjdN8E4GFoqQiCu4igmEyh21MOFyxQEklni2aqz3hZzbyXIBQITRkfF5FZVnweqiTVGA24Zn5feilMoYP4wlWs0miPPnzcw1HtTOkSId0YlpL7GAfzS7VmMTsGaN8dpYQpfytmylQb3SxyJbx4zObb8BzAPeDEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772170; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ws3bqIizag87NJdmi9/5Ducto5GBS7L74eKuIpUR/EU=; b=gIoVki1XDX7pq5RD89wX69n33vhBLBi4+jtTqNQlFYXiZqjEHA2gULbfQsqPomHU/Bv/K/spRuXtrsbzQI49API43XeZKxc82GFo8IQGstM6ESmnnsOUabqbai8PXyw2SWx+vgwdi/YSdqoW0r7NUt4/1U6ILTJQaY2m/M5wU3s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17927721704558.235088290666113; Fri, 23 Oct 2026 09:16:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHvN-0006MA-FA; Fri, 23 Oct 2026 12:15:21 -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 1xKHvI-00063K-FJ for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:16 -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 1xKHvG-0002Kg-Lz for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:16 -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 69NE5vET4063351 for ; Fri, 23 Oct 2026 16:15:13 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrcgjw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:15:13 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f37c94ceeso425875085a.1 for ; Fri, 23 Oct 2026 09:15:12 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2fe0e577csm9117375e9.0.2026.10.23.09.15.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ws3bqIizag87NJdmi9/5Ducto5GBS7L74eKuIpUR/EU=; b=OzRrH+7ERGbdDoJF 1p3Vq3vTiqTRDhb2bFXKi13zL0qxMigqLhgSgNPmxkf4Kksj+6kWtVM70oCOuMZF tYyKondTALsWx01ro3ciOAnY/GoeVY7h+tK8UD1X2VzON9XgeRoaHnN2CygK9gmK ZHIrRZs4PxCt3o7PwfsVfbLBaa1yvEebzwyshjAz6nW2rNDK3fMEQYxwNa/wEvrj 8zKAjHo9uSHKfqdopW4Z6S3izhKim00ZSvhOzV9CWogQBL/rKTe7oMlDcQ/QGofq 9NUPA29a60q5BFED8L/bUfeT+uCxgI6PRDYKfWUzGHyoqRpnvHkvpd04gtdBxlHz ByKs1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772112; x=1793376912; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ws3bqIizag87NJdmi9/5Ducto5GBS7L74eKuIpUR/EU=; b=RCXWMMMYWJgBaBnzyO2HYTndJrjvpRu/Jkhcu2adS9mX6Ge6elsXLwb4EPWO28SG0J hNN8FZzlVrrvlolkBCVDNXqjoR2glnHvN19ZRF66vtpr7qRgCV9W0cbmt8++E1TKXb3B 9dccV9xdFB0iLF+TkoeqX3s5M+QG1h6hTDxkxV3xxWD8fu9qBw/02lgUAzLt7KqzbiYJ UtIrKmyk49QByyI0Ib4Oa7r4ALaeUNI34Zyk7LfCsKtjye0wJTaI1kClLycz+ysoWTRX k9HQ0HKCWgKfYj/ZMX2f/woVAWfCj58OxIUlJk0cVPlzQUDIdTx94bpcAPrN85hZYBJo j84w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772112; x=1793376912; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ws3bqIizag87NJdmi9/5Ducto5GBS7L74eKuIpUR/EU=; b=jko2SdUfe+RVxq9Qu3V/srjl7FLapuW6jMSLfziZtZDTBztY/ToOdncbOrtVbbuptY paPco0t+FFFWWmu1FDyCOK9nGX3DEbINpnfQdrN/r6+TM0cXAdta0aV+aTltdON45+GU Reuz5pfo46B3n2XheUaBQ/Ctk0EASPrAFrasJQpal++hfZHP0XKHP2+QLvXArTlk8aLe /zYYoA+H2ata2YG8Swo3Npq/i/1HFjPQcU8G4hdylpod28J/5jJQxwmpjC+uubgJJ+qG LPHSlJo1kpCTwNkgnpsKCpqVGy5CzfTHQrNaGb4NNz7vhqv/qRad7cwQXyt2kfVpU2Ns gEBQ== X-Gm-Message-State: AFq9FYJiFFSTtiuhrDvJhRuQ+Uc5YwIMJmv1zxSZmLEIpINxO6DtxbHP BLSOZ7X8586Wv6hUKvvYpJQjc2aQcswp3xik+aCyBjSNBHUjJBzqE5TvJKMkGh2OCIuqsAh4pC3 igzSq1D81wTJkAlDAUa6hHbR/EzJo2V0owC75AV7W3OHo8R4aObrKcbR3PmCummVnvGQ4 X-Gm-Gg: AYBFou14fGkf16xCg6+Wiebx7/csoeYae7NYltaQEFv3UUr8bSvGQxNS/Yd71Z5U4sJ z+ZBD1yliVCcGJ2fPD+3EL7hpkV2rgoDrHgkFf8Y797gMTadokTI5UOcY2wjPJ5SrZspYKRbHZh T+bnt0F3+ljLxvckNwWsq0wtUWrVUuJMeBpFND/xf4UMS2OdynezHSsC2rDDb4+OZ3Ab3usif7u VUqQWrNc8+qyXq6pdWktgqKaD9ktDiOinkIxpD6qYDi91Z5QPKhbZOXl8AX6HIHRRCClmt+ZC81 kb5Gdgm4Ai0hRSniA8OXvjsqN6kkarhz49jzIynqjM0wjAzRhuHd83g6BSbSHcfdyEb0sRGdZJF hiiJBLu0Y/PQ/geVq5HEDerfk83Cm3hhxX2gYexZ1 X-Received: by 2002:a05:620a:460f:b0:93e:6e6a:b686 with SMTP id af79cd13be357-93f6276d418mr1034076985a.29.1792772111945; Fri, 23 Oct 2026 09:15:11 -0700 (PDT) X-Received: by 2002:a05:620a:460f:b0:93e:6e6a:b686 with SMTP id af79cd13be357-93f6276d418mr1034071585a.29.1792772111447; Fri, 23 Oct 2026 09:15:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 13/83] target/ppc/gdbstub: Replace target_long_bits() by ppc_env_is_64bit() Date: Fri, 23 Oct 2026 18:12:21 +0200 Message-ID: <20261023161332.60153-14-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: TYnXdfSEXcNvSEwfcWXRXrUqE6IXyrl1 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX4gvyaCH4Eok7 zutGOWY7AGJk0dmTxmLzIfGzzNdkqjbnSdXf8kjGmYGEqunfPNt7LdaKebHoD5SJ/Kr+JgqrgqY 1VNHDhtfx6+lpC1pZYyp3GWEg44SdQE= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb8811 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=VnNF1IyMAAAA:8 a=XEEDF0r_pM4_IqxSCIsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX1pyFWP2Ei8TU o2a2PckkaW+n+51XkFoDhvS3Sd6kxL1ATJBXMiGeJodOEw8QXRp80w82B21+PR4aEHoctYFSU2e zERGFQvdPKeHUgqjEDhMPK8QxoJXGyCDFbkrv0wzPpjB7QQdm9V3Qu0zF+lfJHL4qKvmGHSzie8 a8DN+FnQgJQTekSuPi7EgvlJ8NCOlkvEU8gZ1gh0JocMWqmzjPRuC9Ski72zErAtxtc3vsOMGCN iAd9DgcDj6NIqYxlPWkjOPA41/VzB+fryDz0S3Ei9OzFQ+YcfowU6LsVX1mZKgMkTC0eUiZP7qA xFOs3CzVSldB16Mit4QCijdQaLRcyi4EIWx1HfTe789ECc+Qf83kD7/A8p/GYAV1GUacfHDmMTH akfZU4R6VEyUxTHZyedRFgCmrXl38oUAHaGJahlnJv6Rg4s5KveSy7HFFcw5ElmLjauxMgNm0Xk KrbwQLWICyiyq7vcAJQ== X-Proofpoint-ORIG-GUID: TYnXdfSEXcNvSEwfcWXRXrUqE6IXyrl1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772172123158500 Add a gdb_get_reg_bits() helper deriving the register width from ppc_env_is_64bit(), and use it instead of target_long_bits() and TARGET_LONG_SIZE. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Glenn Miles Message-ID: <20261007232326.66240-6-philmd@oss.qualcomm.com> --- target/ppc/gdbstub.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index 4d622c5cad5..ee02be63ce8 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -23,12 +23,17 @@ #include "gdbstub/helpers.h" #include "internal.h" =20 -static unsigned ppc_gdb_register_len(int n) +static int gdb_get_reg_bits(const CPUPPCState *env) +{ + return ppc_env_is_64bit(env) ? 64 : 32; +} + +static unsigned ppc_gdb_register_len(const CPUPPCState *env, int n) { switch (n) { case 0 ... 31: /* gprs */ - return target_long_bits() / 8; + return gdb_get_reg_bits(env) / 8; case 66: /* cr */ case 69: @@ -42,7 +47,7 @@ static unsigned ppc_gdb_register_len(int n) /* lr */ case 68: /* ctr */ - return target_long_bits() / 8; + return gdb_get_reg_bits(env) / 8; default: return 0; } @@ -85,7 +90,7 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray *b= uf, int n) { CPUPPCState *env =3D cpu_env(cs); uint8_t *mem_buf; - unsigned r =3D ppc_gdb_register_len(n); + unsigned r =3D ppc_gdb_register_len(env, n); =20 if (!r) { return r; @@ -127,7 +132,7 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray = *buf, int n) int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { CPUPPCState *env =3D cpu_env(cs); - unsigned r =3D ppc_gdb_register_len(n); + unsigned r =3D ppc_gdb_register_len(env, n); =20 if (!r) { return r; @@ -251,7 +256,7 @@ static int gdb_get_spr_reg(CPUState *cs, GByteArray *bu= f, int n) return 0; } =20 - len =3D TARGET_LONG_SIZE; + len =3D gdb_get_reg_bits(env) / 8; =20 /* Handle those SPRs that are not part of the env->spr[] array */ target_ulong val; @@ -294,7 +299,7 @@ static int gdb_set_spr_reg(CPUState *cs, uint8_t *mem_b= uf, int n) return 0; } =20 - len =3D TARGET_LONG_SIZE; + len =3D gdb_get_reg_bits(env) / 8; ppc_maybe_bswap_register(env, mem_buf, len); =20 /* Handle those SPRs that are not part of the env->spr[] array */ --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772183; cv=none; d=zohomail.com; s=zohoarc; b=I+Wbu0uhSYb/8HyneyVFYZjwA00uEp3r640WBYWnJoDToL4Gqxj5129tjAj2nYWm6xX/DmIwNSvk5JRsMLOJlCyNbuQ3SspyJBPqQXL8kD5sb/hffJJRnEU+Cicblg/wmY/qdk3iQ9mli9ApAE20cNTp80QY98+yd89HHtMoctE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772183; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ttnh8O3EdsZ7ga2Ka3CSnzfU/hl8LtB/gPNp0efbYoU=; b=f8cz4xkKBo80oyOsK3fc6rWuZwfssAlwhQ3OFLm/Zs6t6+Wz2OgYZSwTcHjASfHJZiATL2lY91ExmOXktcNGWqCtxiaFw2niiA1MEKJbEzCbxZcws4JnR/aA6m99y0hanunVf/x94otlOSxjLfFR0pyoR+VCcNF3qPz6n3A2cRQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772183751127.77099279663605; Fri, 23 Oct 2026 09:16:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHvv-0006rX-Oq; Fri, 23 Oct 2026 12:15:57 -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 1xKHvQ-0006cJ-Uy for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:30 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHvN-0002Ky-Vw for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:23 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG3gfo2930960 for ; Fri, 23 Oct 2026 16:15:20 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas6r1fh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:15:20 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93f568dee56so217182985a.0 for ; Fri, 23 Oct 2026 09:15:20 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2b064084esm13747045e9.9.2026.10.23.09.15.18 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ttnh8O3EdsZ7ga2Ka3CSnzfU/hl8LtB/gPNp0efbYoU=; b=bdVL3qUGHisXtbj1 htGIVsZkOu7zshAzZAtHs+rmhBeP7RsmnGhCqy1MCcvCtfcHUqxps14I/pAZmY8Q ARKucMNncqHDLwgJTiEdn0djdkaIfYd0m9gq1a3W/JDBmuiG8Rw1SqrP3szIAbmy XozVfzFi4QyS7yf4D2AH2c9pCbE/9AUElBgb8bYn0OA8u6tgnYzsgJDt6YJsLtk5 iTscabkHBeV0U0uA8tW4dRAYWtkop/1JRYCwtENMI48UaKUlvD1HplinUfNBj80w zatrrnIPJoKhKUjFf1DEEGCHocDv+flrTcEPsNeiVjL591gAJRXKbHRZ5XEtu7V0 KXNFJA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772120; x=1793376920; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ttnh8O3EdsZ7ga2Ka3CSnzfU/hl8LtB/gPNp0efbYoU=; b=iBj4cyfpJgxhMqkik9Dv8yFVCETNibOeV0PWANt0Vj7RwYFLr34O2RO85QzaIJVoyW Sz6ZvbCnEuvchfEtKzDnX+JPDRoqRoPqxxpSHkqg9chSj5ogGQP6oA08E7GiMbD2ifFH TjjZRMCaj/bwuW/8YkDuXhWf2nxmlvDR0f0+UwXLmQwNTxZ895pMWvZY6/rfeuxcabLK e7Ef7v11bTa3k1tFyP7DiI++3jKed9we0yMjnUAj9prRXkcRSzMO0lV1qLDtBpI3nGMp 6H0iQqnlabVkHB+QFZFrQg5zjHf19gXJMMOBA0tj3xzMRQ/y6hwHajNJuF3SL/Ho4bBv GNfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772120; x=1793376920; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ttnh8O3EdsZ7ga2Ka3CSnzfU/hl8LtB/gPNp0efbYoU=; b=i4dT8sqzjCscXLojScsyyES+SJf6XfxunwTrGkzLeIdSU3coIaGC3GugJqA+D4kfx7 zVLNGtUtekOWAivRgH+b2DjaZyWhgou1LNcQup8olmrChE35mMhmqHmh7zO0oSCiH0qH x3DxWZ456243iwCs0uduQQdUfQguV80T09SwuBubDVYSC3Sqx2bqBOf1WqZG/LfkfDE5 TIGTZ4pCWhx5j2zHf4AY4NEv8ngZWy9QWqMuEU6vtaluH1DmV2cHdsdEpaQwzgie+rip 26N47cSeF6BFvB4dRQ/Jgsa0hxTL9Th/ksii23nCLaEoFHYaXcqdBvb3OQfD0t0xbvlX reag== X-Gm-Message-State: AFq9FYIm8M8T8dWQ3GZrCTwj0OCWkM4zJgHMHJ/7ryoXqwFhVWnfyuZO KZXVxk0C6tlgKo767cAT0Ja3y+2svejA/II3XWnoatGFlzjR5D8rno+OwECt61ePae5lCtxN4TW 145jNclRoZKEkT6dxSuGbseX7lLP/xSOloldPwvioYcwaLcOB/GleGAUwBmNQF3As2Rwe X-Gm-Gg: AYBFou2YNQjtI5OtRuekbpz1wrwDiP9AwHInraklQnrlKSoc/+goAI9PkeU/4Fc3DmV x9Y4rLOYxNC2t1Xpcyc8Ub4xzItd1uCcsFFa5GbOuzPqaxl2ame0rKXePlvDU6UvwS+qCTelgfW Dpua0NIWh7r4wuSkskbWlPy0IrldWjClcGUmjp9YlRQLMTJt/Vmn/Vu9lt2qrYPmImF5HuPWHUH eo93RsHANLbk4+k2MkqhtqE9HkJhUFkSgp0GY81pm+uU0tMHYbDAVTV1e6OMdD8E4vceyDtaXh0 t97nLxsc+phDziKLCYT9t1+z1604QuIC/9yEuhBCiHWjQFzsNYIdV5nKdi/npyvQ4mRvf8rNV7E s7CvJXXk4/84Vv+Knt4ZUjkt8WuATV6XgjnKWAA57 X-Received: by 2002:a05:620a:1a15:b0:939:6de8:43dd with SMTP id af79cd13be357-93f6f996e2bmr547463285a.49.1792772119791; Fri, 23 Oct 2026 09:15:19 -0700 (PDT) X-Received: by 2002:a05:620a:1a15:b0:939:6de8:43dd with SMTP id af79cd13be357-93f6f996e2bmr547456085a.49.1792772119306; Fri, 23 Oct 2026 09:15:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 14/83] target/ppc/gdbstub: Replace gdb_get_regl() by ppc_env_is_64bit() Date: Fri, 23 Oct 2026 18:12:22 +0200 Message-ID: <20261023161332.60153-15-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfXxN2sfrgQmdJD fp2bl/yHScCuuvdvEbcQeNnjjAlOVdSIamJk41bMCfvSI3v/AvdCI4VeutQkgDMfATna2BhaVZq 8eVdtHzEq8tdJLQSGYS+AJ0k/X2P3ZdAeLUW1DOwp/w79WVH3y00816lrtDhnBVLx99Dj0PTj4P R/8ps/VYatg/LB/VUXGpIIp62dQYOudvz1vieMagf7yJd9bk7btWFKvQsMbArikFi0QzgDOWaGf 3KpG+nTpRrcyJzjYQnifgK9HcqqCI8tOzkwhEJsopWeX9VkUjK/B1ZkeshX4holqamt5u9wikj/ y7U0T3R5a6nMuJpy9PKiLeKw4qfprLM+7iiLHLP7ySs30Oe3u0GLPlG1CXWB42NZgIusCxNRdck d1ugL4CDS3rw/KwKO4vcllVgfQrHCeuSW+5nOJkGAFffHHTQlFwwbA3JPTb18CEfeBJkkxbFMyv pvdSEfbapGaPKJ6wvUA== X-Authority-Analysis: v=2.4 cv=DK0acCNb c=1 sm=1 tr=0 ts=6adb8818 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=VnNF1IyMAAAA:8 a=XEEDF0r_pM4_IqxSCIsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: 7wDK4djVRVN8t3cTdH_Pvv0-OfyqHxJ8 X-Proofpoint-ORIG-GUID: 7wDK4djVRVN8t3cTdH_Pvv0-OfyqHxJ8 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX/dgoTOCp/WHt ahSLQUOMJkk7vdkhIv9TyY4W9S8rFTB0cy9TFEQTj2CqPLmakE+PFutjroUjv+Zfkz73oN47WuU nEFEFuxqjnhKqgv8pdi0WdIQEmFKuzw= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 priorityscore=1501 adultscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772184392158500 Inline the deprecated gdb_get_regl() as ppc_gdb_get_regl(), replacing the target_long_bits() check by a ppc_env_is_64bit() one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Glenn Miles Message-ID: <20261007232326.66240-7-philmd@oss.qualcomm.com> --- target/ppc/gdbstub.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index ee02be63ce8..0071c2b3bab 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -53,6 +53,13 @@ static unsigned ppc_gdb_register_len(const CPUPPCState *= env, int n) } } =20 +static inline int ppc_gdb_get_regl(const CPUPPCState *env, + GByteArray *buf, uint64_t val) +{ + return ppc_env_is_64bit(env) ? gdb_get_reg64(buf, val) + : gdb_get_reg32(buf, val); +} + /* * We need to present the registers to gdb in the "current" memory * ordering. For user-only mode we get this for free; @@ -98,14 +105,14 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray= *buf, int n) =20 if (n < 32) { /* gprs */ - gdb_get_regl(buf, env->gpr[n]); + ppc_gdb_get_regl(env, buf, env->gpr[n]); } else { switch (n) { case 64: - gdb_get_regl(buf, env->nip); + ppc_gdb_get_regl(env, buf, env->nip); break; case 65: - gdb_get_regl(buf, env->msr); + ppc_gdb_get_regl(env, buf, env->msr); break; case 66: { @@ -114,10 +121,10 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArra= y *buf, int n) break; } case 67: - gdb_get_regl(buf, env->lr); + ppc_gdb_get_regl(env, buf, env->lr); break; case 68: - gdb_get_regl(buf, env->ctr); + ppc_gdb_get_regl(env, buf, env->ctr); break; case 69: gdb_get_reg32(buf, cpu_read_xer(env)); @@ -281,7 +288,7 @@ static int gdb_get_spr_reg(CPUState *cs, GByteArray *bu= f, int n) default: val =3D env->spr[reg]; } - gdb_get_regl(buf, val); + ppc_gdb_get_regl(env, buf, val); =20 ppc_maybe_bswap_register(env, gdb_get_reg_ptr(buf, len), len); return len; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772182; cv=none; d=zohomail.com; s=zohoarc; b=IdLdfKYaf8aCLoyiDGsqlBJ/yDAGmB8absruvTgvL3ns8E3CgOEp+YJbKenRgKeBg6QwtXG2MIm54aYGVuaVRbMg5GocRgFtlO+vKtQv8mlIQj64bVob01phDXX2pEhE41CubRE+XH9CWzhIZDcTknZW6g+pWj/UoqjQ1wQ0uwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772182; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=rn+Kq5gFD18bJTJIJ5GnQ77Z0ABChsM110IWiZWDoag=; b=P/rFtiVqEGH1xZfyDO1UbDKz18K6cmARmzzTAb/nP3AlidafuVfodxnc9am5P3EFDsE+pdV/Ew/INGXPqKY2e0HK9Tho1mwFbseCsoLBQ666pkFjk5aS7L7T9etZT2R5B+PD4+0NRdvXCP+Owii/ViiLVrPOe7NPoY9cJsEF2W0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772182028315.5328202768692; Fri, 23 Oct 2026 09:16:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwD-00074j-Lt; Fri, 23 Oct 2026 12:16:13 -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 1xKHvZ-0006eb-1G for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:41 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHvW-0002LW-S4 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:32 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6BcT2999843 for ; Fri, 23 Oct 2026 16:15:28 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7cn0vqq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:15:27 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f322ef7d3so237930585a.0 for ; Fri, 23 Oct 2026 09:15:27 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29ea6817esm25937535e9.15.2026.10.23.09.15.25 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= rn+Kq5gFD18bJTJIJ5GnQ77Z0ABChsM110IWiZWDoag=; b=WmI/4VJfHeao7HiV YreVdB3YtjT7junQWfFFctNDP6rrO9J9lYHCnKiLrZH3vJ/DuZrfVoU5J8+WLnU6 1XeiFsUV8E/Ioiz79nXnUb/5yb+sj0LAKWKsev3+RBY3IHicjXJbfM+Ci9gxdNgl 3FrMV90SoS2+Yry7BGpmNDHMOOH5q2hk+vTng/Ju0k+3y2m6I9E6Vswoh6wuUgJY b8BTxqHQRxB60rZryuyRO3gGpu5zseIZvirdKTHjHchuA7Ettc+MS8uw5NPnYID0 BI69A/yBnZsbIHmvnuzsL3o+4GxUGgDj38Qd2ZM7l93MF8SMgbOkAaFnUJSW9yzs JPvpOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772127; x=1793376927; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rn+Kq5gFD18bJTJIJ5GnQ77Z0ABChsM110IWiZWDoag=; b=YgxyNIl22C5YD7pXV0k2UjUVQBD5KifjbrPErqO8sYqFQTpzyr6JNczQfnm5yeIOGp 3QfiHieiSEPNRCTDXINye/sZdeAoSsdmzwcCYiTz3jXm5+6YWB5jZ70B6vZZQd3iGPQ1 5LxC82zaaWeoMb5UAI1PTw2LySu2mPJbRsEeIxiBjxXxV3U1nMnJoUr2SS4BSQBxg5te X9UckECqfFUvGguLXe+AZLxb9m+6u/7uAFo9VLFa953hhqfi7sdC9qeZPhVMDvKhagd+ evUhTLQDMPC/INcKX7Vq+1t6g3nGIulSy89KBRhFNyX1wezFhGIXQe05mpc8DrMpegqL N3sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772127; x=1793376927; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=rn+Kq5gFD18bJTJIJ5GnQ77Z0ABChsM110IWiZWDoag=; b=xSZoKdE5chuYLkXsOAAOUlcwQLe2xo/m4rNzMDrIBmsYOgbTKIY47dDl15HohUWvg/ TH2Y0UIWnWCSh8DmRY+IrDfTcTwQjgMY2orcFv3UVu8DgiEIc/1ROSeUD4nMb0R3bICc pLQzYagzsesoPfsN1YR74LkUny8G3mFyMcLAv/WMVTOO9thZs8TAkhQ0F21IgRxKelzt pQEpu65Y0EhFYPc82IkHpd3vQjbTR0c8VW4QUMJR88dnkqSAIGsGNs/ZfE60EUBTeSBC FKXlSDob0eY7RpjIJFO+Iu/HBm8LjzsOsarmV5iQ4Rf/EnOvBDtDk1CZ4IQVcn4oam6X fd8w== X-Gm-Message-State: AFq9FYLugg/fQXpybBEIpioCBSsk2TGCgCVRmMAmngL+49RjwswhjS/z Terepp9+ftWFTXuSBH+7bjW7CgJThDWO/yA11Qtcal0oGl4NKbnaaxmAYt8qhR2CJIrD/pzjTLf BT0hSVh6uCOvJlrn2AB2MOvAOo8wmelG84WDiKKDrhcZxnEHK+5/b7XWoLuKgY4GAmbBm X-Gm-Gg: AYBFou2hzZ7CZv0hKZojOlBuc1PBO11+iKR/ahwtAN+Xp9tedzpU3bTi0ISiZJoh4AN NB4+pYr3PdwwXThcny07TMnZ2GXNHUUHTiG1wkrdjyACl+HNtV76BhSb7fkRzv1XncI/bi8N5uI r2dbdlj0BYlI0CgdmcGAw2owfWT6xHCphy8isOMMy3AHrPYUI031CjW0etq3SkI1fpGWqyhE9Hq e9fsF0PC1NZH+nM47qAcbBG1YT6gwo/b/0vdxYu5wV93OsNaJ3JOSvZK9er7qotVFBKdfcumVJt krfVml8r2p7E2U6HLAD7XnNQv8d73F5ZSuHHPmvY542iVCM/+h3vt5CjkJ9m3iAhhWZeLihAyQP Ni4ojf4nS+c4mVPhQW89VsX0oM0nT0YvQF95xb9Dk X-Received: by 2002:a05:620a:268a:b0:93e:c12c:9b73 with SMTP id af79cd13be357-93f6f86ff8amr484643485a.78.1792772127035; Fri, 23 Oct 2026 09:15:27 -0700 (PDT) X-Received: by 2002:a05:620a:268a:b0:93e:c12c:9b73 with SMTP id af79cd13be357-93f6f86ff8amr484636785a.78.1792772126415; Fri, 23 Oct 2026 09:15:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 15/83] target/riscv: Factor riscv_gdb_get_reg_mxl() out Date: Fri, 23 Oct 2026 18:12:23 +0200 Message-ID: <20261023161332.60153-16-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXx9O95GZIRdOE JPK73KcEs/iC6gS5cZ8TltRcEQmNyFQ8rOJk0W07GKJGp0aBf3DtZK7iKE0taSBjzOT/e8z8meL 6OIPsZJ3A2zUz8gM+PZsmp4qqPuVhf0CpSOwOeHKyspG/0SVGKd+rtt7sMrQYecO4xJ3jmvIG9x 20JXdq5DOlJ4Fioeg70YpJeXfqsnHX9XUbdlOeIyYdPcIYcIcE1MIlJDlVlnqgj7tuvv9n3DMms lb69FMV7+cykkWKI2pCYLeGlxme7VHielHqVP7Ysk0awDsWKJe4hF3/W9ruPuslrdOjAUWtLmxz wa+qvA1lMc87pGi0LtcSKB6K8MXOhtgtF/7zPGn9WraTkTrfir7ngvVBXVHSDv5TC4n5mXbbcX/ 06/Z69DNI25hxWa0/P0Ud3b9zU4c+BmIJsrV5hb+Gt7xjhBEqDARmxcVU6Gu0e/olLjyBjLorHi P+gtFSkjY0IFAK6LDeQ== X-Proofpoint-GUID: m935Q-dYoW1axD9Ss0cfegog49ldnZbM X-Authority-Analysis: v=2.4 cv=a9mlZkSF c=1 sm=1 tr=0 ts=6adb881f cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=kwaLHQ4QKy_weq3lhsQA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: m935Q-dYoW1axD9Ss0cfegog49ldnZbM X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX0zmzGiuGjzpA kmXnSWxtzHMceyd6zWld9/k5m3zkPVyfHTOp+qbQzxBm7X32ipRketjtVIEY17ORIJdBmZuOgFP NRlumdC83eOl5CyOWCdiuDiG/ZSGRuw= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772182370158500 Move the MXL-based selection of the register width out of riscv_cpu_gdb_read_register() into a helper, so it can be reused by the following patch. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Daniel Henrique Barboza Message-ID: <20261007232326.66240-8-philmd@oss.qualcomm.com> --- target/riscv/gdbstub.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index 9abbf5bcdf0..b3c11db5397 100644 --- a/target/riscv/gdbstub.c +++ b/target/riscv/gdbstub.c @@ -54,9 +54,25 @@ static uint64_t ldn(CPURISCVState *env, uint8_t *mem_buf= , size_t regsz) return (mo_endian_env(env) =3D=3D MO_LE ? ldn_le_p : ldn_be_p)(mem_buf= , regsz); } =20 -int riscv_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) +static int riscv_gdb_get_reg_mxl(CPUState *cs, + GByteArray *buf, uint64_t val) { RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cs); + + switch (mcc->def->misa_mxl_max) { + case MXL_RV32: + return gdb_get_reg32(buf, val); + case MXL_RV64: + case MXL_RV128: + return gdb_get_reg64(buf, val); + default: + g_assert_not_reached(); + } + return 0; +} + +int riscv_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) +{ RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; uint64_t tmp; @@ -69,16 +85,7 @@ int riscv_cpu_gdb_read_register(CPUState *cs, GByteArray= *mem_buf, int n) return 0; } =20 - switch (mcc->def->misa_mxl_max) { - case MXL_RV32: - return gdb_get_reg32(mem_buf, tmp); - case MXL_RV64: - case MXL_RV128: - return gdb_get_reg64(mem_buf, tmp); - default: - g_assert_not_reached(); - } - return 0; + return riscv_gdb_get_reg_mxl(cs, mem_buf, tmp); } =20 int riscv_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772269; cv=none; d=zohomail.com; s=zohoarc; b=j1MRzIFynfj8HaOIRFzkJHPF7CvM5PHpKE3MkFq5wK6eI6Pbcp3z8/dEjeW2kiv3ThG3y4AiE/9eRmgklY00yjkrwDZj5ku2wG7gU6sFZlDblBrd5oPzRiMgA6tf7VNC3l7trC0qm0z2uSIDVxLxo2zVx7hL9TYnryGskC0r0oY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772269; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=whmiDBCYFtk1aYI0J1wKkIRSGWXQoWkFP17+e9eDX+I=; b=QfUQyerDo3Okfn/zh0GcbVevsTLAFbyL2FaEiGUhonTJmfTUN6oAABAnmCB/UXoUPOtgkkrNuuBl6ve0L8CDcalaY6yF6D5wTqhEV+xutV1BlDsOH9yCbEi5jerbWCRkO3AzJwJycg4Quj70x6ALlmq5pICkJUUETBZDWo6njv0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772269985113.75022965046537; Fri, 23 Oct 2026 09:17:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwG-0007AG-2F; Fri, 23 Oct 2026 12:16:18 -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 1xKHvi-0006n4-Ez for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:46 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHvd-0002Mk-RG for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:39 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG3n043811775 for ; Fri, 23 Oct 2026 16:15:35 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas881kk-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:15:34 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93909014c85so209009585a.0 for ; Fri, 23 Oct 2026 09:15:34 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29cdc0d1dsm15441035e9.12.2026.10.23.09.15.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= whmiDBCYFtk1aYI0J1wKkIRSGWXQoWkFP17+e9eDX+I=; b=fATeKO26BUs7bUB7 FFhxzl/TEHbg1gtY32wLXeAcjwor1BLWZNh916KrWrxLeLDz0twsRkVIDLXauTwJ CjkCDxiSjOgJCTPEU++Jy30K7J5Y47ICOpG47sq+Z3e1tXO94//AY/evxuenF+81 IHOBl1OKgqxW3qQfLCX43/fvFgCTARIm7b8wlaotOsqic20hn7dUpIMwN2rHI/re wO18Tf8u0/88XIcSAVU/Ya19GXmjUC94SQMLuy9IGZLuL6C1q0LJMl5zh0dMb/C5 H1OXrxCDCsxf40Mz2VKY2js5fsv/RSaPn3GpICXzAyYJ/bonNCMEglIBKDW/KYeX kI2ijA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772134; x=1793376934; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=whmiDBCYFtk1aYI0J1wKkIRSGWXQoWkFP17+e9eDX+I=; b=D6FaTewk2MxHAftsSvapPWFhF5d9epFvmdfmVEWTOeybkatdh7VNW/2gT6A8dOMN9R Q3Esg/xgoagSKgtVqeUgZbu9I3Raz5rieoX+o1UpN08MGwPVjZiBPgDDX778PyCHKAig 1f2eWtmRYA04gYM3zVCHYTqn9HymSOzOtvf5FXw+Y71ugQiLaGAuMeIDwPGPWzdhXsb0 CICy4iO6oq5OyRgl7pJx9pyiTPYVxl8uYMoE/ALwwYUstzJIQz1271DhCrP1ujUzmXSV GZyXGuZxuIw1bE++BVA/lqOhcvU/W+2bX327n+6PsjuZ352kFU6zWgoKq0bGfgBDPmnH lGgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772134; x=1793376934; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=whmiDBCYFtk1aYI0J1wKkIRSGWXQoWkFP17+e9eDX+I=; b=kK8CDiBPL3eS+iRtivAEkTg4f+D5j3HNfFC+F057nCIdUA00InnFHc/hH6g8rjgkQO MDWISlWP/NhZ3oxXru49IsBUviFk2satio7olBUlTgnVqfQqJErItM6bP36Z7d6wC9rT wjk6Fu7hHCMA2muVb57qztUCxJ6+OenA0p5DgqFue1p0YuzkyB5d06BrcAlbEqbuLC5l +D0B4J/KzpG4krEwOZbo3tVfgMzzm6Su4lESGU8kec19Ufd3iHxiJTtGn2m11uUTabo0 8PB20CvBHOG4uiJguKFhBYlFwEkZgjyaPEqfi5UpHlK4WD0oTqwVwyODZSkZl2qj4klf 5JeA== X-Gm-Message-State: AFq9FYIbpkYcGgFo5haBE+7JOQqEA2G7cLokeVO/SIWUSSTg+5fXcc8r +tOCYKEsV6P2C4IqB6wThhbLJ2CKA3bXcABAEl+I1iNAJ44F7LB6mkBvO0UOX0Y3WoguIalcYHO fzAGJIanvFkCzwJ+9jcB3h2Aws2KK19UQUmy0nTmV+iByoX7yVrc+LOMViMZ62RynyfML X-Gm-Gg: AYBFou3qjDHuTzZQKBnEBCqaB4HJHmFFjC/gfmJu5kwLZ+F8Yp80VfBnU+gmGG9C7sY Zmkd0oxX7C/fgfgSdIhHgtXIbGoLYkG2+MeMP70dxHYWvX8cOnoSdIZNKTlHK81YSRw1ulP9YLW k2kO//CipZeTsavzX2F4+mrWqtzkvY8mtuh3O1PasLiz+BR8tw0gD7akvHIgFzu1RipCdx9uuBp lwqJHSG4uPMC/MHeoeuH1ci3bQQ6hBsQWFTK38T7FUQjOp0MPTzHUFTKttX8SK2ABwuMBwfeZzH FIA1jVUx8l+i7AKQoV08F7/7gz07j1x7hJuGCBXKO4FjrMI+lzThzujvFSkgjXtLkVfx+Sy9hJF 0PsQzgDD+Fj+hMW7CFlEC0vgrqjot0YZ/nYIEUn7X X-Received: by 2002:a05:620a:4402:b0:93e:5247:f61e with SMTP id af79cd13be357-93f6f7890cbmr488818485a.25.1792772134107; Fri, 23 Oct 2026 09:15:34 -0700 (PDT) X-Received: by 2002:a05:620a:4402:b0:93e:5247:f61e with SMTP id af79cd13be357-93f6f7890cbmr488813485a.25.1792772133530; Fri, 23 Oct 2026 09:15:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 16/83] target/riscv: Replace gdb_get_regl() by riscv_gdb_get_reg_mxl() Date: Fri, 23 Oct 2026 18:12:24 +0200 Message-ID: <20261023161332.60153-17-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX+8PZKTNRj+gI tdMeRUX/LPRL+cdDXPOP7CIxTBgZvwON2Gw+Jug72TkQMjhJ89iHix0UdUZGhSkc7gNvWMEbZRM IuIa+Wg8qR/98McvrnBHGLUZFadnoL0= X-Authority-Analysis: v=2.4 cv=OPqyTiaB c=1 sm=1 tr=0 ts=6adb8826 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=hwDxwncWfiQWgMtNzUoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX7Auv7Iq9+OpI jS4i51nGevITOKedzeiUNxedOGlxiWnGV2l3zU6AGP7qQYYic6SiS3cbCTLcm1cEPdfKLS8+NiF G0Aa3mqAVzl7pAoCLAvMUjw59PSbRq4oo2Zk0Pr7pb/1EjIGeXJfHdahMF6Am93RAssjFzq1f+N A5w4Bn7nJ1lL8mVeg9YmLyOJhFl8zdr/b72+0KBRW+owt+xz4ofALbyNhY70vNl/BwzXN6KmP+H eA4MR3e9+39sWVoGQho0vuCHRapPq2/B0XMOHpLSc53m0EVaIULgDdm85KJTCX1WE6qricZEi7k G6Lzla+E9ngPxcsjWGTd03QXVbaV/ccCyr8ew9mYR4rrpIOb+iflVG6IT90pcvXXkb6ZPp0J/Pw SQ38BpSZ8bqk/t3cDel0mnrex5A4Zn/mWclOs1/cGkhKFHasMLtS9OFUvH57tP3ReCYkPpibcvy wrGk5w4lAbI6FF4t3ig== X-Proofpoint-GUID: sCZKCyIZ_BxXalA1Zk-3WQ1KaiVPM3xT X-Proofpoint-ORIG-GUID: sCZKCyIZ_BxXalA1Zk-3WQ1KaiVPM3xT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772271910158500 riscv_gdb_get_reg_mxl() picks the register width from the CPU's misa_mxl_max instead of target_long_bits(); use it in place of the deprecated gdb_get_regl(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Daniel Henrique Barboza Message-ID: <20261007232326.66240-9-philmd@oss.qualcomm.com> --- target/riscv/gdbstub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index b3c11db5397..50e834e367c 100644 --- a/target/riscv/gdbstub.c +++ b/target/riscv/gdbstub.c @@ -183,7 +183,7 @@ static int riscv_gdb_get_csr(CPUState *cs, GByteArray *= buf, int n) =20 result =3D riscv_csrrw_debug(env, n, &val, 0, 0); if (result =3D=3D RISCV_EXCP_NONE) { - return gdb_get_regl(buf, val); + return riscv_gdb_get_reg_mxl(cs, buf, val); } } return 0; @@ -211,7 +211,7 @@ static int riscv_gdb_get_virtual(CPUState *cs, GByteArr= ay *buf, int n) { if (n =3D=3D 0) { #ifdef CONFIG_USER_ONLY - return gdb_get_regl(buf, 0); + return riscv_gdb_get_reg_mxl(cs, buf, 0); #else RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; @@ -219,7 +219,7 @@ static int riscv_gdb_get_virtual(CPUState *cs, GByteArr= ay *buf, int n) /* Per RiscV debug spec v1.0.0 rc4 */ uint32_t vbit =3D (env->virt_enabled) ? BIT(2) : 0; =20 - return gdb_get_regl(buf, env->priv | vbit); + return riscv_gdb_get_reg_mxl(cs, buf, env->priv | vbit); #endif } return 0; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772232; cv=none; d=zohomail.com; s=zohoarc; b=mLvbmfqUYqRr56JXrTnhzlvYWQIWWmp2M93wu+GDDmBLEWnXywE+bpVXOQ7GtPAJtAYyi1AjQUPqF6Jg6vbWERD6O9mVgpD+p89zvdn0bdfb9pvy850jRjDgyeM52J/gNSo0PULNtSSfBCMExCpvo41RO/UNoW78z1z+DZ49rMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772232; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=VncZoTQlrUVdzYLn7zRmM0fOXKc3qUJbQhDPlG4NS6Y=; b=c4+/pZqDz1Sd+OaDvgmtSaSaMYdYVKXE7Xzcf6qmd+uzWNYuSSBnGLuoKMdJZjV9i5/qMarxDys0jPwUa63PqNzoCgD0vc+02fvqsIUwKzpPMECuhU/MqZExsIxItsAhZuvNtWgVz4IKhtOJG6hPr5amhcGh0w8ZBs9svc7skWM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772232388405.8704808270322; Fri, 23 Oct 2026 09:17:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwJ-0007PO-Kf; Fri, 23 Oct 2026 12:16:20 -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 1xKHvl-0006qM-3j for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:46 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHvj-0002NI-0C for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:44 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG2p2g3228243 for ; Fri, 23 Oct 2026 16:15:42 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgart01qu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:15:41 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f2005ce21so177232185a.3 for ; Fri, 23 Oct 2026 09:15:41 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3f0b8asm770601f8f.11.2026.10.23.09.15.39 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= VncZoTQlrUVdzYLn7zRmM0fOXKc3qUJbQhDPlG4NS6Y=; b=WBDPn/RSpfDogPQb neONjdH8FzG/b/Hqdq8nFiHw2XjvDeYp60XGOm0goL21PZ+N6aue8z4SIgRZzKXG 37x5oDhatzjjXgHTduXmiDrYF9PVC3BhREKV5Fta4CgEDx9+LR+9gmRR4tiWIRzp ZWRELWH5IK+P6YXwOrO92Jqnf9cW3GPfya1oXNg9Bl/fv32mJg5j65EFP/9j9tCn s3BuQYDaI9J4lpEmtI91Ft9rGDlFRN0P0ObdZQqVPcmJmuof8GH9+F3KkpKjeX0Y vI31PnDAj/225Y5tZu/O5MoDy0RUwuNrZwqrlZ+V6HzG4a91EEWgLzqTEf2pTqYW GqlvAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772141; x=1793376941; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VncZoTQlrUVdzYLn7zRmM0fOXKc3qUJbQhDPlG4NS6Y=; b=ZDyFqyeWePTGbsWo1O/Vu7EESP8jtK+8azkHSULXrJNdp5gcSh6DNxlkOVb1NOnDU7 HWL5mlLs2pY2UlpfSUpC44SqgycHsbWj+5j+zydPOBb2NzmhvFs1G9Cd1VxyX6ugQ13v 1oeuzpGIPcQUV1QM7GK6bfhFP9iuIG/TYOCcshQLJPLolTaRqm2H+03NSwM0JRdOXPo9 YuJVhU/elixHixTRRmrCgdYX3iiUQsDPNyl6FLmsdbi2AhciFLiDtyoHITHSOCcDA25j bvJB4u0h7NPw2Jhazq6Nn4VEALgA3Ktwmz8AcobktRn3VyKrWpVlELCWz1LevagUje9B aQiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772141; x=1793376941; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=VncZoTQlrUVdzYLn7zRmM0fOXKc3qUJbQhDPlG4NS6Y=; b=JR4dNtoo93QZL+qTkMDHDoG+RioOpgJONXVSnN5RQ5IbiNLjXTmFN3CvQr8rmVqPt9 a0glL7K+QP3Ca3MS0rwQKjkUyW4Xn6LcHE2QS5YtgGg61xhV74+Rvq2DBn0iSuey2HNa pE06/xLEdmAN5O/6xeaRoGTfoUgKtEMcNVpbXZpTyKPMiX9lmKepzwxFv9NuaskWFu8j b2Np4ZDuL7Ltga3Ge3Z9l1MkXBrZ/qLrfu2A8qATq0+7luee6HRB4r0KYnAVEUs926zX y6I/joO9orQtndYwYic36dWYU3bd6UCqb1++fE7ugwhpjTZe7GBQ/G9KVuYE32bPMJ+f 1oeQ== X-Gm-Message-State: AFq9FYIoEIpqExkC4eRmmcTu7JoAFsmn41UWNe7mvA8DcY2qKoOMn9zv /l3K+g1wjCeA5Tm/bM24KihfdjkIr4IbgJv2EOIlqf4SFkBjFw8cS7j1o7maqxFEK/TtNQSqwZf LL/BmR+r6SjkUCl6GEtkxWjspLFSGOIdIhVeCG37hcRx42ndWDB7OG+IwNoNWwj2b0/mM X-Gm-Gg: AYBFou3xmrWDMPVJ5D0x669Hh09iY2V3kSyj2QQrENpOgP+u2TRB7Mm3ieDsqJPokcL C0ZfL55WMj/Zj1aCL9PBFoljoxIRHnvBxAIqAV13mGThYj/W7hCsXeWzqZiibwfEIINid9KWlTW jumXm7z8tMjAApdeKrZJcbiLU8PxeilAja1uEpRsCf3qmACn9+mvdvmYZvjed/FkFsnPO44SvzS UkvSHXQ7NzmiGLlYtx6gVYKwI9St0ySCCXwu0DT6u4QJPuzthQMrFGAoJOg7juJhjPFGNcegAcT CBZP+tB/0Aku2skdMLS4HENCqkT29KNDlWOesfu5lFW7Cw8f8t+BEvYbmnWpuGCY2HjWWd7sr75 RZlkhU4MaDey00D/qkowjUvrq/q0NubwQhnx2E00b X-Received: by 2002:a05:620a:269a:b0:93e:6a4b:3ea6 with SMTP id af79cd13be357-93f6f91d456mr520065285a.24.1792772141238; Fri, 23 Oct 2026 09:15:41 -0700 (PDT) X-Received: by 2002:a05:620a:269a:b0:93e:6a4b:3ea6 with SMTP id af79cd13be357-93f6f91d456mr520059885a.24.1792772140750; Fri, 23 Oct 2026 09:15:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 17/83] target/hexagon: Expand gdb_get_regl() -> gdb_get_reg32() again Date: Fri, 23 Oct 2026 18:12:25 +0200 Message-ID: <20261023161332.60153-18-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX+V5rtAavqRZl AULK8wm4v1Q5aQ8TWTaRjHiO1H597c7sEYYdZPFSmH21RBQwOLWiSZTKWain89BcrDlL9lNN1sh idMjv1vbIaVdmhZZZSuvMzC2P6wbvgcBMfTdz4Fi54Vmd4A5OnAQf/mXYicNSri1i8V8LeUgi1X kCJ3hHkVoE9sCkT4yn83AGFTspnSiyxuDSV1w0qGNfTGHXOLsZdlQYpOOAjrwGEE3tSzDAGnXjr ti8lGSLQQ5YTDclaZuf7SyN5JSx3ZwykrzKxDDEK7WOT6Qmy2MpcA21MOCQ3LfRVyXLCwXt0lsh 92BnQcLG0FqZVMykNQg8wrKqtladaEtNCJ5LQoa4b4a/dSprphLAPJemINMa0rCQ5MKq7KNZLqK YkcUIzGuGKwKUbymSpRWrrquqdfX/EVD6lUHNmZtzrNuA6115PazOBGSQztOKEAiOnAdhfWKMzA omufvp5w+Ki51X3RUDQ== X-Authority-Analysis: v=2.4 cv=JI+uIMKb c=1 sm=1 tr=0 ts=6adb882d cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=KOFfYGMdUDr6h6J8HrYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX9PS5UaZSs+bx SrnMB1IFq4SBJ3b7rAk0+OfnhIXkC1YR4cgcmXNahC/0xJvqqVcnAR+eT83tTpjOFLjHLUEBLMv zni7ghqe8q3xybYe5vkHdwjwhFx5v/Y= X-Proofpoint-ORIG-GUID: rprKZR_VpA5Dcp9W_OYDM8-21U-Sn5J6 X-Proofpoint-GUID: rprKZR_VpA5Dcp9W_OYDM8-21U-Sn5J6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772233146158500 Commit 780fbbef2a2 ("target/hexagon: gdbstub - Add sys reg support") re-introduced calls to gdb_get_regl(). Since Hexagon target is only built as 32-bit, replace them again by gdb_get_reg32(), similarly to commit previous 7831e5f48d2 ("target/hexagon: Expand gdb_get_regl() -> gdb_get_reg32()"). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Reviewed-by: Brian Cain Reviewed-by: Marco Liebel Message-ID: <20261023135336.49641-1-philmd@oss.qualcomm.com> --- target/hexagon/gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hexagon/gdbstub.c b/target/hexagon/gdbstub.c index ca6d4a98369..85d9845cc94 100644 --- a/target/hexagon/gdbstub.c +++ b/target/hexagon/gdbstub.c @@ -96,12 +96,12 @@ int hexagon_sys_gdb_read_register(CPUState *cs, GByteAr= ray *mem_buf, int n) val =3D cpu->globalregs ? hexagon_globalreg_read(cpu->globalregs, n, env->threadId) = : 0; } - return gdb_get_regl(mem_buf, val); + return gdb_get_reg32(mem_buf, val); } n -=3D NUM_SREGS; =20 if (n < NUM_GREGS) { - return gdb_get_regl(mem_buf, hexagon_greg_read(env, n)); + return gdb_get_reg32(mem_buf, hexagon_greg_read(env, n)); } n -=3D NUM_GREGS; =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772224; cv=none; d=zohomail.com; s=zohoarc; b=QbxKkmEdVp3r9vcRKm3yJp6XUAWTrJJP3jtVc+XSy3I3DXeAnbxkRk3AhsKinJWd3sERnYLxWJgUbHBuL6wBli86+a4ciFQo/3jivhG9WhPJMT/epD8m0ssAZm8J604TY4VDqr8hdjvCUhNN6ZO0qoy5jdtUGgeF6f37XvAFBeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772224; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=6AGZHCQeTUU67ihVsIauohAaOiNnxF0CtzyifIyxgNs=; b=hQjRb6/PfbTxqzZv830115/Ns/f8+D+EG7fwZmm579biXM6EDWHa9j0zaX9duvb1vFcG+HcTYxLm/n8ku1y91kTB5pShuHxQQXWNXhPpuWvBowFrCtlWVgFqdVpjIThQoVPJYw6KUdWislkOm2SoyEVJSlNQp5gNGjZHTqGqd9U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772224246552.6775444603289; Fri, 23 Oct 2026 09:17:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHw8-0006yk-UO; Fri, 23 Oct 2026 12:16:09 -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 1xKHvr-0006tC-M8 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:53 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHvp-0002O1-Su for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:51 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG3rsp3812359 for ; Fri, 23 Oct 2026 16:15:49 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas881my-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:15:48 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f322ef7d3so238002185a.0 for ; Fri, 23 Oct 2026 09:15:48 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2b066685dsm14531235e9.15.2026.10.23.09.15.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 6AGZHCQeTUU67ihVsIauohAaOiNnxF0CtzyifIyxgNs=; b=NoFxAO9LNvImknYt K8f1U4ENvjToC0Bu+PHCm0bQNcqAC6FqAUTtOkn6n+o7c/btenY+ROmfgDu06Hyx OaUgAKoM4LCewIiClPq3DudujPtFR5Jxm2L4eVGv3zfQj6yLKCfG9gdPKOrQOB8R ISs/euW7N3qxvX0dABWvu5SReyh4chVXCmpfjAHUoHy+7c9SOR2b8EOag5Umry0X mwRG9pjLTBRnf7Sera/2tCqX3GZiKnSKIjCf73yHSe/B3hL3eN6SfRD4snvAaPmA Rb8ZO7oekQDhSCQI+2cdDiB7nq0sB9TaRXCqe5lVHtWdewUn0gcAhE+pRN0EYmPV aIVNHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772148; x=1793376948; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6AGZHCQeTUU67ihVsIauohAaOiNnxF0CtzyifIyxgNs=; b=TqNPyQtu/VGorHT/3AOhl0fiulGe+9wkTpDdTbqm6qVLgfmcxuBCQxg4zJXSHJRVAU 8ZgYuJcsA69QMIfVi5HNyOEwgH17Vl76VeciCtCQED2uiJdLaVNaw/lvGXju5Z+KRQ17 JqzrjrGWjpN/sl3Il+NCmU+/B5O1Omu8Y4UyftQFALUw/Bf3RpCArd29lAv7wPGQ1YkF kCTu2n7aSN2VbMKo1QDjeXSr927icIdsyf/g/8jFGpHjoJ1Ep1kcWYEn50LAYsuBaS6I RtYRxUnXgkg/dxVXTpRvheLjs9bMU+2YkHaLVYByRMKrQsaUSuJsd0AR6KyaweaxQkEK bfiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772148; x=1793376948; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6AGZHCQeTUU67ihVsIauohAaOiNnxF0CtzyifIyxgNs=; b=mre/Vjx3S9+VGr6GyVjg3FY5yccLzAtQeT48cZltCqkLPLSNHhTB6bzQ9uo9uWJzcr mWxAiQ9IYFfUGyo4wRi2yHvHdleqS9WzkDpNuQ6oQDrV9JVviRj0+lm1CUbtWhyIiade 5pWUZk/13GwkPc0iltLV9EStcrDhqjFd2HYNqOL4FgDVG0i5GycrVUNWNDbr0aTbHlTx 4RRXhT5dXVVZNnTV8gOOHL6/VMhQmR0g5u6Qdb6HgnlixEQb8AV+wy36wIjMHLQ166TX GQhE7GEvuDBCSgJyFZV5JwFZQpC/MCvhxZfyD9vwKlsvRwJGiTIDnzMbb81MveB6GznY nCmg== X-Gm-Message-State: AFq9FYJSp4buJQxHsRRj3Ri1T9p9IzTlcEuzm1Eo8yKAP6jvEFTXHo+6 3xQHOCeUzVFoiSM2i3Pdn/7PJEuZgoNi/c20vKgRtjcEBbEOKrd0gXC3S0pOwy2weYqb0xfabJf +NViaeMMoRqyyk0Ve8IvgcNsTJspZQXwD/n6lxsMNKnynqRAsp1F5mkP9mxh8FU7UVZkM X-Gm-Gg: AYBFou1qWdoTh0RcmNrD2VTrcSEzRz+MOfifFLNIOQwALrY5Tf14Z9/J6OYXPkREbZ9 c4Y1miHhaEeOvS8wXJtVtnCW15XxWgOgzW09aqz+8SqVDXpIUVbGpBJXSAUP7guqqj+/RTPBiXS +L7zPDsLy943KirO2E9SHNgW2U4AJyqVT3JVZ3l+VZ1R5XUGjt/spcIenZpzAyu0i1rR3dOtrkv aDPvjgxcw7h6ZRPdG4eQhLqMcKQYshfsZyTUhggdGC9XReLmT06LzHk8RCceTiU3s0FM99uFFrN yq6n5O8Dy0BeLE83yjvt7l4KxX1jwVE0kvXZybKryF8ash2CI2o8st+u0JAOmO07iLyqpiKLut/ y75OGhwcEw5CYPy43ZE01prbgVHTRPXnYg1gzrDRZ X-Received: by 2002:a05:620a:2803:b0:93e:c12c:9b6a with SMTP id af79cd13be357-93f6f85421bmr471385685a.69.1792772148227; Fri, 23 Oct 2026 09:15:48 -0700 (PDT) X-Received: by 2002:a05:620a:2803:b0:93e:c12c:9b6a with SMTP id af79cd13be357-93f6f85421bmr471379985a.69.1792772147751; Fri, 23 Oct 2026 09:15:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 18/83] gdbstub: Remove unused gdb_get_regl() Date: Fri, 23 Oct 2026 18:12:26 +0200 Message-ID: <20261023161332.60153-19-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX8DkMk5Q5BKov NVaFf67ICxSdQt6S1T+dPCk4DrQ6g+UcYGMPRIkTaaIWFAT9nnp+6HdbWmh8d6RjzHL9u1N8osP 639fFUXZLXceSUUsALIhcP2UpZEO9xc= X-Authority-Analysis: v=2.4 cv=OPqyTiaB c=1 sm=1 tr=0 ts=6adb8834 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=Kwhbg8pJGtqcix1HUGwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX9i2SgQjwSuMR 20gtvgySMWJ8AJTHg+zgbj1eIH7pLpLxUeHZSMf3XNUs56tqK0Gbw2okvIq9h7O1uPN2VCmKnYO 4FzPJRmFZcDbiac4vJ9lkcD3lxDyYMDFl0kkT4CNjr8kyWE6g+CTVJdg0WAUot4gNLMCurmbw3v 05Q14IpPoiXFC5NfuxyhCBQLfBvNqeBHSWEIcry5EjTPyS3WiAyKEMhxU9UHTcLTK7eEcADWf5A +J6nkitIueh+2Xk0A6tukVsC2erHMSBQxIqGU24agUjhPcM7O+7kCssaMUo4xmOMIL07JylibML AxnSwN9Ke2I3giQNuJGIkcltVVqWffrx0VliKTKsRWvBcPr96NgT8tnWkZF4i9Ok3VH0LzYERJ7 Y60ydy1R9/MmRqg4R+qGqyY7E3LhU96BkkC3DSzkksliUoicwnTEE+/m/sUFxCb2lte54xsCvF9 dlrnKqat8VoSIY6pFQQ== X-Proofpoint-GUID: G9wFGjIPhNtFBBcy1RklDzZVWVFS_kF- X-Proofpoint-ORIG-GUID: G9wFGjIPhNtFBBcy1RklDzZVWVFS_kF- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772225002158500 All callers have been converted to target-specific helpers, so gdb_get_regl() is unused now. Drop it, together with the "cpu-param.h" include that only provided TARGET_LONG_BITS for it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261007232326.66240-10-philmd@oss.qualcomm.com> --- include/gdbstub/helpers.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h index b2f41d6d280..9833725b611 100644 --- a/include/gdbstub/helpers.h +++ b/include/gdbstub/helpers.h @@ -15,10 +15,6 @@ #include "qemu/bswap.h" #include "qemu/target-info.h" =20 -#ifdef COMPILING_PER_TARGET -#include "cpu-param.h" -#endif - /* * The GDB remote protocol transfers values in target byte order. As * the gdbstub may be batching up several register values we always @@ -88,20 +84,6 @@ static inline int gdb_get_zeroes(GByteArray *array, size= _t len) return len; } =20 -/** - * gdb_get_regl: append @val in @buf using 32 or 64-bit, depending on targ= et - * - * This function is legacy and deprecated, thus should not be used in new = code. - */ -static inline int gdb_get_regl(GByteArray *buf, uint64_t val) -{ - if (target_long_bits() =3D=3D 64) { - return gdb_get_reg64(buf, val); - } else { - return gdb_get_reg32(buf, val); - } -} - /** * gdb_get_reg_ptr: get pointer to start of last element * @len: length of element --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772223; cv=none; d=zohomail.com; s=zohoarc; b=CE9zkvCC0P30k8jCYlq7wt3ZqzUWmFDH4Gxqq9XUDkSxzhEC67sN7jy5jPo5tR/aal4881L+deH/7RIrNrZD5vMn51PjurXWvcCL3w3B2WQEN346Wp3tDt88rxigZW4fuzJwSqkUq6ZmbVe3ZBImDTOu5lUpo/9bZjF0hSrN/b0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772223; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=FHBwtfeYHyKYIoFDXSqPaZRe8t7cpoqEqTkKzZ61eGM=; b=VH782rMVw8ryv+TLlvIavgmUDCmhHVu5KB7SjQZIMSXgKQZEisExDIRscz29bT7uYzSKwLsmg8DCQFY3GNoIEzaeI1CQzKosqjU/AjqMLDbcIx2lZ66WMH9QD6ExrIx1k+npuN/q5FgVRpQVtNx9YzsZSHLwicYT0a6yiJLY9LY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772223216368.81521893181264; Fri, 23 Oct 2026 09:17:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwT-0007qS-MG; Fri, 23 Oct 2026 12:16:29 -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 1xKHw0-0006xc-Ta for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:02 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHvx-0002QS-J4 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:15:58 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6S1S2216170 for ; Fri, 23 Oct 2026 16:15:56 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc817h-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:15:56 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f3969a2a7so177104585a.2 for ; Fri, 23 Oct 2026 09:15:56 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3f9d0dsm1003111f8f.22.2026.10.23.09.15.53 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= FHBwtfeYHyKYIoFDXSqPaZRe8t7cpoqEqTkKzZ61eGM=; b=n49BiNdIcI6cp7MZ xwG5L7oY9VU68Rawz3zsUQM0TuDdkXlWqFSoADTy1whh2IweD6M1KENXF5Rx/TQ7 eIfqmOSyyepkscQ3QJrGQI9hSRXxn9CZuhqBDL3Ny4+4Oc6VTq3GC61IH3LL9cQA pJu+y9UOP/IGrAxzVztuVOyq1Og3/+Ed0VxWcUwFwK9VCU7HFG9evqfWuNiNOaVM lfWyGI64TgJOMZHhRB9KPRrXJjRlE7k966uqx39yoKN6/R1F9TBf9uPArB+ilkJ/ 0ful74HghMYLp9HuxA7NcQLNLgHEzhQV17g1mLusk2Xleq9UEqYcSY0Rj4dC6+zD XXK3SA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772155; x=1793376955; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FHBwtfeYHyKYIoFDXSqPaZRe8t7cpoqEqTkKzZ61eGM=; b=GPJGTm9oEPRSM98W6jKi7VFFOpIV44gOC2WK8GNtEhZq+bdtt3LSJdCqIyMZrhwfQA myTc0HkYg4wSwLiVD6BBtKQ76t1TIdC8MbHQmNYp6upPG4EWCdY+HXgXeXtsbMNd/pqy 4JgD39yQZ8nDbmiyAuLRccpv7oDnn8Hp/FOoyoappS9J8lLuu+T/xjdAObtzWzw4fB0k CE7+97ZdPu4g0003QbjbNfrw+3FIL8DAUabDVzZNiSYuBswPBYXVSmut0/62dxD7/Wgx mRh7+hPph+pOcJ9eB+LHOaVfp+OWJo/XlHxZf1xzbT6W5Q6iLhmPJL8F+UA3bgN4CNpg JChQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772155; x=1793376955; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FHBwtfeYHyKYIoFDXSqPaZRe8t7cpoqEqTkKzZ61eGM=; b=hmPrmFD8v3yNLQp6nSQVWQL+rsbvBmhSgcTndCkLMcyG6xrq5Bumy5yQuiAPVF/nXE p4qBVDOthyYyNvl1nQm7boXlu5szozw14WRJj/0KwKdUPOou84siHBh/qZ/by5Xfg5bt 3Ir/rReEd5b6FQ3Ra8kjBQ2UrEBLbn0JLPHLS6CDmnq/BHGkjdrg6AGNXwHuwXcYAijv b3Hm3fvUgKS5S+GSUw9b1OXghlK4eLUGUkhNAJotmKaNaIYpi7r6DfTSlnjBC62AZ8DH WGOp9GKa5L3FCzygbHE8/FiiAePYSqgXxvBpKAh7tnIa+IGnWZq+mX624eZrPpUtut16 27dg== X-Gm-Message-State: AFq9FYIhoofEIF8rAO6nFERH6F8aMGXG6s1f5GU9U8IuGlb5rS3AVy5Q GKiKCwgyShxoPSTs57ZFpesNgZfs/OBcNqdbfFzjZAEsA0Lbg2PoV11IPw83c2nB139Q5GATKGi uwIv72VH7Jk9ceR8KYTdpuikQLJ8pf+FMjEyDM14aJC6HvKoX3UBhU+Pvh04VXgWtp7Xj X-Gm-Gg: AYBFou0aBeclO6wCeAp/613fsoZkaU4FcktTqbKT9wVpkBaifYY09FENTCiv+n25njY +5yXiLRUTA4z5Z9GSw2j+Ywy6UT90Fs7V6ui16EVRvTYNrk/rOaF278gwVNRfGLcEwJhmIIR0CU hiT/OncmZ9/Y2xybORYc2MU8+lTPSd25p4nrb9vmyOpku1vl7g4ibYmHWTfyp7euTsf/wMCFexe ggqgJOu0UwUEc8hDc7lJJFaPV4/jE+oA4p1qXNXVp4DK/vhjAk40pSoImPFG+McqnnMVC+NCgF5 oYoPcttA42ctSTVpQn1rGrC5fGxK5pukwWoWF997TPDpJVmHcqsJo/v0hAxSG93jwl5knbrIcMd WJ+JUHfoMR8aULnNTRelgCq8KW4T/9x+FTlfdpn8w X-Received: by 2002:a05:620a:4509:b0:93f:5ab9:fda7 with SMTP id af79cd13be357-93f6f7e3a9cmr490988085a.42.1792772155359; Fri, 23 Oct 2026 09:15:55 -0700 (PDT) X-Received: by 2002:a05:620a:4509:b0:93f:5ab9:fda7 with SMTP id af79cd13be357-93f6f7e3a9cmr490982585a.42.1792772154767; Fri, 23 Oct 2026 09:15:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 19/83] include: Remove TARGET_LONG_SIZE definition Date: Fri, 23 Oct 2026 18:12:27 +0200 Message-ID: <20261023161332.60153-20-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX37uj7aRjkn1W xZBs2D5CoPSWLwFXNtqxJF9MduDFXQPlrVfkNhQkB6vVhNe5nwLtY0MQkTNHsLxSTyUrQQy1lyp R/GQTn8SYWW16DskVEP1AkRAijItdYqB+udH0J3mEL4+CTaJhENy6THmSzWTzu+NU5iZdOTPFxY SLZaWzdmZb+i9Wi1kPloiHEqzRvDb1BW2wSixu1oVhKeWjNnyTz9cxFEklRW9//Ib8w63kx4uUE g7H6VzXpGcrYEtQu7p3sXqRF8Yjps86e5EOZZKqRw6SH4gar8q1ImGGCF1vCZMU+yHdhWvYcjEw zInDhEh/SMR1WqL3kQSh424pkl6yUTWUZLIza/mIV8i3ocJmUa+Htjft47TiN0XefzFT7nAOSC/ 6V+0kZryZ0NTm/6Nx7fc483LaSYAf4B3aKagpFBYdCHqmgGQm/XfEv8FsfuDuUw+c0gN9RBq7TW HkP0f6f95aM+rAOnLJg== X-Proofpoint-GUID: iYyuZXmfu9XhvCtGiEcTOXMKCFQyuJbp X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb883c cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=Kwhbg8pJGtqcix1HUGwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: iYyuZXmfu9XhvCtGiEcTOXMKCFQyuJbp X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX8lz8VSTdVWXU U7jU1ujPIlBPx3qB7fdB4TlnI0ja0I6LInkffdv3B+cbQwrz4GNFRgbgnzzPKsg7RsbIZriGpi7 6UD+FW61dZ+meULv5rX6CBzOwSI/X08= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772225002158501 All the code base uses TARGET_LONG_BITS, remove TARGET_LONG_SIZE as unnecessary. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261007232326.66240-11-philmd@oss.qualcomm.com> --- include/exec/target_long.h | 8 +++----- include/user/tswap-target.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/exec/target_long.h b/include/exec/target_long.h index 3cd8e26a23f..5d403c60402 100644 --- a/include/exec/target_long.h +++ b/include/exec/target_long.h @@ -20,17 +20,15 @@ #error TARGET_LONG_BITS not defined #endif =20 -#define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8) - /* target_ulong is the type of a virtual address */ -#if TARGET_LONG_SIZE =3D=3D 4 +#if TARGET_LONG_BITS =3D=3D 32 typedef int32_t target_long; typedef uint32_t target_ulong; #define TARGET_FMT_lx "%08x" #define TARGET_FMT_ld "%d" #define TARGET_FMT_lu "%u" #define MO_TL MO_32 -#elif TARGET_LONG_SIZE =3D=3D 8 +#elif TARGET_LONG_BITS =3D=3D 64 typedef int64_t target_long; typedef uint64_t target_ulong; #define TARGET_FMT_lx "%016" PRIx64 @@ -38,7 +36,7 @@ typedef uint64_t target_ulong; #define TARGET_FMT_lu "%" PRIu64 #define MO_TL MO_64 #else -#error TARGET_LONG_SIZE undefined +#error TARGET_LONG_BITS invalid #endif =20 #endif /* _TARGET_LONG_H_ */ diff --git a/include/user/tswap-target.h b/include/user/tswap-target.h index 4719330dbbc..1c66a5b9344 100644 --- a/include/user/tswap-target.h +++ b/include/user/tswap-target.h @@ -11,7 +11,7 @@ #include "exec/cpu-defs.h" #include "exec/tswap.h" =20 -#if TARGET_LONG_SIZE =3D=3D 4 +#if TARGET_LONG_BITS =3D=3D 32 #define tswapl(s) tswap32(s) #define bswaptls(s) bswap32s(s) #else --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772244; cv=none; d=zohomail.com; s=zohoarc; b=AdxQPXhvR08tDov6i0uoaFmZoydxpAhzvIvvHTkOI0dBsUZ+kBIGnyTI+RQRt1h/mvJVv/LQjIjsIsyRnZ47ZR6DsrP9Km0BgII2AiwTXMdUGpAfABqy0R6wmfJDGS1EdOxI4CDWJ5pvruB6bRRzS7vUphgPbAZJHYqGIAs+9iI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772244; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=q6RYsjAnSxeg5H+IYjSF15lRDnyLKngQ/0YHC5SX+0g=; b=Md3h1niMzR3quF6IJzRON+2nXvYQOrqtwpN/yBbzEW8OfLQhsmec8H3a3mshHkFm/7G0JmVD4js7aOT21phaz04pHO8kMjhFhqAjgTP93xmrN5YAP08Oflc59/a0Do7w3x0i/1SrepfkOFoHEqOmIgEFNX3zN8dYO5Lmy3dMZ3Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179277224450360.566261485242535; Fri, 23 Oct 2026 09:17:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwm-0008K1-DE; Fri, 23 Oct 2026 12:16:48 -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 1xKHw6-0006zO-R2 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:08 -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 1xKHw5-0002R7-04 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:06 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6A6j3019170 for ; Fri, 23 Oct 2026 16:16:03 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsykbxj1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:16:03 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93e49a1d3b1so245204985a.2 for ; Fri, 23 Oct 2026 09:16:03 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d37c4c2sm823295f8f.4.2026.10.23.09.16.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= q6RYsjAnSxeg5H+IYjSF15lRDnyLKngQ/0YHC5SX+0g=; b=fxCidKWO+wNmtDyc TpiK6JV5sXIrtChDliME/AKeiXCeOL7ZTh9Cr/az0lMj8Y2Yc5i9Gj303pvcU31F wjjegEdPYkjLIgkgBRDLruL4AtUn9dKw9DU35G16UCJCTFncADRsMGULRfybUXeR fqJZkU0ECZ8pgcfqPkLlzVuPeQlPFZo+EtwNplPLm4KN7rtNtEBkNRhH7hbAVQEI lP6SSRtsiq5EiHyVvAKvH5nrggyWM+fNIkhssaItHfoKT4+i8Gw9zg8/K9s7KIAR 4nfADNj0KEhBRa8VHI/wGy6rZS+a6FS6wLkikxoHzx5VwlT7WajnlPSk8T53n0pP 6+GsHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772162; x=1793376962; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=q6RYsjAnSxeg5H+IYjSF15lRDnyLKngQ/0YHC5SX+0g=; b=TIWJwXz0NF16QHRPkE+sVw406RYO7Xn0Y8kWzI4Hd8RksTbHB9o/I1yBvMaSKzWDQX HpCgNizMV3PJpx3pFial141VBcP0TZO5ns6HyaxZccFTy/I14VWSsQJQyt4Dh1l+rtLt xEMiy5V5iwuSMq4hlrepYbuVz5d7rCPCMRVwaJARMG79uZ32AyBw2QLgVzmvCq+UHpsX ME7TEbos/O9ke3OclgU9/+YLsx9RLTBDaU/iS1iUylQ5mrG3N5SLYRW7ba3vOSSX6ovV jW04UGKabLOPuwkKeGTTY2gs7kYPwpOr65Na2MRXtfCIR7s6Iqx2rI7C2/rjhllCpEdf efIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772162; x=1793376962; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=q6RYsjAnSxeg5H+IYjSF15lRDnyLKngQ/0YHC5SX+0g=; b=pPDJ/7OE5MZAgcA/n9WFmrM1wyY37FQ2wpkiBjWweldokJSiQ0NLrbeoeGMufQuf1m EHzVOCX7VsLwaLIieEazIVyVmxOKeeVa4ZmBw5weKbexo7+dMMJnV6ffmkOlnUHLmEKv 8HQZjJQTk9feJmbaxyOHQ/Szw3o3iXZCOlBPIU84GPdkG8yDgo8wKWbTSwzj0y7eU8my /PAcfF0tILLcTuOgsoTLuduXi3gfqB4Q7tPxYk6r8WyXDdnVSikN3UbCxXbwfm1EaMO7 l91P7y4PJsxaobPX2oLQp07Raaxbc8FW3ghSV2yuVSuKkrEafEkJAySc+pVcFziXYgYz BskA== X-Gm-Message-State: AFq9FYJNZ9aWkem7olW1oeGQBTAnAGmYszyO+s59jCIssQYR5zbDCqQZ OejmzWmm4zxOdrn2UfHbnfduWOxrtgDIGYEHLiKM85snFicJaUNUSwdPHNfHu8wU+I9Cg1JepOm l5J1IanQvCJ9JSPgq8aKJtWlSVSRAke+aRb7YSPZkzz0RRO0M1zxXq/5cnGALANqWkoSf X-Gm-Gg: AYBFou1Wz5wzUF2nYGOJKlrRHRyHP4YhIEhWEEkE89AIYPq+N2y5VGasyrHUe6MJ7kq IOr9x5BBIXkye2BX5zhc3W1yylw+HGW1fHgpPFdW9IA9gWWGimyfORXNYQfDEaGxidXOu1D4bym QnODnNH7atl9yFEvbqd0Plyt4XJI17sgDf4Axfsq2hbN1zFUjKlAb4yTal0+sAYclxXszYCyvQh CUUbSEYE5ryl+ny26lO5xBw2Iot8M1UTBgS2SbciyEAQni1PpGVSeb57tAP/jgeFP8RwuhvOCq8 A1oaRfGM+dVre8uGfLaKHSDvVO7TgbUtBLcTWeP7Ba7hA8Srt5wqBE9TpSKN743kusmrTBSheKd cFonTL4NYOMMamkdv0aXIT1oaeP65ZanrpAGHzn1L X-Received: by 2002:a05:620a:390c:b0:93e:e175:ee92 with SMTP id af79cd13be357-93f6f7d048cmr479542185a.39.1792772162384; Fri, 23 Oct 2026 09:16:02 -0700 (PDT) X-Received: by 2002:a05:620a:390c:b0:93e:e175:ee92 with SMTP id af79cd13be357-93f6f7d048cmr479537385a.39.1792772161904; Fri, 23 Oct 2026 09:16:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 20/83] qemu/osdep: Document ARRAY_SIZE() macro rejects pointers Date: Fri, 23 Oct 2026 18:12:28 +0200 Message-ID: <20261023161332.60153-21-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX5+UL7S4QTeYU VzdivbwxM5PBlTtXz9a+7ykeQo81ZQkunJyjQlqt8/z4TZu7EPOZd5ZldfaNYwjnd7w4JlrED4H nNihpcKLT34OLaWxHnor0ovF00POTVLGDSis7Zi0flIorKPogt34cIl5zJISvvbO+A27IJ7Esum RNnwWaCgW9D7p0HCXrxCo9q1Q7nq6ITPMMxqGwpuvRwhW3J2ubmii/EfsxeCI908TaeqqdS4VYw GpqSIFD8fsWhuvtPVEYFaIklx+9s8S/h45H18ws4VM4R9Q2YQsM6OOhZke0TYtz/zaSGYg7ZrCm DK4rNpmXloLIvrhxKd/e0pk8s/iPzg9lUViIPx3AHrN82JfuZpFXnGJ+TKvSoF5fqTKaek0YB8K //T0/qAl9Ti7aN3bhDuphxK/TdY/2djKAyuemYxZ+ICTsJd/AJGpjdQioEl/3L6WiwRHAqnXUU+ ct+pXk2jW7Y81DiYTww== X-Proofpoint-ORIG-GUID: bF0P1s1ihiLtxcU52Q-p1yZ-M-s-VI2j X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX0eqelWqnCHX2 b9Nmx8tFvB5DZrn2ly7LK1tz4Ks3FEej7/GdDKcO6ubg0gmlh6Bs2acIB1iZ6B46KNl+yd9v38j qZLIxeCVJF0YHs5ImCbOEzjnRTeOT+I= X-Proofpoint-GUID: bF0P1s1ihiLtxcU52Q-p1yZ-M-s-VI2j X-Authority-Analysis: v=2.4 cv=GLKdgeNK c=1 sm=1 tr=0 ts=6adb8843 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=Kwhbg8pJGtqcix1HUGwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772245423158500 Since commit ed63ec0d22c ("ARRAY_SIZE: check that argument is an array"), passing a pointer to ARRAY_SIZE() is a build error. Document that. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-2-philmd@oss.qualcomm.com> --- include/qemu/osdep.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 1ec5b42230b..5d5695ade28 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -528,6 +528,12 @@ void QEMU_ERROR("code path is reachable") */ #define QEMU_IS_ARRAY(x) (!__builtin_types_compatible_p(typeof(x), \ typeof(&(x)[0]))) +/** + * ARRAY_SIZE() - Return the number of elements of an array + * @x: the array + * + * Note: fails to build if @x is a pointer. + */ #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) ((sizeof(x) / sizeof((x)[0])) + \ QEMU_BUILD_BUG_ON_ZERO(!QEMU_IS_ARRAY(x))) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772216; cv=none; d=zohomail.com; s=zohoarc; b=WpoG8C5XOQFP8HuyhXhwBupWEKK1ZSGjiEy4uJGH8VKp4Nn6lYw4X3UUZk/nzpUPxyHgf3JnRgkBqEvRApB/ZdDSBXD7yfE+L/PMlkxr7MI9NqI1m7s+FTYvampTw0KTOr8zG/bY+Q6npFka+TOfMO3RjkMG0dr2dVkAX+Hvrl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772216; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=fx+cuwoOzYuOIKIwHmqqJHqd/hIMCN2JUJAataer1s0=; b=PCEXOFiYXymjaQCINrsdZEcQWPVi3UmUdp3Oe0Knu0I/6OrKkqkOFYBWqEMYp/QbWwWwLj4QZLIBN36TwYxMRL4i1Hl3EZ6dZ8aoUbyTUj4XG5HQDf8AunR7gOWaG3SFuxnYwz59sgD6g5jeTlKFO2gh9N4CqAIHb5CguZsfIE0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772216617195.6179855830319; Fri, 23 Oct 2026 09:16:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwT-0007qN-MN; Fri, 23 Oct 2026 12:16:29 -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 1xKHwH-0007L4-DT for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:18 -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 1xKHwC-0002RO-67 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:17 -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 69NE60Rw4063556 for ; Fri, 23 Oct 2026 16:16:10 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrcgpb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:16:10 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f1e62510cso260769785a.1 for ; Fri, 23 Oct 2026 09:16:10 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3f9f28sm746731f8f.21.2026.10.23.09.16.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= fx+cuwoOzYuOIKIwHmqqJHqd/hIMCN2JUJAataer1s0=; b=ZR9jHVO1rDRiQ2Cx x/Wj4TAxe4ePqUFoPePj5rjvse16duZOER3N4ydJ6pxWCIteEiGG1U6kD4EXDqE5 fLu/61tDYmRQND1Vnpn9yIZRIoczGbmbu7EHywXhyWukjcyc0j+r/O2c+kCCMeAd f0j6qRX6uuDmleNTIZruCuvjdjv/k3v4eAdmgAbkL9y75VirZY4KGKgJjhvbWvMM nYZRgFaAXWaRATqFsVwUHTRMqpHNTyXXRE84Jb0Sr2xzZUDI1yUdaCxtk6Tecp+W l6cuyTlMQOP7/sQoO0rYtgLeQvimiKt3jCeSVhzjtDbzTl9dhcPcbnGHcBN2ZU8C s7NB3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772170; x=1793376970; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=fx+cuwoOzYuOIKIwHmqqJHqd/hIMCN2JUJAataer1s0=; b=CANAU0IPC3b0niR6p6SZHqELpIQe7OIhqMfKrzMl8eksZoCfn08BPELH0cQ9sM31SH gA1GPSqtHfPOaMD9NtREj9PiDQf2QD5nkQKy9CKptzeRnNC/P5HccJnXDEaPRmhNcs+n 7UK+nnxswuty/10WLliKglnYRhXm/mWR+12jWySy2c7yqoKAx1jgtBvZytD3baeQv+gL 9ZOkENzP0VAFRFy47wMHDcE32zzb7d1uaMx9TqEQqu3JBnWQwDrYeS9rL1i/SOfVOnVG FN125PBMadOAO7E1ekvaIwWSAAI5q44UPhaqj33xDi7+mFqwaEyb6ZHn8iWWUrfVfe0n OXYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772170; x=1793376970; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=fx+cuwoOzYuOIKIwHmqqJHqd/hIMCN2JUJAataer1s0=; b=x8xeME4lSUL6/dpPQsbUHu9ZpaRgM8xEWKtYnDUw4sQQ/zccaO06IO4W+KvV8fmk/t POHtCWF4vja8CK9k2WZv2Sb8s1O7s82XOO4j2x9Fhnse+oNDoUF16SouzkixteEwoJw/ f8wYzORupR4ekp5rvOlrMpMMRuOfEKFtbMWaBpV51lW8OfWQFPes+TsOjrbdWzcss//I oe5IXKZKM1YzoEGKg7lfMlChCGZNOMIrZQRwHTt4CIoRbc/LzHxNSY2S5wqM7gaKqoIN lA/T0kJ4eD+u3mNWgomvgOTIvLirogjhAjCmtQ5qNfHCNfSzttkJ/CI4cEx0f/RW/oTV Zygw== X-Gm-Message-State: AFq9FYJjsrC5XIkxAcliU5e34LWmw/ZF7TvWF75adhso0SrF9QNFJNMU qVlx0jLmaRkLxpDXHBJjbhT5lDjX/jr/ELTxt72N4bO95+8s3ebO7I1Tw99McAMa7gQwZeotBFY cx2ZizTN4P5Aj6xcJ5SFBQ3xT8iSdOEPgtnQsZzhS4MUY96SPNdSlEupaw9buBFVkBC/C X-Gm-Gg: AYBFou37goDKOVdF7iTyRLkq9LpwYpF0cJ/zKw7pkcyamguSve8HY4W04d09370QlwW Mr9MELinxYDc+MyNlBNTWy3ovMCLbzkFU3Kgn/flrOn05nssSn2QpvfD2VVUPeiev8myTH31aro yXMQPYIUZkgACoOg1Cdsi/feOTSHtFxR3qRQrBWZTEKmVsbZuZdP8yZyPEt2Cd1l/TuSjvZ6paH mSU6bzcmy8Ngcw3zeZsYQoKmVPaIc9wF3jloIlIi+x1BkljURZQL5smddrC7Xs220IBA960k/hl F3jKbPQA/YzHKC7qTu7XyNZfPUIDJ+YM3GdVBJeBb7a/YqAeNGb/zGmKpvjff9PutdYqovqrJ57 WIRnryZ/o/eXp0R0pTpBfAwn8w0dkc0PDoqMNZtel X-Received: by 2002:a05:620a:1a17:b0:93f:31bb:e31 with SMTP id af79cd13be357-93f6f7f8b24mr523953585a.48.1792772169513; Fri, 23 Oct 2026 09:16:09 -0700 (PDT) X-Received: by 2002:a05:620a:1a17:b0:93f:31bb:e31 with SMTP id af79cd13be357-93f6f7f8b24mr523947185a.48.1792772168968; Fri, 23 Oct 2026 09:16:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 21/83] util/cutils: Add STR_ARRAY_ELEM_OR_NULL() for string table lookups Date: Fri, 23 Oct 2026 18:12:29 +0200 Message-ID: <20261023161332.60153-22-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: om8xBYR_oT-yNpqH5tRcF7rJKG7vzmpN X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXyhBFWwYpEFan 7SmHcdm6YfDLLQ1BTyBKdmoT7/3qxCz+UV31aclRx5OYkSzzzHVI+Yfa8PJEk4EDIQUGYc6m3Bl +xzJzfKAluzpRcZ+AJiZ/78KCFvbNXc= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb884a cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=rKAhNuBlhcDN32YTup8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX0R60vflh48Yl OAw41ELicI5A2iu8YQkdeJQ73X7BxA+NRPHrzZgGuRu2fW4kEN/loEL0WoLADknAERW6QtBOIWx QrMJjGAX3Jsu0Uln4u5SWmllgpmv6u/ck+I+ROcohfrgnt28Gtk9VRtwYC0FwJKVKYOIhHT71eT LtX3mLXQ16Y0HNvcKs1JYke8srJYEUPfStNyWXgFwxZLcbWXR/sHLdHVGdxacn56AYMGbylogjG svVn2tOSlp93BBVibuonwvoSMvSXf1Z2FfBhCVER2Kt6Bu4raO7TG/5vaaDSLYS8hM88lP+52L7 rP6IIPlqyJJCvgzQFfZsnhZOsFiUdPNHk49x4qv393QIxVcJvaZsgEY7+5FKDebNc80Z2UVu6Et YWLeIoNgpQ1PjvtY+5lqcxgx5nj1NgbFOThY7R4j7SLU31gD2/E9x7euJUqc3iypR8DdmHlUWtn gMUoyurwKj8MSBrzQFA== X-Proofpoint-ORIG-GUID: om8xBYR_oT-yNpqH5tRcF7rJKG7vzmpN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772218902158500 Many functions map an enum or exception number to a name, either with a switch statement or by indexing a string table after an open-coded bounds check. Add STR_ARRAY_ELEM_OR_NULL(array, index), which returns array[index], or NULL when index is out of bounds, so such code can use a static table and a single call. The array is passed as 'const char *const *', so only arrays of strings are accepted; hence the STR_ prefix rather than a generic name. Misuse is caught at build time: - pointer instead of array: "negative width in bit-field" error, plus -Wsizeof-pointer-div (GCC); - array of non-strings (int[], char[][N], int *[]): -Wincompatible-pointer-types; - array of non-const 'char *': -Wincompatible-pointer-types (GCC), -Wincompatible-pointer-types-discards-qualifiers (clang); - pointer as index: -Wint-conversion. Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-3-philmd@oss.qualcomm.com> --- include/qemu/cutils.h | 17 +++++++++++++++++ include/qemu/osdep.h | 3 +++ util/cutils.c | 6 ++++++ 3 files changed, 26 insertions(+) diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index d249f226766..ad4c778ea3a 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -19,6 +19,23 @@ const char *si_prefix(unsigned int exp10); */ const char *iec_binary_prefix(unsigned int exp2); =20 +const char *str_array_elem_or_null(const char *const *array, + size_t nelem, uint64_t index); + +/** + * STR_ARRAY_ELEM_OR_NULL() - Return a string array element, or NULL if + * out of bounds + * @array: array of strings to index + * @index: index of the element to return + * + * Return @array[@index] if @index is a valid index, otherwise return + * NULL. @index is converted to uint64_t, so negative values of signed + * types are out of bounds and also yield NULL. Useful to look up entries + * in enum-indexed string tables without a prior bounds check. + */ +#define STR_ARRAY_ELEM_OR_NULL(array, index) \ + str_array_elem_or_null(array, ARRAY_SIZE(array), index) + /** * pstrcpy: * @buf: buffer to copy string into diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 5d5695ade28..50c7ce33b6a 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -532,6 +532,9 @@ void QEMU_ERROR("code path is reachable") * ARRAY_SIZE() - Return the number of elements of an array * @x: the array * + * For bounds-checked lookups in arrays of strings, see + * STR_ARRAY_ELEM_OR_NULL() in "qemu/cutils.h". + * * Note: fails to build if @x is a pointer. */ #ifndef ARRAY_SIZE diff --git a/util/cutils.c b/util/cutils.c index 91ddadfd15a..d8a04ead5a4 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -954,6 +954,12 @@ const char *iec_binary_prefix(unsigned int exp2) return prefixes[exp2 / 10]; } =20 +const char *str_array_elem_or_null(const char *const *array, + size_t nelem, uint64_t index) +{ + return index >=3D nelem ? NULL : array[index]; +} + /* * Return human readable string for size @val. * @val can be anything that uint64_t allows (no more than "16 EiB"). --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772218; cv=none; d=zohomail.com; s=zohoarc; b=bR1QUMWGa4e8uRCLZ6gz782BtICVo3fWNQdBAa71Z5Jrtk7SHcGtYIc+GwIvIGSwQtmVwV2tIXVynHs5uC+RdvccXM8vmC933VhkDOJ1KU3Z8jS8m77xDdqN8wVN1f7rnum5H45SIHFPNes/dal9u/K/eb51Jv82ONNUXR9Nf+0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772218; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Z70493/7Tms2mpDwu94jnbkikC/mFPoefTSwPdSzoPg=; b=Aa7xtBKkeTAsvmMmScHYRlDjiVG2zhX20hJY9knVcWfJIcB8cuqSp4ApmKA9ApXfoaw2FcuEuh/Iu11WAHOlZzEwijPffBIB0vSN+XPBi6lQRTSKYyAEWcANYCPILgplAFCXk3MYi9jfA91qcslyvHXVUZ9RdfKSvVtn/Zkxsjo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772218714959.3760764602521; Fri, 23 Oct 2026 09:16:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwk-0008Gj-5t; Fri, 23 Oct 2026 12:16:47 -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 1xKHwM-0007ol-0z for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:22 -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 1xKHwJ-0002Rs-B3 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:20 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE66143018953 for ; Fri, 23 Oct 2026 16:16:17 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsykbxkf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:16:17 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93cb98809caso181774585a.1 for ; Fri, 23 Oct 2026 09:16:17 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d4048c1sm693232f8f.29.2026.10.23.09.16.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Z70493/7Tms2mpDwu94jnbkikC/mFPoefTSwPdSzoPg=; b=o7BgbrONNrBF68jB mQnOOZ8M2hXBeslcdhV7tXFqpsdOhl5uy/+ESMK5tt5DECg1/V9kuQgXsrueLtYG XTiL9O1dWf90UqZ+ctfXkTkRtDLQdSdNeFCa9eL4IZDkwtVM4CfI5TfBGWPu/oS/ j4EHFfFEhKqoBczH2VUrS0h+EDLfGOvsnSgc6fUU3SvxOMKqyoANfr2uZmCJvT81 8OfWAl2SWjgGjIIUHG7koWtNm7a7+61RkMQWpSMtzCN1zz74MB1CVZt7lkjadVp8 bAn/nigepAFu5qxjl8w1/dMsPmCVFbKhZSWlD5FteGRBVHhTUKvYIEqMovynoFmb 9O14vg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772177; x=1793376977; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Z70493/7Tms2mpDwu94jnbkikC/mFPoefTSwPdSzoPg=; b=gGUfj9BN1n5XpF+BNx/VXTMp7cP5W73XzPs8u0gCaTQjF4kxpMviOKFe6C9Fc9vKwv 36c6+SCSMDXTugN5XSitDr8Wiji4PLm/bGT66sqhrhIvNhy0P3ifLppVaZqEZ/UesTKB O3lapHl5NOFGdpwKwVFij3+nXsjGdn/d7uS12UQqp8pV9gs0SA12r+X0OdlHgLpowuBB mSlOU93epsKu7eWuUOuD6bl78kGZ0YqJxo5r0pGXxoI0hn+BdYGcgOnN6Azwk2Uoqw7E 2HxP4KcKK5Ytq6JjF9HAD6+gOKmIv9kE7fHa6sB2S+WJFOWYttbVffc6UNiifjmZoxdT +hZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772177; x=1793376977; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Z70493/7Tms2mpDwu94jnbkikC/mFPoefTSwPdSzoPg=; b=2Unu0MoxWVuDLD3OLIHCbMXHH4T/DztSscsEqzR9rqAplhQNpdUmwEcKy4ad+MrpnW i3O4aQr+MJiybHHS9YZ0tNl00RElYO87cA2246HE4MpEdN4GNcZY/T+KPEtbqjc5xoFE yV3C2cL6zan4kYMw3Rhr6YL+YTWt9bR8CF5125oWh6uUQnURmf/6kYqDs3AcHX+2E9bc 8/qxm3Bgmyv2pCqyqGxhV0aCcs6IgLbVmqvhuK8uPcLAF/03P3A72Ns3/fGq7SjqnZmG 4Zmuxt2cvL5gxwoWOdf+FLVUC52EkNrxPaLC1n4ANp+h5ZBXuRQTCZd9NTYd7NkfYgIt 9miQ== X-Gm-Message-State: AFq9FYKoCdje+0KiDOgksnuRlMoHvLmsX08IVyJa+O2TZ04WtdWJFdXJ os+QU1tfoka9fMXUWgiB5zU1PV/8/mgo2Hoq8FuoX9lWctCb4wzAjxKxi8Gnj1mzY5LN21kQ+M6 6YYiU1dCJk6KIqq4lvH2mcVlHVD1oNdtVtyZZSVc1rL7arDmQyyxeBvMmjEL4Acx4ui7n X-Gm-Gg: AYBFou06WvJ8U8Y6jtXymV0S0m1ycjCEJchwBcoF6/pqHqjnq/jFD66aRR+VABAHzFz YeGKYBw2YVnP06/UUFe3BohgiMMjAksxZmw2NQbrHXB+J0K/50W+U5cPHKxyxFzV+fnXXy/NLoU iMjlouSV37Xb4P/2GZQf+tJv/uHt6vM8dy+0aKZUZMhV2MEVJHmcyRPmeEYZ4RjW4vmFYf0g07z kEUGS3klmCBK+kawDqo6qzImf3xySIac/uKoGvicAvl5eVftuNeOC0T9o1ybwAPRQpKQZ2udfQD aaiocbdXbSrV5e8UeulIU58hPrF2JgdichfQyx8Ti3wwJr8CVA9i3AxsJU2rqL3gA+ziMtBVffp KHSb/n8nxEP6pAFtnoFcWId6ZVYyDTFy2QtNp3VnK X-Received: by 2002:a05:620a:4505:b0:93b:e5e9:23d9 with SMTP id af79cd13be357-93f6f78710emr517183785a.23.1792772176632; Fri, 23 Oct 2026 09:16:16 -0700 (PDT) X-Received: by 2002:a05:620a:4505:b0:93b:e5e9:23d9 with SMTP id af79cd13be357-93f6f78710emr517177685a.23.1792772176076; Fri, 23 Oct 2026 09:16:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 22/83] cpus: Add helper to log raised exceptions with '-d int' Date: Fri, 23 Oct 2026 18:12:30 +0200 Message-ID: <20261023161332.60153-23-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX11LBWabFFLyn 0t3kRbqiig0rktpW9lJYcBP3blx74D4APbXU83NRiT/pxoB2B6dlz+SMdGmDZVwUVJoWTWJ2TmN FSnc1hkW6dK8uLCSA/MqjxOatGLLq/q44Jm6s/iXN+CINXdEk565V77szxJco8ddlqa4Pyc5okD 6F7OtsnmwFnsxhuCfzBMWKMkIEtpjr7oD7HJuxN2v97zV4+MoOnxSJsoFPMXDUuMi6Ww2udxoB7 fWFxL9n6z3HA0poLPKIsEDlFzJjC5M3xUrxNg9x8Qu6vRNNQ+iiia1+teROrLbzNUhF2X5HdBGs +Ry7WfDDUuidUxWyfcHrS0pO4vmtaK2F7Lz9BjUEGyPZxMrTdfkSrxfLwf68n0EOyufZM84GUed 71gxvpwzQ1qOSq3d94/mqQYcZ3bJqKc33BlvV+WB5nv31uDtFWCjziSe4+mcijXEN81wUT/idWS VFK0Tg/gCXC1B+Eb3xA== X-Proofpoint-ORIG-GUID: KFCaLqKHbsTkTil-qwJPd4Gwgxz__gtf X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX4I8vN09nW0Lm pRCRvKbBK8Vjaf3i10xoiADR6pWioR/Pv/1963KSMPLUVKhQy4I9FMJDsgmQPqdBIIwWxVJubcP PtF6n1Ir8oE8K6c4f+co2yq8YzGO/cI= X-Proofpoint-GUID: KFCaLqKHbsTkTil-qwJPd4Gwgxz__gtf X-Authority-Analysis: v=2.4 cv=GLKdgeNK c=1 sm=1 tr=0 ts=6adb8851 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=0xCBr3yVtZFRf-pbA1IA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772218871158500 Add log_raise_exception(), a common helper cpu_loop_*() can call to log a raised exception when '-d int' is used, and qemu_excp_name() to resolve QEMU-internal exceptions to names. Use it in cpu_loop_exit_atomic() to log the EXCP_ATOMIC reason. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-4-philmd@oss.qualcomm.com> --- accel/tcg/cpu-exec-common.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index 68077c8fd9d..bd2cb9d6311 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/cutils.h" #include "exec/log.h" #include "system/tcg.h" #include "qemu/plugin.h" @@ -89,6 +90,34 @@ void tcg_update_all_cflags(void) } } =20 +#define EXCP_QEMU_INTERNAL 0x10000 + +static const char *qemu_excp_name(int excp) +{ + static const char *excp_name[] =3D { + [EXCP_INTERRUPT - EXCP_QEMU_INTERNAL] =3D "async interruption", + [EXCP_HLT - EXCP_QEMU_INTERNAL] =3D "hlt instruction", + [EXCP_DEBUG - EXCP_QEMU_INTERNAL] =3D "debug", + [EXCP_HALTED - EXCP_QEMU_INTERNAL] =3D "halted", + [EXCP_YIELD - EXCP_QEMU_INTERNAL] =3D "yield", + [EXCP_ATOMIC - EXCP_QEMU_INTERNAL] =3D "emulate atomic", + }; + assert(excp >=3D EXCP_QEMU_INTERNAL); + excp -=3D EXCP_QEMU_INTERNAL; + return STR_ARRAY_ELEM_OR_NULL(excp_name, excp) ?: "unknown"; +} + +static void log_raise_exception(const CPUState *cpu, int excp) +{ + if (!qemu_loglevel_mask(CPU_LOG_INT)) { + return; + } + if (excp >=3D EXCP_QEMU_INTERNAL) { + qemu_log_mask(CPU_LOG_INT, "raise exception: 0x%x (internal: %s)\n= ", + excp, qemu_excp_name(excp)); + } +} + /* exit the current TB, but without causing any exception to be raised */ void cpu_loop_exit_noexc(CPUState *cpu) { @@ -118,5 +147,6 @@ void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc) /* Prevent looping if already executing in a serial context. */ g_assert(!cpu_in_serial_context(cpu)); cpu->exception_index =3D EXCP_ATOMIC; + log_raise_exception(cpu, EXCP_ATOMIC); cpu_loop_exit_restore(cpu, pc); } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772272; cv=none; d=zohomail.com; s=zohoarc; b=AJzQ2ka/84uiAK6qf4ArX0cuvu2NB3ztTxpiWDudcn0Hsp5tKoxa9KFQr7pW2EY+6gvQ/mpRbm33FQI/KN8HbOmFm2AgxxyPVXpmFJqhJajSN3fHYqGOkWroPPcPQPQoTYokNvImY5e+LD3f5vJC0rsFeGOzx1FTgTmz77E7FEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772272; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=QijB1C7UZUVyq/8jv1RA9tIy6oDiqJ2PPdeJ1NBZOD8=; b=K2EWVqrJr1GxiSD838TDr8d7dbz4mAOjuetl0o/SKAr9J59rXXco9rHNFcsVWxMKaF4xXuEi26ujjZ1M0zzIP0ntSLasDPCCeTjrIT6qs0yFw6+QPpevGkgDKZg5XIZ/HUb6lr8yZOpzqmt0DCqh4wo5Vo8HnYiRxv03sHnKWpU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772272389150.37019314877216; Fri, 23 Oct 2026 09:17:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwp-0008Vq-U9; Fri, 23 Oct 2026 12:16:52 -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 1xKHwS-0008BY-BY for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:29 -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 1xKHwQ-0002SA-9g for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:27 -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 69NE5vEY4063351 for ; Fri, 23 Oct 2026 16:16:25 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrcgq2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:16:24 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93e49a1d3b1so245285785a.2 for ; Fri, 23 Oct 2026 09:16:24 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d37c4b7sm994720f8f.2.2026.10.23.09.16.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= QijB1C7UZUVyq/8jv1RA9tIy6oDiqJ2PPdeJ1NBZOD8=; b=Cb0ba/znXnjTlw7r c9yJhiGrMROOg5efDfyTOFxr/UTuaIlek301QBVryPuWSUkNjKX5Ptfuor2ieUfX jZhrkSecfJC56SF+VT+KweaN059hTCaCGyk88wU8+U18jzV8TCYuRYJelOr2+XKk 7+MwPIJs7VtCgRTW0LBcJbEEt54blZaD6b16SdVJCO5HIYqInko1wigo3gLCJbYg z08+/D65PoylaMoThKxmMHMLV8eS/MdSCfG3uKtZ3FCH8P3CxLtCoUhJzKT2zCt5 On3szy4CF/FcLGN4icX/Xyeg3GAIyCS3m1/RmqdUCm4cW2PM1NYZQWkmSnn9YlcS lR1FOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772184; x=1793376984; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=QijB1C7UZUVyq/8jv1RA9tIy6oDiqJ2PPdeJ1NBZOD8=; b=EoefGDRgkjtmpGplXNlmjgpjSVDRCZch9TS+1DJ1Vyn9cgwFdrMdQ+Yuej8w6dzNes AYojvZfcmxG+Ksl2c6MATwE6HVl0TJd1hcqYpzTWPacPYbgQqztY2jb7WsR1hGym1FcT ltLkZ8dFqXr8QO7axYCARSYfoajcnW4DiHhjBe/wEOVuqK/JzV9fvOH1A6o5BcNmK+Pi tqOECZK9cfgv9JVYk1SZcuPPireTaciiJ/ezQl3/pIlmXeJno/Qs3CVVoDxjyAIQh5M5 8jTcQtcoMjS3fwuRfGVY1U5pa6JVu/GQFJ5EpgnUUVzUIIfOR7lNcotPOWNPSjrmtiKH WfBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772184; x=1793376984; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=QijB1C7UZUVyq/8jv1RA9tIy6oDiqJ2PPdeJ1NBZOD8=; b=vUrDkddkjVMUspal+UXIrzi/Oz15SUm6uZBoFNz84XHcZIyFtg02h7sm2n12FCc4jc gq4DEhGP2K8w8ZZ0FSvycVz8igjm+u+73/Iezfhb2hXwifj1TjSrTqgV6EXoxyl+59qH +HzjA+kYOLrm1LetiUM9znK9I5bEsLYqHT13jzUi98PNhf0U/XLnf5sNcjMJ5c2XWtTV dhtmcSRdwZu9NUCQ+txGJGeaZ8+uDmD3JnGVuHgZBXYHmqH1PRJZaUT9wxrlJZKWx279 0wEZaDTc5EOOPEe07mpZBKzItek03+b9me2ItX/YxrrdpohjziKvvAhGfsdMFxlu4P/S U7Jw== X-Gm-Message-State: AFq9FYIpR1bKUkllK1fzxa5FH7TEpyXCITu2L8fjzxI9oiHe7Xa5HGMb FBhq7K8CX1Oa9xfp4/U4IOfySdUTA4CXPuioC7TRXksCwf9a57pYIN/QQy8IJqcUpL+hVzrbpX6 vN25OOwfVK/nQJK84CWIEJIwrpD5V0XfSYn6ujRCG+YK2F5iNrwSJ5bEIiqNSFJ79Cr4a X-Gm-Gg: AYBFou0aKnXKDahBzw3YNL76f+pgYSbEvZr+k6t7x5ebYrqN/NBcWp2OjfsEmtqyNSf p5XcJIiAkGDsGRtYiosfkKHgVnkDKIPqRkmShueVzpCYRDtbUBlkZVY6GcvMtMQk5FxGWBt5j4R X6V6lS7H7Eo4QRQasMCJx5iH2/X/pZD75lJ90OOHNFIL059K+5uBaOJTmJLKxT6IV3CiL5L3ADM 1B88ZD/ff9utir62nS69VGMAulT7bf9SuKCAAU5GpNLwvKXAiYBilAwTgArXP5V+aB5OUc/XVOj XKtAhrSX/92InoVbA78exXEgfUGoqkjoOVEEyTO/Nf6FvlH/br43Dl6v/rv4Pvka81eTefY4Uct cQpLd0iu/lj9a3zvadQNbBL6i/hp6xgQIMJyUqn3O X-Received: by 2002:a05:620a:839b:b0:93e:9292:1b96 with SMTP id af79cd13be357-93f6f591f31mr480133285a.3.1792772183650; Fri, 23 Oct 2026 09:16:23 -0700 (PDT) X-Received: by 2002:a05:620a:839b:b0:93e:9292:1b96 with SMTP id af79cd13be357-93f6f591f31mr480128385a.3.1792772183135; Fri, 23 Oct 2026 09:16:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 23/83] cpus: Introduce CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:31 +0200 Message-ID: <20261023161332.60153-24-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: JVWuX7_zW_N5zPN-OpKRLtknbD9zTUHI X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX/1Eg/K2nsEM9 46HM4DQjd7NI7VJZsPAWM3DZgJDY2GEWEHZW8TbkrL7YpfeMB8HPtaqZQQAGzuOnRvtnubMigIL FF2tbKefNtrS1mB0VI67AsTWZMQELy4= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb8858 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=VFrVLvhLpLwouTeFobcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX0oZSoXZGxCmo qo6Q3u9qcyeapOz4B2ZqHeJ7B6+Z/rcLTw7BZ1TbAIQgX1KQjeeSXSys75KdyosPEksbBmThC4S XwLu3eVC7brRhLAFG6tYScRYPs7rApfguUuMLwUF28rIyjwBY+953iyb4Y1wgmb0hgBwPw/zVVp IAV1phgpS0erBwbWX29PJy7pSsngSRpdusgZP5egtoWSc9Am0ZKZloUWu1iUGR5okCV9MpvDH5a 504ZbAXge1g7pffAh0A5HDVIwDNs2wHo/1A710AL+cdR3Jpb9XVQLNh1p/aozPxZmUn0YOkj0YF yZTAELf6oTvxfWpc6OWN7upmiOjIg7uaNJG9NxUqmgM9SAkNsNj+1z49v1he+Uq0feRwKB6JFLC 0hij0KPPvd4nRECku/LtiwaN1yrbqt4imIJAuYLlfus+6bnFEKwuDoVEDJNT0ncET3T+yLfSaPi FCtGGFscq9t1nZEQHUQ== X-Proofpoint-ORIG-GUID: JVWuX7_zW_N5zPN-OpKRLtknbD9zTUHI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772273911158500 Have targets register a helper to resolve their exceptions. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-5-philmd@oss.qualcomm.com> --- include/hw/core/cpu.h | 2 ++ accel/tcg/cpu-exec-common.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index a3b4c6c08a7..5b7c330047d 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -108,6 +108,7 @@ struct SemihostingCPUOps; * @list_cpus: list available CPU models and flags. * @parse_features: Callback to parse command line arguments. * @reset_dump_flags: #CPUDumpFlags to use for reset logging. + * @exception_name: Callback for getting architecture exception name. * @memory_rw_debug: Callback for GDB memory access. * @dump_state: Callback for dumping state. * @query_cpu_fast: @@ -178,6 +179,7 @@ struct CPUClass { const char * (*gdb_arch_name)(CPUState *cpu); const char * (*gdb_get_core_xml_file)(CPUState *cpu); =20 + const char *(*exception_name)(int exception); void (*disas_set_info)(const CPUState *cpu, disassemble_info *info); =20 const char *deprecation_note; diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index bd2cb9d6311..4e5e69649aa 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -115,6 +115,12 @@ static void log_raise_exception(const CPUState *cpu, i= nt excp) if (excp >=3D EXCP_QEMU_INTERNAL) { qemu_log_mask(CPU_LOG_INT, "raise exception: 0x%x (internal: %s)\n= ", excp, qemu_excp_name(excp)); + } else { + const CPUClass *cc =3D cpu->cc; + const char *name =3D cc->exception_name ? cc->exception_name(excp) + : "unknown"; + + qemu_log_mask(CPU_LOG_INT, "raise exception: %d (%s)\n", excp, nam= e); } } =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772297; cv=none; d=zohomail.com; s=zohoarc; b=GZwrES/xDBDQYmZPHPqFmDd6DT4iEBSqCy1L7F61uURLIMcDxxY8Oz/rxikdHGmmgYWXnWaomK/MoXWOfgY5Cp7F0VWRhHYzrgQYvbRaCd8lSWNBSXpBXz9BB7iKkKRe4S9DtLBPaKMPSTdIGd5vuQD2YYwdNnDyDHpsQRpWG8U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772297; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=JGeeIZrkqsAca3CU5LAZyWYtnKHbU8aUt8+q9zv4tjs=; b=do0mwTHyjtkrWFlP1Aw/KHN5j1zTfh98E4GbWnOZhF7KF1STBXFMbmgj7bH0zaic6E3DD6siZFO00LibAZ1IFvQ5zL+752AfJ68hQfLK4/ShokWyMJQuKCnp9to2SzzzAryiBhPL01wOYycpOvc58ZUFGwcEEzzxboAuleo1z1w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772296993435.71841788205836; Fri, 23 Oct 2026 09:18:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwt-0000Zl-UV; Fri, 23 Oct 2026 12:16:56 -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 1xKHwZ-0008Ef-J8 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:38 -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 1xKHwX-0002Sf-GW for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:35 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6usH1492294 for ; Fri, 23 Oct 2026 16:16:32 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauy70-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:16:31 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93f20addba1so201739285a.1 for ; Fri, 23 Oct 2026 09:16:31 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312eafc80sm18499885e9.3.2026.10.23.09.16.29 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= JGeeIZrkqsAca3CU5LAZyWYtnKHbU8aUt8+q9zv4tjs=; b=EUxsscrNx6QYKDhB yNGE2X0f2kNNlieoKUWivmhIAJqQ3jENDkMfDkkLtYRROTF5bpWYT9D/Pfqz5waU NdZav14+BVDIR5norc5OzDTO+k7bUbuzQn7e/mcUuAr6oBLl4XE2X4pLJNKbeQmr wiHizHAplk3QSITm/O/jnoWp3PxVEUXWs6+6s8KQ9X9gk5NgJ9DRd/Nxhp/CEjlt VHK4w3TpwZH7kCM08ycHOOX83JF0yxhTJHJbBzKb4m0+xHsXKEI/KlDdN6h+ghWJ SfPTW/f06dhMU69wazrPjkRAfMD2Lvmu9l+6TnnKjj5ICfhImJks877keZ1e5hbx zCGqGA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772191; x=1793376991; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JGeeIZrkqsAca3CU5LAZyWYtnKHbU8aUt8+q9zv4tjs=; b=StUobGmX3vzK3UJgaZa6AMEpl+zoGrTeBLQf4RoWav/2GI+IKPbJL47WbuhkKiBcMC iVeJXscHWPQCVU9YLk61yJylKHNRKqULvKtJ6YTwKgNWL1bPc8DmMQR6dEMspsTDaS/R pGfwkD8uRoIEpv5rJL5JmqjuDFJeBDLbBE6tZVI4FPFBSr4BrfW1ezEyKSFD9wMtJmuW TksLLbJ8Q/ThxkCgk5pM9jPyjJBY8aWXUJSgpefjvPaQYMiX40gIve1v4trJG1s6qjif NaByEheG1X1LrEjlxDNACO0UrcmNggWjfwXNDVTLwkdkJuJR1s9zZ/xnRn2vbVYM9r4L jNwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772191; x=1793376991; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JGeeIZrkqsAca3CU5LAZyWYtnKHbU8aUt8+q9zv4tjs=; b=Z5BijgjZ4xlbs1TNsokl+8ZMpAYDo9vh26yHeZ7ME8GmwC/wKeYLEbfQ/mlVXuCPp7 qGIatYSKqu3zaYm+FZ2qPTW1bQCMkAESAmagwSyn+n8IVZOSnGsvWiaNWgaWfDZ++IdW +Vby7qIJnf8azAOgIhPbIjem+n/5dzKariCwKe6iRReDtQaiQxjgJgA8JERB6fWR12+b 34L6ArkJlxgSegCPtoRbQByjo2vkYSg8FxjIwIHudCwKA3Vfp0swLk3PmqwBU4Uz/HjA HsCWxrKsG4n52PEgG/DwF1JLYdMxM3zQGaPnhf3cwGme7e+N5OXelQOoCv/Gt/9+2k0V AniQ== X-Gm-Message-State: AFq9FYKGwr7LBZjg9l9/2OHQnWL2pb7fGTLT/EIwsrEAztW/vbv3IPyf g7pCwJNgf0iYX3P4uXNBf2b40y05H8C1FdrIzCbOOQKMeihwojgA/Hb0HghqrVdsuppv/hmCj0o BaMz0aaSgPDRijm6RZqY1V77iCW2u1nGwdcEalm1awzW+qgMjPAFcAuQuEx6AVtyIdGks X-Gm-Gg: AYBFou154jIUERsr986ZD5DY6b99x+f7yYUxpLzk85uduRNvLCInT0f2hF4c2fFaKoZ 5DU//WnGv2hFenJfWe+NBFvljL5ESpTzOOZIC+aDtLhvTuLQyLeQHoMFD0RZoD0mEh4SmpnTySF tS/78nJX6k+koG5ZIoTkQNhtXhNMX6xvdsUnN88Hb7Dd6BAjbkWKLBQMbQEO7fa5vqW3PMlESmr OcDfkLY1km2Wl75GtaSb1BFQhUxNad/hzAstc6uJJbaJTq9X8sca+iG500pV3Z+q5upAbtZ4TGl dw7lklRVvj47qYjG9dV1jqNw+F2u0b2b5DzKyPdXklE0ZxazVFVPhplG+O3TSfsXCHikxv+YNKm pr62DKvNqIZefFpPSFu9vHNI3NJGhaA6Uu81Z7Guq X-Received: by 2002:a05:620a:44d3:b0:93b:fb3c:2d09 with SMTP id af79cd13be357-93f6f8a80cdmr475380685a.66.1792772190736; Fri, 23 Oct 2026 09:16:30 -0700 (PDT) X-Received: by 2002:a05:620a:44d3:b0:93b:fb3c:2d09 with SMTP id af79cd13be357-93f6f8a80cdmr475376585a.66.1792772190139; Fri, 23 Oct 2026 09:16:30 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 24/83] target/alpha: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:32 +0200 Message-ID: <20261023161332.60153-25-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb885f cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=kVf6GzFcR4OVXmdlW0QA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX3v0rwDE0dMLO 0/PDl1gQWUHQB6yiEtJb4NmkXu7CK9G1q94es2gCUlm6Ja1xL4l6UUOe5TdlyI2cvf+9rgRyMxG 8TqXbZk3LH202FsOx3eUXYL8cG6Ocbk= X-Proofpoint-GUID: -OBs0n-c1qsc2hV-p5Y3-otxCuoh2wdG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX80jsLOi/2xP8 e34ttt1gPtj5aPUZ7XfIXaawERNwAVuou4mN5wRsJjxUs+ps4uncCSwxa1RpfpsFKhOOteY8PwC 0HHYfNtKj4C4UDU9LHlS1mh2uu+rEvijOm9hVyIqiyPEmthtXrNGFj9/upZRk09+6neE5LqhKfX WqXETVYdkvdAq3w/9YllD3lOePRy9+rx5OT5ho43Y8r6lCrt1jihyR1IJXIXM5UJSTLQtdzEi0m h1MgjFXUwD0jp9xSoElU5Hnq0MUArl+5+wuhcoAcW13aObKqsUAbFMS2MgEMUnUJeXQL5if+tc6 flQbHLZ9m/MnB3k8pT8RvKiXVQUHrzIg1ObidKvU86V8nYdF2GZ4tSMd2SQ80lnT4LDdYGsfoG9 ZdcJInJw3vzeChDg7GfVdCcp379op5ujgTLHE3U4bImzoP9rVaTLvA91dRujkXtGP6NdoOwbKdU DFohdFs14zEEcTSPn8w== X-Proofpoint-ORIG-GUID: -OBs0n-c1qsc2hV-p5Y3-otxCuoh2wdG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772298350158500 Factor alpha_exception_name() out of alpha_cpu_do_interrupt() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve Alpha exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-6-philmd@oss.qualcomm.com> --- target/alpha/cpu.h | 1 + target/alpha/cpu.c | 1 + target/alpha/helper.c | 82 ++++++++++++++++++++++++------------------- 3 files changed, 48 insertions(+), 36 deletions(-) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index 378bd96d941..8f780502476 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -284,6 +284,7 @@ void alpha_cpu_do_interrupt(CPUState *cpu); bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req); hwaddr alpha_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); #endif /* !CONFIG_USER_ONLY */ +const char *alpha_exception_name(int exception); void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags); int alpha_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int alpha_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 7d1d036e1d3..6e514dcf4cd 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -282,6 +282,7 @@ static void alpha_cpu_class_init(ObjectClass *oc, const= void *data) &acc->parent_realize); =20 cc->class_by_name =3D alpha_cpu_class_by_name; + cc->exception_name =3D alpha_exception_name; cc->dump_state =3D alpha_cpu_dump_state; cc->set_pc =3D alpha_cpu_set_pc; cc->get_pc =3D alpha_cpu_get_pc; diff --git a/target/alpha/helper.c b/target/alpha/helper.c index c3614ecafda..cedb0006892 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -35,6 +35,51 @@ #define CONVERT_BIT(X, SRC, DST) \ (SRC > DST ? (X) / (SRC / DST) & (DST) : ((X) & SRC) * (DST / SRC)) =20 +const char *alpha_exception_name(int excp) +{ + const char *name; + + switch (excp) { + case EXCP_RESET: + name =3D "reset"; + break; + case EXCP_MCHK: + name =3D "mchk"; + break; + case EXCP_SMP_INTERRUPT: + name =3D "smp_interrupt"; + break; + case EXCP_CLK_INTERRUPT: + name =3D "clk_interrupt"; + break; + case EXCP_DEV_INTERRUPT: + name =3D "dev_interrupt"; + break; + case EXCP_MMFAULT: + name =3D "mmfault"; + break; + case EXCP_UNALIGN: + name =3D "unalign"; + break; + case EXCP_OPCDEC: + name =3D "opcdec"; + break; + case EXCP_ARITH: + name =3D "arith"; + break; + case EXCP_FEN: + name =3D "fen"; + break; + case EXCP_CALL_PAL: + name =3D "call_pal"; + break; + default: + name =3D ""; + break; + } + return name; +} + uint64_t cpu_alpha_load_fpcr(CPUAlphaState *env) { return (uint64_t)env->fpcr << 32; @@ -343,43 +388,8 @@ void alpha_cpu_do_interrupt(CPUState *cs) =20 if (qemu_loglevel_mask(CPU_LOG_INT)) { static int count; - const char *name =3D ""; + const char *name =3D alpha_exception_name(i); =20 - switch (i) { - case EXCP_RESET: - name =3D "reset"; - break; - case EXCP_MCHK: - name =3D "mchk"; - break; - case EXCP_SMP_INTERRUPT: - name =3D "smp_interrupt"; - break; - case EXCP_CLK_INTERRUPT: - name =3D "clk_interrupt"; - break; - case EXCP_DEV_INTERRUPT: - name =3D "dev_interrupt"; - break; - case EXCP_MMFAULT: - name =3D "mmfault"; - break; - case EXCP_UNALIGN: - name =3D "unalign"; - break; - case EXCP_OPCDEC: - name =3D "opcdec"; - break; - case EXCP_ARITH: - name =3D "arith"; - break; - case EXCP_FEN: - name =3D "fen"; - break; - case EXCP_CALL_PAL: - name =3D "call_pal"; - break; - } qemu_log("INT %6d: %s(%#x) cpu=3D%d pc=3D%016" PRIx64 " sp=3D%016" PRIx64 "\n", ++count, name, env->error_code, cs->cpu_index, --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772221; cv=none; d=zohomail.com; s=zohoarc; b=VA3RWD1Xm2GZcyhe3oUbPjF7O3UL0sWa5LFJdGci46WQELuaXjPP5hmhYAKV29JUBKAMSS/TtQq1syxjG1uPIOpi1SUPVOmxJLZNRTsWHLc1BxWj2u547SIThRc1ZsrxxCYUH+1i5jbccIxnnxZKgv44rFdzq3NyvAYmiZnZiBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772221; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=rSufRW8IL9oHGgZz6rskBUHAejjjMBI5QxkbJDLqxfA=; b=cLq19O4bBxoKIk1EuEmW0HGLyRHmfFpQW+hynpWIXn+er5GDs4ADfYNFDpckjBAWsVcchZ2/BbJyibLdOojuXx2wBwBYu3M8pIF65vt47h0CgKFzV8zJmH5bHLe3V4QsqLfpKzk4IeN/Q90U3oSawRCzNuQDFBTe5M4oGXP7KOc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772221183513.651749514731; Fri, 23 Oct 2026 09:17:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwq-00009E-Cg; Fri, 23 Oct 2026 12:16:53 -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 1xKHwf-0008GW-Dt for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:42 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHwd-0002TH-Ky for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:40 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG41ik3812454 for ; Fri, 23 Oct 2026 16:16:38 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas881s5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:16:38 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93caf6c528aso166466485a.0 for ; Fri, 23 Oct 2026 09:16:38 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312fd9574sm4115155e9.4.2026.10.23.09.16.36 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= rSufRW8IL9oHGgZz6rskBUHAejjjMBI5QxkbJDLqxfA=; b=m3FZKx0XSNv4dV7Y BlHk1nyImbpRiH1qKcZkCjHfmdpukiBzb+7kmOoUuR3G8KwAEwOOzdbdbtvsnSBO 4L063iwPhdpHo6K0vqAQHhq0+m9Z46PMowBQck0K3/L+jpboSXx6Qbf+EcwLbJeY v8xL7m8VbWgymQZnLBQbo/5pAvbtMXB85e5qbnaP0JqqQ1IoboQAIRK6lRKC6Wl6 MpKAkdbdaJwF7xAQxtDuMOQd9eyOx69x2bFKwRMiqNUfbHPQ2MLAQhisTQ8a3/8p hMJZllyXQdjVjs5Hhq9otycP+J3ChhLkCgB+SeY0R6XAH4HEgyo7XhohIoxhyBGo 2332Qw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772198; x=1793376998; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rSufRW8IL9oHGgZz6rskBUHAejjjMBI5QxkbJDLqxfA=; b=FR1t8vq9qUE5ZeIJER6XEzgO+dPhEzftoAUm7n4kxWlj5YjylC9gTy1N+eyyUnkzeh RlutAqu3XVOxyv6409Td/DNhzn7gOBnIa5Os9F3apTJywdHSgKTqeLPajpuq9JLPV2Xl 2XV4T9h++x+Bahp8Wxs/PAboDORRKlaxzhxRuL9Lf6NNt47a/Q9+h7ezDpf7Cbn0zIre iZpaDq29qvgSjkJc2Lt5y7Rtj//8oR8psPCRfbbuSyLqVJfAqejPnB9CA0onVa1MHqPO rrEgjQDBU+uclbdXuFI1yL3U0ad21D5jCUa84Rubyy0ZV4HoEdifIhAFnPvtrFvP7RAd fYYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772198; x=1793376998; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=rSufRW8IL9oHGgZz6rskBUHAejjjMBI5QxkbJDLqxfA=; b=AWXjN9KVZ8wWE3byLF0yteCsCPPggpfnHgc8ZbNaHbVpxVfegRtbLuB1H1xwDI7hva wr4DRlRlEippmFoob3gT6klBWwIf6G8AyCcvf3y9hcHsr39WfOZAItV1edTaR7gEUR0o bbsKFGr87Zta/hzH1ldcYg0OyhQbQJiQ+FwLEGBKIFNlpTnMvragVUHfR5ePslHv4W9R 1nB/A6hCVc9bxhlBXS6ZoJiv2tBb/1GRMN7vfwsCEh2oTt50Fb1Jl6JEQsAVcZSiZm7R LV0JR6N/UBtK4S8DWAKI/baxPDjHA0IFX7IFaTqOLoHKQ+KHQ1xDP4kTplC1CROxlRdP v0Wg== X-Gm-Message-State: AFq9FYLXZXWGW4+y6OXtQMMUY3hz1rQ7RQ4vClct2QYROnaWO0Esi2jy YsdpgDKzo1NP0FJhrf1L3ZlFfCzo4cibr4bOh+Xm7DcAqwc4SmkcydkMg401k9O4avB9Z9qn9bQ AEi7FbpdbBic6qaHARZe6GVIhNI9mHU6cRyirk2yLImLxr+xQq3A1nnrfSZQkNmcUBpRb X-Gm-Gg: AYBFou3o7DD+/VaL6KKJ7V1wKGbq03CI4iP03vD9S8liNomgz3zUATJZRnmMt0x3M16 dssSxWMiAFApMrhzbofG7j3ohmEe1eJkq2fLEzmsFIz3way0MYhdUFKNvi4fKpWK9KWzNObfJ6n iaD9U4NWKjLMeJ3KXuj0KD5oxhhMMPr/nfrXoBoG/PkQYEgHoNJ49AVcjMcylOI5Gz7UW9KyCK5 GRFfNAMGIBRWEj3jq8GQbTl+cCc+xOvrwOh/+vaA55LVwqqwPh8/UJPTny6irA8UxUDB96hifcW FdGhpi9Z9YMk8rKmgKbpPX4X6yMiMTOUNoQvA+HoSjNmf2vZZMDhg5mwujSnxu+C5+BluOwcEIk IQ0JFBsip/DIymuc1xnb8njF/IFSYRtBzvgVbSm6x X-Received: by 2002:a05:620a:2556:b0:93e:c12c:9dcc with SMTP id af79cd13be357-93f6fa004b0mr478462185a.76.1792772197947; Fri, 23 Oct 2026 09:16:37 -0700 (PDT) X-Received: by 2002:a05:620a:2556:b0:93e:c12c:9dcc with SMTP id af79cd13be357-93f6fa004b0mr478457185a.76.1792772197361; Fri, 23 Oct 2026 09:16:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 25/83] target/alpha: Use a static table in alpha_exception_name() Date: Fri, 23 Oct 2026 18:12:33 +0200 Message-ID: <20261023161332.60153-26-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX0DwwD3bu4HdM 6pxONy++O+UyCp4IRUdVCIUm1yXUp6nN6yAXfXLHCus+KdQCk5sXwgpyyde5Fy31l4nWmqHpOZf ERmFQNQltlHnrgBBE8869LyvDqrXmqc= X-Authority-Analysis: v=2.4 cv=OPqyTiaB c=1 sm=1 tr=0 ts=6adb8866 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=-Zoeorw8py2zlXck_4IA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX01xhVpdRYv2C 3YRSwp0jU1JAEd4NYRB3AtlJVq5ClOmkB1Cy67rNGSLRj6zEPyOK/kEH/4rVMwORBRxa5cAM7LV lLNL+gJCNhdFqg1gZA4sCoxU19rvvINEwKr9q7kwlKsuh9wEZogMCP3s6+i0ffHgGyH5blfivfl /2gCH6JcWCcngYqV9Rx0vbHrtnWinlajMj74Vq57R1D1+mJy2BufRJSDitXM4YKs6ebZgZVq+KN WWMr+nSDbDW8swBu37EZOoV6LeEPNttx7PDh+drzBZIc/D+Ogc7juD4TmD49YPn3rZDypl2h2UO 4djHuPGRlRpIqm6xgGUNDR3AWaCKgk9P2FKRKeAIJmaxgbpluRPXUdz4kuxmtWlXGudLDlpML4r z5eYivqZ7dOBxFEyDJzsEL4ujC8ADXDLttM6emMr2QeQ4VvO8vYErxyP4Hi+WzzUUzgdcNSnnGM Jt7P+eBChkrxrl72kag== X-Proofpoint-GUID: ra1xMEaD1_pTKA6CqhUgRW9fNUn74pcm X-Proofpoint-ORIG-GUID: ra1xMEaD1_pTKA6CqhUgRW9fNUn74pcm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772222967158500 Replace the switch statement with a static lookup table. With '-d int', unlisted exception codes are now logged as "unknown" instead of "". Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-7-philmd@oss.qualcomm.com> --- target/alpha/helper.c | 55 ++++++++++++------------------------------- 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/target/alpha/helper.c b/target/alpha/helper.c index cedb0006892..84997ef3a99 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -19,6 +19,7 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" +#include "qemu/cutils.h" #include "cpu.h" #include "exec/cputlb.h" #include "exec/page-protection.h" @@ -37,47 +38,21 @@ =20 const char *alpha_exception_name(int excp) { - const char *name; + static const char * const excp_names[] =3D { + [EXCP_RESET] =3D "reset", + [EXCP_MCHK] =3D "mchk", + [EXCP_SMP_INTERRUPT] =3D "smp_interrupt", + [EXCP_CLK_INTERRUPT] =3D "clk_interrupt", + [EXCP_DEV_INTERRUPT] =3D "dev_interrupt", + [EXCP_MMFAULT] =3D "mmfault", + [EXCP_UNALIGN] =3D "unalign", + [EXCP_OPCDEC] =3D "opcdec", + [EXCP_ARITH] =3D "arith", + [EXCP_FEN] =3D "fen", + [EXCP_CALL_PAL] =3D "call_pal", + }; =20 - switch (excp) { - case EXCP_RESET: - name =3D "reset"; - break; - case EXCP_MCHK: - name =3D "mchk"; - break; - case EXCP_SMP_INTERRUPT: - name =3D "smp_interrupt"; - break; - case EXCP_CLK_INTERRUPT: - name =3D "clk_interrupt"; - break; - case EXCP_DEV_INTERRUPT: - name =3D "dev_interrupt"; - break; - case EXCP_MMFAULT: - name =3D "mmfault"; - break; - case EXCP_UNALIGN: - name =3D "unalign"; - break; - case EXCP_OPCDEC: - name =3D "opcdec"; - break; - case EXCP_ARITH: - name =3D "arith"; - break; - case EXCP_FEN: - name =3D "fen"; - break; - case EXCP_CALL_PAL: - name =3D "call_pal"; - break; - default: - name =3D ""; - break; - } - return name; + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; } =20 uint64_t cpu_alpha_load_fpcr(CPUAlphaState *env) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772246; cv=none; d=zohomail.com; s=zohoarc; b=iikqXgJvvEERQSRBUqcksMviR9HVa+UEiluWf5J4vHZ1uiFnZy7SPcfCodDaFFQ3kjgmRWlF2AFPIOHoYhlHraCBlAsW66EsfZeJR4UrvSY/vpFartQizgsyAq+i3T43pPikWElrJupMRz2Gy79M1NiK7xjQhvYY5Bts2OBadYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772246; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=T7A7ndu0bW2A0mXuIdfncOEAr5b/vu5UnG44eQfU00g=; b=kOlatd8ah0YLDBYMoZu5bnDv7/frUfB8JVcRgOfMlJRrXDRHUT3a60nSUfCiwd7hRO0rZ5uudVnZHrLQyJuNXLcmBWM6Qw88PL55v7R1UzkNAZu6MeA1iYbfFttPqIUYWNDCByDhglw4Gflr2nV+cdS7Su4baCZ8lQ6oY2WL/bA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772246201415.1512323387674; Fri, 23 Oct 2026 09:17:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwv-0000gJ-Ca; Fri, 23 Oct 2026 12:16:57 -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 1xKHwn-0008QU-28 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:49 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHwl-0002TT-4e for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:48 -0400 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG2vL03733906 for ; Fri, 23 Oct 2026 16:16:46 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgarug245-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:16:45 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f33438950so241787685a.1 for ; Fri, 23 Oct 2026 09:16:45 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3ee6d8sm772307f8f.14.2026.10.23.09.16.43 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= T7A7ndu0bW2A0mXuIdfncOEAr5b/vu5UnG44eQfU00g=; b=mcvZWyjrJ58AxpK8 sQvjKfUOwMuzDUqyRKrOL3GLB2IIVawe54D1MGrwQTfi7ceYQJqUDPkuzx4CpZZ6 oZdEoB/oxqWkLd8mGFKbEnPPah+1tF3HG4QggxnKjYHCLNgyFjJJspykGE9J8mjh fBVj4BOaxtHovdX895ghosCC00LWB7l2LnkKkfhndcGomLgHRn9bE0SjnCgHhFwj pSRxSuo1H27Axy8ILBmHkg5f9B2SUkmrpY8UgeJMYK2BSqyYw2NHUXlyXUIT+gtd fdER2T+izJcbA791Bt5f6N6aXJpelvfbWB/wbTNZHUVWgSYILdQ2Uoz/gtIBftwy JSdjPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772205; x=1793377005; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=T7A7ndu0bW2A0mXuIdfncOEAr5b/vu5UnG44eQfU00g=; b=C0O/HYJamlOXFXGGtU7THeZNkZuBwx1h/rKVUUSlkJFfimrkCrH8dAOtdM3K3+WLFt 5zotNUheNRFTGeLnjvz1yiFzuO+a0QfGj24kl6dn5X727V3M4wbhluF89EYW64h1dByG JgqRCh5jxcwTKAEOWSDFqaDqRXphjnMe/ZWj+w9YfEXqUcEHb6cNqGk8cxNrUZ8Ne/Ym nE+ti1+LfckjwlvLR6KiQhQTM+oQbYWGXTMIx1lQQRqXnM6nRtrMCYwz9zON1faMEbNx 7HewpGkJ7Twx7HfuWr0PKs7oz2xnui5mgr4gqQ8ZKzckxo7PHImnHmHSJBJTiHuRNGk9 45ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772205; x=1793377005; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=T7A7ndu0bW2A0mXuIdfncOEAr5b/vu5UnG44eQfU00g=; b=gYwn1J81+mu8IWXVCMm6/Gq7BbXjwTFOy+LQSUYaLaTXPLF+WuNEzO+uF+y3dK2z+W hPaXCZZIInvShkdcWik38PValJ3CqwUC5kGHSBucBDTC4D3VWBF/9KX2T5bu5cG0ifFs BwjZBEbO9gZTZ0Q3rWGH4ANA5Z7ifKYLKUmcuwgRLmsszUft7m0s7wwS2AQ34R1iTrZl WneGrslkFGP1GxP+i0jVrPOd4zgV35k+4uv3j09KZWKFnj4vUHB6ntLC0R+PnxLPftRS hzNUDbmhp84oruV5vKtljx1QqPuB1RGLqiCyTlrmZuNjYsI+El/TKsNiIc6isGRR5yrE UQKw== X-Gm-Message-State: AFq9FYJfzvouF9jLkzsrhlLdcv67IRPelg+5rqBcHeZvfY3Tx0eM7okf B/i/TsmGLHsVobB4GoCRGYN7T3ahtahPdULnt+4Z78fMAagu4nBEV9O1jSMi8mYLoH32GMteYBm a3GFUhrBEQziPM7PwGCG9de/w+h9V82e/k5sLw1fLpW61NOnymYL17zxolloG0L1kEbCH X-Gm-Gg: AYBFou1xs+8WBLzLz6HggN6pYuukasfBQouszvzlp3TaMAmEPnhSQmQls+E+rwC0VCR jYObZt5ypcGlJd+fjJHlGBUoLmLYaX3TtNhk2nTjSDyE+nKk8KrECAagLAULj0T9nSi5lTvi1D5 PhmJ4Mm3j23gLSkTeWzn83nf6EVAVo7DJNJURHFmoZYjzqRVffmfOv9opKL8FQsQp4c1ew6gyES CWRcNswEY973sitXEjaGaqewCryyVj1gc7nuhEL8jmYmP2vbmC7rpCyIadaTfqAb2NyCYA4Iawe r1S1rwxDTdC4c+GmqcVaS6hmZnHDAEt0ox/PAmx0Nta5qmyPwPYgOhBPG3Y0fzHC3jSw6qXLHFJ lVyf6nhmR2/OlswKOp7dg21I32Wy59Ri4V16OoWGS X-Received: by 2002:a05:620a:2688:b0:934:ab73:ac53 with SMTP id af79cd13be357-93f6f3cc32cmr501504185a.0.1792772205116; Fri, 23 Oct 2026 09:16:45 -0700 (PDT) X-Received: by 2002:a05:620a:2688:b0:934:ab73:ac53 with SMTP id af79cd13be357-93f6f3cc32cmr501497685a.0.1792772204483; Fri, 23 Oct 2026 09:16:44 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 26/83] target/arm: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:34 +0200 Message-ID: <20261023161332.60153-27-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX4Bu43RyLcBGj OFAEA3OdxlUlF2sWTKItRPRN3mhof9+eS6AEvo9JT2V/lfJ5ShpMgAl9KD3LxGvwYMRCnLJXswo bDLrFzy35omdJ8qQMVFxR6XNcKDyTR0= X-Proofpoint-GUID: jVMPkmDYt1qy9wnrM2lbEq4viRZQEi9w X-Authority-Analysis: v=2.4 cv=SK7Xx+vH c=1 sm=1 tr=0 ts=6adb886d cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=QvePOBYGvqDf6_zMoJUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: jVMPkmDYt1qy9wnrM2lbEq4viRZQEi9w X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX6PFbWVZyCVRH Ixn5i404xXq8cCp0Pi3ZqAyCTGdRAPCvJAyWvRu0fijJD2D20bjbROt0JiMBoDQrECWJuURdhzo UUj4rkFn6qkLycdN6/8qb3HyiP87FmROw7XbosAjDzO4UCvCUK2NTVBzHspziEbuMRdWoQrHm7q h0apECeh+fSkP2pj4Z5j1RggDT7MhvJyBakwMO2J5sRV56g/dmk9/ndvExaHCANcBKC10PUF+eS xkDVJKWRnAWYv6JCYjt4spEgmreW2xfZEKe0lsXKpWFWIaz9QnYvY2NEX5DWGbHR42BD46dVWzw 6xYwewwdeIZuHrOssW0PedJqHl03sUK9grjweY6yZ6uo3YPFhksnDWAIF0yVQYWIYjzE1Qfs4IS ymFtCbdWZR3dMfgdMm0AVDyhWJImTjAyE1EEI0DjVd0pKwwu+IDn1blRyw8HDcZqFvoW++ymmh0 HFBVF1wN0VYoScWt13Q== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772247496158500 Factor arm_exception_name() out of arm_log_exception() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve ARM exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-8-philmd@oss.qualcomm.com> --- target/arm/cpu.h | 4 ++- target/arm/cpu.c | 1 + target/arm/helper.c | 77 ++++++++++++++++++++++----------------------- 3 files changed, 42 insertions(+), 40 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index a0355ba9e1a..add993ef101 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -65,7 +65,9 @@ #define EXCP_VINMI 27 #define EXCP_VFNMI 28 #define EXCP_MON_TRAP 29 /* AArch32 trap to Monitor mode */ -/* NB: add new EXCP_ defines to the array in arm_log_exception() too */ +/* NB: add new EXCP_ defines to the array in arm_exception_name() too */ + +const char *arm_exception_name(int excp); =20 #define ARMV7M_EXCP_RESET 1 #define ARMV7M_EXCP_NMI 2 diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 03a0ae02ebb..510fc9eeb3b 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2645,6 +2645,7 @@ static void arm_cpu_class_init(ObjectClass *oc, const= void *data) &acc->parent_phases); =20 cc->class_by_name =3D arm_cpu_class_by_name; + cc->exception_name =3D arm_exception_name; cc->dump_state =3D arm_cpu_dump_state; cc->set_pc =3D arm_cpu_set_pc; cc->get_pc =3D arm_cpu_get_pc; diff --git a/target/arm/helper.c b/target/arm/helper.c index 7ac21108d1c..b540705e638 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -8,6 +8,7 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" +#include "qemu/cutils.h" #include "trace.h" #include "cpu.h" #include "internals.h" @@ -8841,46 +8842,8 @@ void arm_log_exception(CPUState *cs) int idx =3D cs->exception_index; =20 if (qemu_loglevel_mask(CPU_LOG_INT)) { - const char *exc =3D NULL; - static const char * const excnames[] =3D { - [EXCP_UDEF] =3D "Undefined Instruction", - [EXCP_SWI] =3D "SVC", - [EXCP_PREFETCH_ABORT] =3D "Prefetch Abort", - [EXCP_DATA_ABORT] =3D "Data Abort", - [EXCP_IRQ] =3D "IRQ", - [EXCP_FIQ] =3D "FIQ", - [EXCP_BKPT] =3D "Breakpoint", - [EXCP_EXCEPTION_EXIT] =3D "QEMU v7M exception exit", - [EXCP_KERNEL_TRAP] =3D "QEMU intercept of kernel commpage", - [EXCP_HVC] =3D "Hypervisor Call", - [EXCP_HYP_TRAP] =3D "Hypervisor Trap", - [EXCP_SMC] =3D "Secure Monitor Call", - [EXCP_VIRQ] =3D "Virtual IRQ", - [EXCP_VFIQ] =3D "Virtual FIQ", - [EXCP_SEMIHOST] =3D "Semihosting call", - [EXCP_NOCP] =3D "v7M NOCP UsageFault", - [EXCP_INVSTATE] =3D "v7M INVSTATE UsageFault", - [EXCP_STKOF] =3D "v8M STKOF UsageFault", - [EXCP_LAZYFP] =3D "v7M exception during lazy FP stacking", - [EXCP_LSERR] =3D "v8M LSERR UsageFault", - [EXCP_UNALIGNED] =3D "v7M UNALIGNED UsageFault", - [EXCP_DIVBYZERO] =3D "v7M DIVBYZERO UsageFault", - [EXCP_VSERR] =3D "Virtual SERR", - [EXCP_GPC] =3D "Granule Protection Check", - [EXCP_NMI] =3D "NMI", - [EXCP_VINMI] =3D "Virtual IRQ NMI", - [EXCP_VFNMI] =3D "Virtual FIQ NMI", - [EXCP_MON_TRAP] =3D "Monitor Trap", - }; - - if (idx >=3D 0 && idx < ARRAY_SIZE(excnames)) { - exc =3D excnames[idx]; - } - if (!exc) { - exc =3D "unknown"; - } qemu_log_mask(CPU_LOG_INT, "Taking exception %d [%s] on CPU %d\n", - idx, exc, cs->cpu_index); + idx, arm_exception_name(idx), cs->cpu_index); } } =20 @@ -9967,6 +9930,42 @@ void arm_cpu_do_interrupt(CPUState *cs) } #endif /* !CONFIG_USER_ONLY */ =20 +const char *arm_exception_name(int excp) +{ + static const char * const excnames[] =3D { + [EXCP_UDEF] =3D "Undefined Instruction", + [EXCP_SWI] =3D "SVC", + [EXCP_PREFETCH_ABORT] =3D "Prefetch Abort", + [EXCP_DATA_ABORT] =3D "Data Abort", + [EXCP_IRQ] =3D "IRQ", + [EXCP_FIQ] =3D "FIQ", + [EXCP_BKPT] =3D "Breakpoint", + [EXCP_EXCEPTION_EXIT] =3D "QEMU v7M exception exit", + [EXCP_KERNEL_TRAP] =3D "QEMU intercept of kernel commpage", + [EXCP_HVC] =3D "Hypervisor Call", + [EXCP_HYP_TRAP] =3D "Hypervisor Trap", + [EXCP_SMC] =3D "Secure Monitor Call", + [EXCP_VIRQ] =3D "Virtual IRQ", + [EXCP_VFIQ] =3D "Virtual FIQ", + [EXCP_SEMIHOST] =3D "Semihosting call", + [EXCP_NOCP] =3D "v7M NOCP UsageFault", + [EXCP_INVSTATE] =3D "v7M INVSTATE UsageFault", + [EXCP_STKOF] =3D "v8M STKOF UsageFault", + [EXCP_LAZYFP] =3D "v7M exception during lazy FP stacking", + [EXCP_LSERR] =3D "v8M LSERR UsageFault", + [EXCP_UNALIGNED] =3D "v7M UNALIGNED UsageFault", + [EXCP_DIVBYZERO] =3D "v7M DIVBYZERO UsageFault", + [EXCP_VSERR] =3D "Virtual SERR", + [EXCP_GPC] =3D "Granule Protection Check", + [EXCP_NMI] =3D "NMI", + [EXCP_VINMI] =3D "Virtual IRQ NMI", + [EXCP_VFNMI] =3D "Virtual FIQ NMI", + [EXCP_MON_TRAP] =3D "Monitor Trap", + }; + + return STR_ARRAY_ELEM_OR_NULL(excnames, excp) ?: "unknown"; +} + uint64_t arm_sctlr(CPUARMState *env, int el) { /* Only EL0 needs to be adjusted for EL1&0 or EL2&0 or EL3&0 */ --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772244; cv=none; d=zohomail.com; s=zohoarc; b=DPKBuIBC3ALv7lof9Ue+NUOqIJlGBSihMpvxzpzF1i/BAeHLqG0XXFGEvI7g3oY/4EvcE8UfZB0EiCXA+fMlnipAJLwS6E/t/fmvxefioiSI0so4jzGh735O3okhyCfAKWdSCFIq4sPQJeF75GUyh5LIgLOYmmDnuXbBOF0n+oU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772244; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=quANPD0R8cRc6wBqj0s/GIq9GVRcVT8gyf2HEgXPPYc=; b=nVdEvMBQ0V01+03Rq+7DiZsPoT4WkIec9Wm8EcirpJa4NIFPHzz72EUZqYF2sZY/w/bc1hMxNcF+qUKwt21gbaAyJIMrMR54VFnZfEYXRbjNTZMCvTW8nwS92IB2z71xQ3T+EgFBxVDtHQUrn2ZqaoNCGAYxR7EIqYCzd4AEaW0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772244684167.77773326291663; Fri, 23 Oct 2026 09:17:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHwz-0000zI-J1; Fri, 23 Oct 2026 12:17:01 -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 1xKHwt-0000dE-U3 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:56 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHws-0002Tr-A6 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:16:55 -0400 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG35Nm3734786 for ; Fri, 23 Oct 2026 16:16:53 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgarug254-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:16:53 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93caf7856ffso230747985a.3 for ; Fri, 23 Oct 2026 09:16:53 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a92a4444sm16214895e9.5.2026.10.23.09.16.50 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= quANPD0R8cRc6wBqj0s/GIq9GVRcVT8gyf2HEgXPPYc=; b=RoFOz7+7XF6wqNN5 A1e+LiVbYU5sDIvjisxlOUQA+at1ymWcWTnNDKKX69Sp1YvHZZACeayWkqAOorHG RnN+veh9qd+XmkvOAXhDqZPYXm7QYMdUy9Dnnv2YkgqxmMnpizFPWO6mZoVaQD4n Y5pNBDu7zR2u59XVNFEbPkN8OsKYUjzHqqlMP4cs7y2IcgMYc6Z/NQb/W8M8m4BD 8m1UqgceINxoixDbdIQK9Eqvcj+56H9WZogNBSFYRyxExta0r64cIxfOWEaLyzFG 1AKKu5bzg2C86GDt+d/T6sGjHYrOrf2quKM3n/TVcKuW6hAZmmYVglcwH4fjh7W6 zQcwCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772213; x=1793377013; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=quANPD0R8cRc6wBqj0s/GIq9GVRcVT8gyf2HEgXPPYc=; b=ZDGtKNWltLKrwMmjSt3I3wZtt1+MH7tNZ/TKeoSzckyAfMiimUk+b6TiZ3WZbcwttV 9EU1DVX5eurwupMPIgV/wd11j072DCiURrO5sJmhxaikZN6NlzzFwGKaTWXv/Fff0a49 UBf9Nvt9pKFHK87F4o8TnNjPKv717QPnf12ONpkwzPWCxE3mTOUSNAj0tY4P+wXbT3j0 beTCKaHeg06r2XflPY9lw/SKOZdVKeeo6pL8yd9p6hDlMhNjl8bmwtb5uKOLz9uyD5x+ 1JWiGo9a8Jq/w0lvj88tPh3jt9Yn3D+q28a+VOhymmotkoXDIJlQEcXsTXOGgM84C17R 1kqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772213; x=1793377013; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=quANPD0R8cRc6wBqj0s/GIq9GVRcVT8gyf2HEgXPPYc=; b=pMefrV9WuCP7hpDG3rVaBYFxBjrEpsgNib7yJNh3txLjyTNdEmVhoDd1VZ11MhRUZj y0sElKuYluVBYANDBURFXTU1qpG1oxtJXYWbo5+eEpUPQAFDjI5UsqLL26vAZSzqodne OZN9N61B2bPhgm4PZGaRmg0Eqhbetu5wVE+wTqNxWyYjJ+3BnaTyp2h/KwQ7R5sjxVhP asH4P/7wkQaLzg6fgmwqb1nHbsCT262wh8QRprA6QXHc3DXwweRvnQombqrlmCtZOfOe GG83j473DCHdeN98BDTlwa5L8NEDGXbpev6jW9fqBHTYOCH6vE6h0M5v5hwcUDJQ4RKq Izlg== X-Gm-Message-State: AFq9FYIIgAG39vFEhkhgqbC1I9d5TcNOdCxmTmM5mTuDuKHION/ChoyQ AcQG1D0Aojt61sH4A5FTVcQqvMDvKUdtJPWUtlgOWcNr8mymphMKHq4csDOhfvb00Q3QGG8mj9N vQHyJe9Rqycu2i7h0kBJ08Wjcdp9cGKE/zRx9EGZeIcMTw00YrKTdIwaDLM0QZel5ubSA X-Gm-Gg: AYBFou2XFtWd8JVlaLIgY128bYgjRShpi2xlMvsT9siOxKxYm3m8jTyI0+Ot0CCEB8b oUr25LEBEpme6NAqvOLeWjU+kQcHvs/VPCdPS0wgh1Y/kv/Pdknw94eEs1tjFKq+3M/XI8SK8yb Y3SI/66W6372LpBue9f2a5773NHe7xCHwzuNh03fxgqOziBOprTnEGsjkylbFQE8wPq35lhKTRW YXjZadAZtdi57ldWOdwdhQuo6+HMRy2Pec03M1oHRSiNuhvO1T6h5syzqxalMbTpKsDjY1DMbKs o8ET52F7o+ghjFD0S1XHUQrgA+hWHi2NIn48DzwxkBu/1B7y8ajieKRAZNWvsJI6SV3XAIx3J8L l0ILLXRdHr3RYDmq+/D9+oGfGExQIwhrLs90DwjWb X-Received: by 2002:a05:620a:25cf:b0:93e:fc4e:c48b with SMTP id af79cd13be357-93f6f824b19mr512747385a.61.1792772212583; Fri, 23 Oct 2026 09:16:52 -0700 (PDT) X-Received: by 2002:a05:620a:25cf:b0:93e:fc4e:c48b with SMTP id af79cd13be357-93f6f824b19mr512737385a.61.1792772211560; Fri, 23 Oct 2026 09:16:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 27/83] target/avr: Implement and register CPUClass::exception_name() Date: Fri, 23 Oct 2026 18:12:35 +0200 Message-ID: <20261023161332.60153-28-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX2BU20t/6UfOn DiZAViu9gjXhcu4zpInkTf5cJoCB/gYSUxFe7mNyv71HWxhsD2Kd3Reh3KxUBX1LCFcwWDWBvaq AYVwlqdg0rOoJWUpE+kYlLsIUWVDo7A= X-Proofpoint-GUID: Meip4afI_jjlGtvdG3-AQRPSF-fr1tPB X-Authority-Analysis: v=2.4 cv=SK7Xx+vH c=1 sm=1 tr=0 ts=6adb8875 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=RaXvhhO76RXaS7NGOBEA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: Meip4afI_jjlGtvdG3-AQRPSF-fr1tPB X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX+GFSQLsMbo4O 4odwcQ/70knIbSvoA+TtIGYyNBoMIXEqZIhl2nP5bi4J8RmckJCzCuvshNf4NjFzi+FnH5sxMzd m8LuFNoqWAFO1Us/FEFAObykhVlYl7wHnsOLxVq1AVJ0s7xuznHG+ZZmOli2/MowVVHecVMPnVu bYiuUYvRKCCy11kDsHm8+pMoWG4fTb5Ngj2962kITLnLZiLszGyVqkqVB2aJ67HdvjSLrD0AVqs PKIB6Pk3MnohQz7BdxlXlQtZrk+HMRcGVFlZnm45hGm4FV4BwO4L1Q9QQs3D7d1kEgceHeTPQxT T1JkPTJOJdyuOjMTZkobjgJH8dLhL61fBbdRBLF2ehk9ZzB1mSdi+EpNiu3+mwnwqruGoAv0m7N w7cb6lanPKi2lZTcc4zvUlEpJm64rsBm16OBWiUxCDrGsXksn8c2A9T+WwN8C0IX+GmrUB2irci 502kNhCHM4AXXEvHk7A== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772245429158500 Implement avr_exception_name() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve AVR exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-9-philmd@oss.qualcomm.com> --- target/avr/cpu.h | 2 ++ target/avr/cpu.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/target/avr/cpu.h b/target/avr/cpu.h index 1e4e839bd83..b1b5b637617 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -44,6 +44,8 @@ #define EXCP_RESET 1 #define EXCP_INT(n) (EXCP_RESET + (n) + 1) =20 +const char *avr_exception_name(int excp); + /* Number of CPU registers */ #define NUMBER_OF_CPU_REGISTERS 32 =20 diff --git a/target/avr/cpu.c b/target/avr/cpu.c index a01e6fa4751..244871e5e63 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -19,6 +19,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/cutils.h" #include "qapi/error.h" #include "qemu/qemu-print.h" #include "exec/translation-block.h" @@ -257,6 +258,21 @@ static const TCGCPUOps avr_tcg_ops =3D { .pointer_wrap =3D cpu_pointer_wrap_uint32, }; =20 +const char *avr_exception_name(int excp) +{ + static const char * const excp_names[] =3D { + [EXCP_RESET] =3D "RESET", + [EXCP_INT(0)] =3D "INT#0", + [EXCP_INT(1)] =3D "INT#1", + [EXCP_INT(2)] =3D "INT#2", + [EXCP_INT(3)] =3D "INT#3", + [EXCP_INT(4)] =3D "INT#4", + [EXCP_INT(5)] =3D "INT#5", + }; + + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; +} + static void avr_cpu_class_init(ObjectClass *oc, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); @@ -272,6 +288,7 @@ static void avr_cpu_class_init(ObjectClass *oc, const v= oid *data) &mcc->parent_phases); =20 cc->class_by_name =3D avr_cpu_class_by_name; + cc->exception_name =3D avr_exception_name; =20 cc->dump_state =3D avr_cpu_dump_state; cc->set_pc =3D avr_cpu_set_pc; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772276; cv=none; d=zohomail.com; s=zohoarc; b=l5e4V7U7fqM0YEGNYPaBZ2Iahg7dra5aMq2IHReOkqS7PE9Im0oD9KlOVw/ueCWXY+5X4KwoeV/JHhfe5GuM/xDt6lssEtKtgmTevSkiVvCRfHuUI3OIYik2T7HlbdAyQvamYKGeWN6+/9waMhpXurG4LIqc6ci4JCBnt8n6ju0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772276; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ycC2gMtcG9Wzp1/amAgDkmEAcStuQd7OBl95GDUGwqY=; b=j7SABu3MWsDP/NcOGzP5tNTSCnRfUVnwpVe1HqHLQudDwKbS57rCAim/aQ8U4+uOZejKZZag1D0Ly77O5UyylWBsuFp9FMnRzIy+aK6ZmvZqQV1OkM4kHJRV5TzeK7/m6wwf0kt6UQbZf0MMxZNsBzOuVvSG5oRifqhw+HF+LuQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772276867344.7059263463301; Fri, 23 Oct 2026 09:17:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHx8-0001Up-Dv; Fri, 23 Oct 2026 12:17:10 -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 1xKHx2-0001K6-4l for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:04 -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 1xKHwz-0002U7-Oi for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:03 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5xvx4072871 for ; Fri, 23 Oct 2026 16:17:00 GMT Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7bw0x5f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:00 +0000 (GMT) Received: by mail-ua1-f72.google.com with SMTP id a1e0cc1a2514c-9907539aff7so934765241.2 for ; Fri, 23 Oct 2026 09:17:00 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2d6d13c7dsm12633435e9.4.2026.10.23.09.16.57 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ycC2gMtcG9Wzp1/amAgDkmEAcStuQd7OBl95GDUGwqY=; b=L159TJFgQODWpfyl OXRyGDT/Ppn+8C8QxXwk9AUejiQFGsLCCDVT68uvxXr+o9QUhBy6bNSOTSyi1JOL 5JGpxWGzP/78DLKgOaQPocMF0l5OYyBPJi17pBowZO9FMKJQTMZ8l3K6DsRyMHo+ zhsWYIml0Y4XoLSnYTpR7mthW0xAnQxp78H2Jrb/7lJ5Sr6xIgU9jVd+lbm2nZXi qFNiLXeeNFUaSgAle/uUNcelJbtlw9IlOjC2mWYdfqCR3ItniXh5mQib9GTbj2ij CMeBWBF5wYHIxH4eKIXEA5Vchwv4mILTDiLk5jeTypvl+l8ZggpImGbKnypWhMdW Da2Emw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772219; x=1793377019; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ycC2gMtcG9Wzp1/amAgDkmEAcStuQd7OBl95GDUGwqY=; b=Cs4Q977lG/AVfM1eKJMuACN9lMtz/IhS4/F85cvc8JXtXXkekQVZjE127SUi2akjQb y8xKfjjc9ZbJFDlzaHU7zV/Fn80YNYQe3NuBXvZfZdlo4HqJ9064SdqFURUoUUSft4gg Kv3GOrPySlrQCZAOC0NOFpJvqAeymvcUQ7pCWRgLPTuMm5TDhnzCqhEjvFCfzi0Ytrj8 FzcRmgDbjQVaCqfvHVzJPlK7AEX3QTVsYJusTp3dfFSw7X0QWx/UkmKFDB5NJma1VdHB Gb5g5FwgXeJLiaCASHlGWIXYFmsP6S6WlSKVwu6zLyL1FmnaHVBYe2A5nZRyhXn4zA8y wlLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772219; x=1793377019; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ycC2gMtcG9Wzp1/amAgDkmEAcStuQd7OBl95GDUGwqY=; b=Rr7DCxV2zmqu0JRfkQTONlDX4SwVeMT21xQdG7msojuCQhmi8sJAbqu6LIyHhG8Obm QhgSVor05jd3UhDKH1K5s5/qhBmdtX5501/C78lrOaT51fjqo7hQnJIEW7ZFkh9eJ4jN pZkDHq1Krz+jFuI2WN2aFrX/UL7sVUnRhlx7iYrQjMvEmXyFiXIzbCSv0qNPK7TL3sGP uKgwurS8PPweg4i2aPkULhRoLLrK5BLTIZ3ad1/vz9PHj6o17jimjOdIMHCzAr9fhAiN 6yzWeaYf9v3QfvAjYwbR0TD3TFStB5badwHO+OoQiiRY5RSkoogjpXdBaOCP1jOJla1w 7AAA== X-Gm-Message-State: AFq9FYKfXsj/CAyAwkzUeuWnW+A4pobQlUwQ1ehytWq5NZcp/O8Lx2/i 9u95BMd4Tq1UmA6/RObdHUgCJbP70IDq27OfP9bzjdYIUq06iWiwF93h2nBso28Mvx8Mw68oNgT qrwFtUUCmGttfErzPVXoCItIIgrQ48/1Gp73rQsZwxsmR1aCKDFV/4OCzLDqD/cUveea9 X-Gm-Gg: AYBFou2v6O8sux3y9WRkfVX33v49CMcoE3+ZeMrWO+Fh7IoCw8NIdtpY/0URvVCLRza VUqeu2zmF4MQLk+gvWY/auMhnXGRzl8BRlu9lSCXpq4gH2BFMOqxCv1yLitZBATAQdEASfovIzO DG3eX0iGk7P7qhCFL1HtG1PvIOQv/aGw666DOBPjEEtN3imQisEIyycw9gDp6HJTL3QolmbmcCq AhGzN7TxU+4/7Owqphe/dQkwpKYRegR9vAMDdLGzY8zssWn3+1r6erRaDfioZHPqgBb+zd+act8 hZ5+SHl37vUzDAyIXt7D4+pYZ/s4O0OMkP3Smd+q6rLO0fAyjy6JfIuMMzC0tLclvQuQwHH7AS6 fIfQWkdCkDfdvAA9dY9sboSxUGqomUkb6INq4+Cek X-Received: by 2002:a05:6102:3f0c:b0:7cc:115:ddf1 with SMTP id ada2fe7eead31-7ccc32f23bdmr1102438137.23.1792772219137; Fri, 23 Oct 2026 09:16:59 -0700 (PDT) X-Received: by 2002:a05:6102:3f0c:b0:7cc:115:ddf1 with SMTP id ada2fe7eead31-7ccc32f23bdmr1102429137.23.1792772218623; Fri, 23 Oct 2026 09:16:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 28/83] target/hexagon: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:36 +0200 Message-ID: <20261023161332.60153-29-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: yCT_PGashC3YJmSoi6pdP-fjR5LJLVz- X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXwch3nYnYay8g eqLZsoUjGh2BPol8vaIjPlDD03BpFaN2H+4EHuLxb200u+IQ1ctTCFM4h7Lp9OR0g/MjsPgXYrv jKY+w5v6tmCtSSfc/wa10wTX/3/vGxo= X-Authority-Analysis: v=2.4 cv=QdTzLcbv c=1 sm=1 tr=0 ts=6adb887c cx=c_pps a=ULNsgckmlI/WJG3HAyAuOQ==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=gOtg6PG78Z4vFrgGvpEA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=1WsBpfsz9X-RYQiigVTh:22 X-Proofpoint-GUID: yCT_PGashC3YJmSoi6pdP-fjR5LJLVz- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX/KiAK3CBnLgC jrwhAkFpjiPoLQ9KunPWtFWpWXoaYG8UwGkQLsDFx4aNDGWwbtWVDvcoVwnFAr+zMbIWC8/Wui2 iy7OpIivEPhYNW74tNUejU5HI1XlJygFX5yfcyKB/+CfWchzAge1BMH0dZoa3O5LoXQ0eMJs1/s XE77+pzw76aWy9ASXNzPEnaHSOLGNCz49SXFCD7YJKOIBg72ikBlx5zFnJ+IA2rv2FDujGUDhZA S0pzuPAs8a7CBnnk7/9Q0kZo6MpWShH8jgB0W3R768tcXI9ZDauweJyuHTy/BDLVzTIQZ2SBWsZ 4OlDQxJlA7rijtC0jUljC41otCDw0ttF9/C6r2U0OrCNhR7wzSRRvH6UTaUW+vgSN2shLE7ONY5 yX5ZRBFyFwM1eMuHc1xGF/IVH2ebM1a9HaKuw43o8cXBRu69Xl9mBWpnQTdU4oshTdFepkFGfU8 0iOjmJoMcTQDhofJQJQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772278049158500 Expose the hexagon event_name[] array via a hexagon_event_name() helper and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve Hexagon exception codes to names. Make the table 'const char * const' while moving it. With '-d int', hexagon_cpu_do_interrupt() used to index event_name[] directly. Codes without an entry (table holes, or values past its end) are now logged as "unknown", instead of passing NULL to "%s" or reading past the array. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Brian Cain Message-ID: <20261022215115.19680-10-philmd@oss.qualcomm.com> --- target/hexagon/cpu_bits.h | 2 ++ target/hexagon/cpu.c | 35 +++++++++++++++++++++++++++++++++++ target/hexagon/hexswi.c | 30 +----------------------------- 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/target/hexagon/cpu_bits.h b/target/hexagon/cpu_bits.h index a8fba4aa188..7d1bdfcbc71 100644 --- a/target/hexagon/cpu_bits.h +++ b/target/hexagon/cpu_bits.h @@ -61,6 +61,8 @@ enum hex_event { HEX_EVENT_INTF =3D 0x1f, }; =20 +const char *hexagon_event_name(int event); + enum hex_cause { HEX_CAUSE_NONE =3D -1, HEX_CAUSE_RESET =3D 0x000, diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 304031e97f0..8df63e43260 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qemu/qemu-print.h" +#include "qemu/cutils.h" #include "cpu.h" #include "internal.h" #include "exec/cputlb.h" @@ -318,6 +319,39 @@ void hexagon_debug(CPUHexagonState *env) hexagon_dump(env, stdout, CPU_DUMP_FPU); } =20 +const char *hexagon_event_name(int event) +{ + static const char * const event_name[] =3D { + [HEX_EVENT_RESET] =3D "HEX_EVENT_RESET", + [HEX_EVENT_IMPRECISE] =3D "HEX_EVENT_IMPRECISE", + [HEX_EVENT_PRECISE] =3D "HEX_EVENT_PRECISE", + [HEX_EVENT_TLB_MISS_X] =3D "HEX_EVENT_TLB_MISS_X", + [HEX_EVENT_TLB_MISS_RW] =3D "HEX_EVENT_TLB_MISS_RW", + [HEX_EVENT_TRAP0] =3D "HEX_EVENT_TRAP0", + [HEX_EVENT_TRAP1] =3D "HEX_EVENT_TRAP1", + [HEX_EVENT_FPTRAP] =3D "HEX_EVENT_FPTRAP", + [HEX_EVENT_DEBUG] =3D "HEX_EVENT_DEBUG", + [HEX_EVENT_INT0] =3D "HEX_EVENT_INT0", + [HEX_EVENT_INT1] =3D "HEX_EVENT_INT1", + [HEX_EVENT_INT2] =3D "HEX_EVENT_INT2", + [HEX_EVENT_INT3] =3D "HEX_EVENT_INT3", + [HEX_EVENT_INT4] =3D "HEX_EVENT_INT4", + [HEX_EVENT_INT5] =3D "HEX_EVENT_INT5", + [HEX_EVENT_INT6] =3D "HEX_EVENT_INT6", + [HEX_EVENT_INT7] =3D "HEX_EVENT_INT7", + [HEX_EVENT_INT8] =3D "HEX_EVENT_INT8", + [HEX_EVENT_INT9] =3D "HEX_EVENT_INT9", + [HEX_EVENT_INTA] =3D "HEX_EVENT_INTA", + [HEX_EVENT_INTB] =3D "HEX_EVENT_INTB", + [HEX_EVENT_INTC] =3D "HEX_EVENT_INTC", + [HEX_EVENT_INTD] =3D "HEX_EVENT_INTD", + [HEX_EVENT_INTE] =3D "HEX_EVENT_INTE", + [HEX_EVENT_INTF] =3D "HEX_EVENT_INTF", + }; + + return STR_ARRAY_ELEM_OR_NULL(event_name, event) ?: "unknown"; +} + static void hexagon_cpu_set_pc(CPUState *cs, vaddr value) { cpu_env(cs)->gpr[HEX_REG_PC] =3D value; @@ -840,6 +874,7 @@ static void hexagon_cpu_class_init(ObjectClass *c, cons= t void *data) &mcc->parent_phases); =20 cc->class_by_name =3D hexagon_cpu_class_by_name; + cc->exception_name =3D hexagon_event_name; cc->dump_state =3D hexagon_dump_state; cc->set_pc =3D hexagon_cpu_set_pc; cc->get_pc =3D hexagon_cpu_get_pc; diff --git a/target/hexagon/hexswi.c b/target/hexagon/hexswi.c index e7362b56650..19439658392 100644 --- a/target/hexagon/hexswi.c +++ b/target/hexagon/hexswi.c @@ -735,34 +735,6 @@ static void set_addresses(CPUHexagonState *env, uint32= _t pc_offset, env->gpr[HEX_REG_PC] =3D evb | (exception_index << 2); } =20 -static const char *event_name[] =3D { - [HEX_EVENT_RESET] =3D "HEX_EVENT_RESET", - [HEX_EVENT_IMPRECISE] =3D "HEX_EVENT_IMPRECISE", - [HEX_EVENT_PRECISE] =3D "HEX_EVENT_PRECISE", - [HEX_EVENT_TLB_MISS_X] =3D "HEX_EVENT_TLB_MISS_X", - [HEX_EVENT_TLB_MISS_RW] =3D "HEX_EVENT_TLB_MISS_RW", - [HEX_EVENT_TRAP0] =3D "HEX_EVENT_TRAP0", - [HEX_EVENT_TRAP1] =3D "HEX_EVENT_TRAP1", - [HEX_EVENT_FPTRAP] =3D "HEX_EVENT_FPTRAP", - [HEX_EVENT_DEBUG] =3D "HEX_EVENT_DEBUG", - [HEX_EVENT_INT0] =3D "HEX_EVENT_INT0", - [HEX_EVENT_INT1] =3D "HEX_EVENT_INT1", - [HEX_EVENT_INT2] =3D "HEX_EVENT_INT2", - [HEX_EVENT_INT3] =3D "HEX_EVENT_INT3", - [HEX_EVENT_INT4] =3D "HEX_EVENT_INT4", - [HEX_EVENT_INT5] =3D "HEX_EVENT_INT5", - [HEX_EVENT_INT6] =3D "HEX_EVENT_INT6", - [HEX_EVENT_INT7] =3D "HEX_EVENT_INT7", - [HEX_EVENT_INT8] =3D "HEX_EVENT_INT8", - [HEX_EVENT_INT9] =3D "HEX_EVENT_INT9", - [HEX_EVENT_INTA] =3D "HEX_EVENT_INTA", - [HEX_EVENT_INTB] =3D "HEX_EVENT_INTB", - [HEX_EVENT_INTC] =3D "HEX_EVENT_INTC", - [HEX_EVENT_INTD] =3D "HEX_EVENT_INTD", - [HEX_EVENT_INTE] =3D "HEX_EVENT_INTE", - [HEX_EVENT_INTF] =3D "HEX_EVENT_INTF" -}; - void hexagon_cpu_do_interrupt(CPUState *cs) =20 { @@ -775,7 +747,7 @@ void hexagon_cpu_do_interrupt(CPUState *cs) qemu_log_mask(CPU_LOG_INT, "\t%s: event 0x%02x:%s, cause 0x%" PRIx32 "(%" PRIu32 ")= \n", __func__, (unsigned)cs->exception_index, - event_name[cs->exception_index], env->cause_code, + hexagon_event_name(cs->exception_index), env->cause_code, env->cause_code); =20 env->llsc_addr =3D ~0; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772244; cv=none; d=zohomail.com; s=zohoarc; b=IGHP4w0A1wXAT4hojdlLw4kjxrEwuF/SWnwvSEdqiXd85gtzhn0PDOeFF/8iKm86dFXx06NBELv0MGIodWJFZFJr7lqcZ0/rJU0OuMnzZCH4co+PZOzahHm3YWiWAEObMOXFJvSckHQNLYdZrNO2r7lIDWmXk2AOmKSP1nzcxbE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772244; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=HRrwXimDJD9w+GXxIMplwRZTr+lzMUXBvxyjmeWHINE=; b=np0DpujSbceDLRvrnQDtpGsmzQO8bnbSKIhIR21czfPSOsVDMASADsZuagSD2EhB4ZwRZLQqSKp8pzfMoD90OI0X+X4z3knDtU1e8V//Frn7UxVtbWbu30Bdc93Y6z2rLrNR3489Ad6PcDFBCWrcFUMhVY2NXo6+UjfNxqDs2bM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772244677666.118220819191; Fri, 23 Oct 2026 09:17:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHxD-0001ob-CE; Fri, 23 Oct 2026 12:17:15 -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 1xKHx7-0001aX-VI for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:10 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHx5-0002UT-Vq for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:09 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6NKF3000254 for ; Fri, 23 Oct 2026 16:17:07 GMT Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7cn0vxu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:07 +0000 (GMT) Received: by mail-vs1-f69.google.com with SMTP id ada2fe7eead31-7c02e1df088so244207137.3 for ; Fri, 23 Oct 2026 09:17:06 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29cdc74b7sm24467105e9.14.2026.10.23.09.17.04 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= HRrwXimDJD9w+GXxIMplwRZTr+lzMUXBvxyjmeWHINE=; b=ZlRkQsYvYprgCZsP MpXD18HELCrb8/C8KsL2/OPpa7OEzIfUAk5iUelBayG7/Q4B1JcraHSG+T/mbR2i ycu+ioXwHwbmJb5JbfRwQOMYGhZ0txyK9zGt6tgT9sXG5shSECQSnxmuq75se0si Yio8UsKFXHwVWMbBoHAgY+CmWI23MNnktUjf1M6Fhk7Fu4n+uc05goSH7yOSwfVg 5w8jU7oXjlHqcWNAdNoSwNCflyplGKLG74r4Fg/UuKfnUfPjgBYROuwaKXx84cD6 Bedn5exb59OrisSHEeX4llxsF1CnJ1mTl2y7lsJj9ooFUi+JopJ2lwqkEFYU11Zu 4UXTkA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772226; x=1793377026; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=HRrwXimDJD9w+GXxIMplwRZTr+lzMUXBvxyjmeWHINE=; b=iP6cLiDIX4a0FaEZHLksGv+5UG0M7j2Isn6OhWriyNN9ff1H6bQ1ZdPod6YOTVbTBL vgr8rliyZgbYI90MtlT5mt3sRH8s/FKoK+QbQaCgpNlo+Dn7FnOMsYRm2DbFPTZUdqlw i92DXgh/r9rOTZB+jk/wyqUQFyuE/Ks8FmBMNt/AqPvu5Z1+urayVCNjoeNZbW/B4o3t Jml08fmQ5TmjcAevtdLVkZTSNxEkac3ryOa5U6hB/cyDr9GPB/M+MHRHNOuPgukTdBex 2SCAo52eDYCl3l1ypWYapBNzykqiEZnyCWzUkofNkNPbjCvqoJRgeU0LGE7d8r1UcNW6 ihFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772226; x=1793377026; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=HRrwXimDJD9w+GXxIMplwRZTr+lzMUXBvxyjmeWHINE=; b=KcJnmlVmZfBeOnpw0N4kzVA/nngwnaYAzL5xb62kDZR1md26GIohUj5RArsUZpHeKy fRRl+8MCCONsUu1nIcD0kcOmFdGMph/x8NCuCOL+tP55sRkXZcIQivPkgBspkZFE4vv/ UjyR0my7SObqDmCYT38C6nVeyIef//WfuKFNOekFrLVYQ+4d+O5L8F1VnJRE506VNcDa 8SoYJXFvFQoJhC0zZJnqUghTW37HRBYD1l4ZAHoHb4kM/8YuSfDGWUOXkcsaPSSLMuyl W401V0349yJO81qwmIjRvB16GOtRaCHvqx1N+CMnue2X/7LbdabK8gETHM5kM5m0L2WX 677A== X-Gm-Message-State: AFq9FYIpZ/Nmw1J2hI7u1AnJ3gbqMvy26X3U/zeMIqChWCeaA57B/mba gQ1asBXGkkT4Nd1ebWo0ss7s8mqj46icn+ZTSZpfi45od+dA0uE5uH04WMt6KOXHyO/jbRkuQnz OLie96bVwfiiMSRa3yyxfWrXCCK/3ghD7tSSMjjb8Q/mY31Yw5RzLrW5sLJ8Ubs3v7jAs X-Gm-Gg: AYBFou3f4GOVx8apnR8ISW6tncmos8O1EKK2YZ6+sFOxdkGAs8CBAg0rRkuwkkIlcye oKkrZkNYc4kP/X2PkpFzuM05R8B0bMxd3cDOuN1Ub7AoBOi4GmJWF8wzZQurOAEfeV3ovdipjkF pMXmZD7894uawzzZILpm+QOMNN0GHC5qr343BUizRpY5qdpR7Pl3oxX5XULJlM33tM+xyS4naWq zbj1Ji9JDClKmLpcGY13r41RTi6MNtFnWgermmvhg03Dzy4RAhNG3G0Nh5+TO5hi6Ypt2xYKgxf wV4D8rEbF7fO0neiappQ3QVrnbndM7LYdxgZNKGiolzAvZq6ZhuelHBy5c1+Krah/Eg8AjYMXy+ qtrGgLqw9ae4yOik80dbEUibsBROOOk7x5Yj7diqa X-Received: by 2002:a05:6102:548a:b0:7c2:5692:1917 with SMTP id ada2fe7eead31-7ccc32f3378mr958776137.10.1792772226125; Fri, 23 Oct 2026 09:17:06 -0700 (PDT) X-Received: by 2002:a05:6102:548a:b0:7c2:5692:1917 with SMTP id ada2fe7eead31-7ccc32f3378mr958767137.10.1792772225573; Fri, 23 Oct 2026 09:17:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 29/83] target/hppa: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:37 +0200 Message-ID: <20261023161332.60153-30-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX6y9MO9t9Q3ZO sbGmL25IhNxcbVh9nHOfFAJGxnqIZto7M0u/TB7dDLT57yIXr75wWJ3aBl0xBDbHoXAJDnQVnao gI7GOunLF4VpH74C5p+ttA4VMx1PC0MRFq+lWWkok3MCxYVn5BXfQ2gD4wWIk6sLouiSrRHDxfN dD2AZhCj6wtUnB7aceye8oY/lsl4C2l9gQ31PGbSF5yA6wucLlJ9G1EzbvPAJuQdHI3rnsaLc8i KkRTI/IZTYPm9MFrLowB5+cwF63UuUhTqSMm2aqgklZs39hXIy1vnNBPWygnFTsKk4wUbre5JvB lfgRGueIEaL+TLT1OWArcgNcclkHlEhUhs4pQKsUo27+cC/nYxhhQbOilV4jMrIqcFe1+uwe8+M O10QX0nMM6d5gNG3ZXeHr+MvYrxQG/C/iC591C3CFmk975hx6Rc4mYEqM60224pY9vQMEmY7WY4 BYl/YQ/qZV56mXYBRog== X-Proofpoint-GUID: 6S3LI9wEmLY5BDW0e9KWMIUtfVt0hVBe X-Authority-Analysis: v=2.4 cv=a9mlZkSF c=1 sm=1 tr=0 ts=6adb8883 cx=c_pps a=5HAIKLe1ejAbszaTRHs9Ug==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=sCbknPHGl6sa5x2yAD0A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=gYDTvv6II1OnSo0itH1n:22 X-Proofpoint-ORIG-GUID: 6S3LI9wEmLY5BDW0e9KWMIUtfVt0hVBe X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXzoc8cxvp26tV dv31KF/z1Zj2LXlcEe7Sxdtooi7CZa70tRs7eQhvLyTjcxfh1epjLWpq0PbLhF0l3Sb289wVn5E hH6oeN89r3fze5EYlHdNChaz1r3wE7Y= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772245500158500 Factor hppa_exception_name() out of hppa_cpu_do_interrupt() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve HPPA exception codes to names. With '-d int', hppa_cpu_do_interrupt() now logs "INT: cpu N excp I (NAME)", NAME being "unknown" for unlisted codes, instead of "INT: cpu N NAME" or "INT: cpu N unknown I". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-11-philmd@oss.qualcomm.com> --- target/hppa/cpu.h | 2 ++ target/hppa/cpu.c | 42 +++++++++++++++++++++++++++++++++++ target/hppa/int_helper.c | 48 +++------------------------------------- 3 files changed, 47 insertions(+), 45 deletions(-) diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index f453444d7f9..3914b3285c5 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -98,6 +98,8 @@ /* Emulated hardware TOC button */ #define EXCP_TOC 32 /* TOC =3D Transfer of control (NMI) */ =20 +const char *hppa_exception_name(int excp); + #define CPU_INTERRUPT_NMI CPU_INTERRUPT_TGT_EXT_3 /* TOC */ =20 /* Taken from Linux kernel: arch/parisc/include/asm/psw.h */ diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 7b1309a7c38..dbf86941cf0 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -20,6 +20,7 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/cutils.h" #include "qemu/qemu-print.h" #include "qemu/timer.h" #include "cpu.h" @@ -290,6 +291,46 @@ static void hppa_cpu_class_base_init(ObjectClass *oc, = const void *data) g_assert(acc->def->phys_addr_bits <=3D 54); } =20 +const char *hppa_exception_name(int excp) +{ + static const char * const excp_names[] =3D { + [EXCP_HPMC] =3D "high priority machine check", + [EXCP_POWER_FAIL] =3D "power fail interrupt", + [EXCP_RC] =3D "recovery counter trap", + [EXCP_EXT_INTERRUPT] =3D "external interrupt", + [EXCP_LPMC] =3D "low priority machine check", + [EXCP_ITLB_MISS] =3D "instruction tlb miss fault", + [EXCP_IMP] =3D "instruction memory protection trap", + [EXCP_ILL] =3D "illegal instruction trap", + [EXCP_BREAK] =3D "break instruction trap", + [EXCP_PRIV_OPR] =3D "privileged operation trap", + [EXCP_PRIV_REG] =3D "privileged register trap", + [EXCP_OVERFLOW] =3D "overflow trap", + [EXCP_COND] =3D "conditional trap", + [EXCP_ASSIST] =3D "assist exception trap", + [EXCP_DTLB_MISS] =3D "data tlb miss fault", + [EXCP_NA_ITLB_MISS] =3D "non-access instruction tlb miss", + [EXCP_NA_DTLB_MISS] =3D "non-access data tlb miss", + [EXCP_DMP] =3D "data memory protection trap", + [EXCP_DMB] =3D "data memory break trap", + [EXCP_TLB_DIRTY] =3D "tlb dirty bit trap", + [EXCP_PAGE_REF] =3D "page reference trap", + [EXCP_ASSIST_EMU] =3D "assist emulation trap", + [EXCP_HPT] =3D "high-privilege transfer trap", + [EXCP_LPT] =3D "low-privilege transfer trap", + [EXCP_TB] =3D "taken branch trap", + [EXCP_DMAR] =3D "data memory access rights trap", + [EXCP_DMPI] =3D "data memory protection id trap", + [EXCP_UNALIGN] =3D "unaligned data reference trap", + [EXCP_PER_INTERRUPT] =3D "performance monitor interrupt", + [EXCP_SYSCALL] =3D "syscall", + [EXCP_SYSCALL_LWS] =3D "syscall-lws", + [EXCP_TOC] =3D "TOC (transfer of control)", + }; + + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; +} + static void hppa_cpu_class_init(ObjectClass *oc, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); @@ -304,6 +345,7 @@ static void hppa_cpu_class_init(ObjectClass *oc, const = void *data) &acc->parent_phases); =20 cc->class_by_name =3D hppa_cpu_class_by_name; + cc->exception_name =3D hppa_exception_name; cc->dump_state =3D hppa_cpu_dump_state; cc->set_pc =3D hppa_cpu_set_pc; cc->get_pc =3D hppa_cpu_get_pc; diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c index 3e87b9a0011..598d1c6cefe 100644 --- a/target/hppa/int_helper.c +++ b/target/hppa/int_helper.c @@ -235,53 +235,11 @@ void hppa_cpu_do_interrupt(CPUState *cs) } =20 if (qemu_loglevel_mask(CPU_LOG_INT)) { - static const char * const names[] =3D { - [EXCP_HPMC] =3D "high priority machine check", - [EXCP_POWER_FAIL] =3D "power fail interrupt", - [EXCP_RC] =3D "recovery counter trap", - [EXCP_EXT_INTERRUPT] =3D "external interrupt", - [EXCP_LPMC] =3D "low priority machine check", - [EXCP_ITLB_MISS] =3D "instruction tlb miss fault", - [EXCP_IMP] =3D "instruction memory protection trap", - [EXCP_ILL] =3D "illegal instruction trap", - [EXCP_BREAK] =3D "break instruction trap", - [EXCP_PRIV_OPR] =3D "privileged operation trap", - [EXCP_PRIV_REG] =3D "privileged register trap", - [EXCP_OVERFLOW] =3D "overflow trap", - [EXCP_COND] =3D "conditional trap", - [EXCP_ASSIST] =3D "assist exception trap", - [EXCP_DTLB_MISS] =3D "data tlb miss fault", - [EXCP_NA_ITLB_MISS] =3D "non-access instruction tlb miss", - [EXCP_NA_DTLB_MISS] =3D "non-access data tlb miss", - [EXCP_DMP] =3D "data memory protection trap", - [EXCP_DMB] =3D "data memory break trap", - [EXCP_TLB_DIRTY] =3D "tlb dirty bit trap", - [EXCP_PAGE_REF] =3D "page reference trap", - [EXCP_ASSIST_EMU] =3D "assist emulation trap", - [EXCP_HPT] =3D "high-privilege transfer trap", - [EXCP_LPT] =3D "low-privilege transfer trap", - [EXCP_TB] =3D "taken branch trap", - [EXCP_DMAR] =3D "data memory access rights trap", - [EXCP_DMPI] =3D "data memory protection id trap", - [EXCP_UNALIGN] =3D "unaligned data reference trap", - [EXCP_PER_INTERRUPT] =3D "performance monitor interrupt", - [EXCP_SYSCALL] =3D "syscall", - [EXCP_SYSCALL_LWS] =3D "syscall-lws", - [EXCP_TOC] =3D "TOC (transfer of control)", - }; - FILE *logfile =3D qemu_log_trylock(); if (logfile) { - const char *name =3D NULL; - - if (i >=3D 0 && i < ARRAY_SIZE(names)) { - name =3D names[i]; - } - if (name) { - fprintf(logfile, "INT: cpu %d %s\n", cs->cpu_index, name); - } else { - fprintf(logfile, "INT: cpu %d unknown %d\n", cs->cpu_index= , i); - } + const char *name =3D hppa_exception_name(i); + fprintf(logfile, "INT: cpu %d excp %d (%s)\n", + cs->cpu_index, i, name); hppa_cpu_dump_state(cs, logfile, 0); qemu_log_unlock(logfile); } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772273; cv=none; d=zohomail.com; s=zohoarc; b=CN8bRHw1zBrS2E3IQ1UPeXbaQY8rbm1DBxH8RN4WSCkdF/qzWaFUdPen3BaeZoRmMyHNX3SOipgVr+PL0wj/b+5O4PR5igSE5D+JY5Eofl+SHw64zoA3XymIT1VO304im93VlIHLUpA2tHNqaTC5ZjlR8xvnt+McCwjarrZIzyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772273; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=/DzPOd/H5c/Ybsy5o/5Eq1KiAxTkSsTARgtitZYLfcc=; b=esYOvFNquCEtqxmjb2/Mc9bGtP5mCWjK+UzSFFJaDBbHqYlgrcZjoEq+pqRT8MwUYaeOdBDcsgSDiYeVyZO3oE+wSeD2a16Reo82gFbIjLx+n76UjSYfjBXcuf5zjiDoOMw7VZSjT6qTmWoAga/6oVaQ6Ozq+M/FMURHsnylNDM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179277227393934.77091863617704; Fri, 23 Oct 2026 09:17:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHxJ-00028u-Fc; Fri, 23 Oct 2026 12:17:22 -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 1xKHxE-0001x1-NF for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:17 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHxD-0002Ut-0Y for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:16 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6Bx02215798 for ; Fri, 23 Oct 2026 16:17:14 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc81d2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:13 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93ecdc701a2so142874785a.3 for ; Fri, 23 Oct 2026 09:17:13 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a30763dd2fsm7376765e9.1.2026.10.23.09.17.11 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= /DzPOd/H5c/Ybsy5o/5Eq1KiAxTkSsTARgtitZYLfcc=; b=BeA612WUYURJqY3Y H80EJzHNXmrrd1JKg3RlPiW4z7W68O5Rhv+ctvWKWFYGKXmd8jC51/WKJrpn0MND tAyfFTbWepsH4q80vsQgVwqZ9yOq2fDit3iJURDXG3IuNeYHo/tu4VHC3nAlTeSF ADBFkO8YbQHslPlP/qUBkoDi27eYiWn2pRFPT362ehU+nbYSHNVhYFRnFMEvbI7h stSE2SkFTx/tGFx9mSI7weI9PF+J177GTI4Sr17YwAVg8THbWo12nQUwQ6+0S2vM tmRqbltZZjupnGyLgfctcwaXYHaRtU/gurtGIcXzciv0lQMiJf38bk1/BF81O+79 VEVjWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772233; x=1793377033; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/DzPOd/H5c/Ybsy5o/5Eq1KiAxTkSsTARgtitZYLfcc=; b=SVXdKqgq6fTB1txysw+B6cCGrCmk/jJrynG+ZYNvLaIrAn2E4iDvjhH8dXrC4Bk8nW pzKvfQlzTmEwAkmQd9xp/bB/JN8cd5Je86KGFnwZMtnFy0UxPZiOuicPu/V6f/F1vNLD scVM78zRYjO/BQyOmZPTKd651F+qNCWQR5/yjmB+T3jnQxP+EdIlynWGS5HAdNzXg0fv Z2nXnYVuxohgUq0tzJGpW3KozTC4MJ3Mg/dXdZoOLyp6hnjSo2ZYctfS7UY9mX0nULJK j99U5lYEB8+R4kbmLo5HLhWs4Qge6OVmgK6XGiFvtZ9NvdnEnKBWQaiV863s5rvegqTi Pjgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772233; x=1793377033; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/DzPOd/H5c/Ybsy5o/5Eq1KiAxTkSsTARgtitZYLfcc=; b=UTm070sfu7KCgeNhnJ5aNoeif2rAuhovTbkV6X3ngzkI8yjH4nvcf0MgT7UUanGTg9 TVCr0jj5/ZnIUow63ITdamjTuigzZ48gOk67PXjAuFOKGfhbnFgMdHJMVQASs5Ccwjkc CWkOLGz62rA7AEc1Bxu0ccO0iL1mbQ4H4vUHphxq1jtH78lkcAcNCgWfFjBb3zUmvAza Ug/OuU48rl61ypznhpAG2pgqAPULPDFLe6xVkj4V2kK+WMc/rNipXbZsqElXvXfR+7A6 u5WefPsXgrwYmkZD1Y6IemK6SLoU+qf4Oe3rWnWChvANuZ3pon29gpl7a6uldgDWqWi0 kalg== X-Gm-Message-State: AFq9FYINl6z4NGiyqg1CKb+ftmtpJVnGDrjKjQWgHHsKUJ8jG0hde5D4 4ZLukJuTgKIUise6z3+bICLHqtr9GW8gycteHgGAUB0HvZ/pd4fDjFv4nHwejawhWNAKkrxm84+ m9wOm4InxNtDTAz3g24YeGF9z5uEpm1jHh34EHBhXSzIN50scjgoXbjyDMkOo1rm274My X-Gm-Gg: AYBFou1gA7TUieFUshdsqxc6TdV7xWTh8w00WfdS9nEzSihv88uS2e7RpNijwAIK2YG NPBEBffQkA3GYgc8A7Rj6zxFIQmuPE14IqUuMyWM2AO2a+nKmiu6z76dSlPjiEdAbPrkmi5gpCe hDfCIV3wiY+MpH5BbKVhOSJMmgioBpAXTlpvTdP2ja5gkk71hKSDTSGercN2tLg7F2H97CcfDu1 bYVKiDk/GIITk8GEjjTudUmY9mv1n+y4F0To32ISUFrgA30rxnj4G5GpotNy/CPdQCX5HWjyPQ+ 80X6O4jNtZJiJLQohNcf1igrTmDpVevL71sVzup05DiCX/3A5rQ2sTlnf1EcF/wePtiumppK7lG p1krlBwQIbUNA7cMfK2JbXaADNvjzcD1XqAo/D3JE X-Received: by 2002:a05:620a:3703:b0:93f:232f:658c with SMTP id af79cd13be357-93f6f9ed47fmr488648485a.71.1792772233153; Fri, 23 Oct 2026 09:17:13 -0700 (PDT) X-Received: by 2002:a05:620a:3703:b0:93f:232f:658c with SMTP id af79cd13be357-93f6f9ed47fmr488643685a.71.1792772232600; Fri, 23 Oct 2026 09:17:12 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 30/83] target/i386: Replace magic value by proper EXCP0E_PAGE definition Date: Fri, 23 Oct 2026 18:12:38 +0200 Message-ID: <20261023161332.60153-31-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX44mgnYx/FGD5 UileL1n3PquaWCjVu4JA+TJ4Vl4dAAnhQI8kvjVKiwmBYULR+f9AXwfin1pAoqt6K5aYrENZlz4 gsFfn/8CahuvwULUnJCWtTq9LfkQ8jenIX2ejGHAJaPTrtDd6G6QaPKGTD19O/LnNOu1H2kIPcv mQtiFGh9TxrfJgpdaky6AJQkXtBZeamdgEfoZ3tgBCMdfRHSTZI3FXWmWrk6E6E6Y0OoNGa+drU sAN8iAcjDre6E9xknBgT8Fu+Js3hqmZfPQSXKiVGyOrJ/LnmIkKgZK+Va3kYZfzAq4oOZQUMZ7v N2Of4wo5CiH9DTaWafIGkqTgjjbTZbeUngBWivj8WEE8auVLqtoLywWZxR8WzXQPpOMt5XCNSZ1 zPCysCOecIZAxoAFWVu60T9QiTu9ZeNdNr3NnvHHb6S5zmmYGUehmgixwTECpAU+kIvFtfg70p2 1WQWYhHQahm+G2CzNcg== X-Proofpoint-GUID: DG3QFEEfD2VXyAhl3FB0lSUyUbld6-4- X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb8889 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=Kwhbg8pJGtqcix1HUGwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: DG3QFEEfD2VXyAhl3FB0lSUyUbld6-4- X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX6gU5Oyw7qFva FR8zK2NyGoQCWE5k5Yj51UsXi0095/0ej8g00Cu7diCAAMZjVhCQixGkZHNpusl//KvwIxTrbzv eowYDenqPlGt2qizMBhnOWthgfKeJ6Y= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772275934158500 No functional change: EXCP0E_PAGE is the 0x0e page-fault vector. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-12-philmd@oss.qualcomm.com> --- target/i386/tcg/seg_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c index cad19f9ca6b..c89d97e022b 100644 --- a/target/i386/tcg/seg_helper.c +++ b/target/i386/tcg/seg_helper.c @@ -1215,7 +1215,7 @@ void do_interrupt_all(X86CPU *cpu, int intno, int is_= int, env->segs[R_CS].selector, env->eip, (int)env->segs[R_CS].base + env->eip, env->segs[R_SS].selector, env->regs[R_ESP]); - if (intno =3D=3D 0x0e) { + if (intno =3D=3D EXCP0E_PAGE) { qemu_log(" CR2=3D" TARGET_FMT_lx, env->cr[2]); } else { qemu_log(" env->regs[R_EAX]=3D" TARGET_FMT_lx, env->regs[R= _EAX]); --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772272; cv=none; d=zohomail.com; s=zohoarc; b=AL6GagrF8ywRn537IShZf5rfN4QIpLHrQG7AkckSWOiiX4XHdDXz4ITrXwgqFAOYr45PFloKpePUK7pfr0+mBkDiNDzpfp8d8OdHew3OhSngK2duKKF9LG7BUYH6lN9Eo/nGApAHE7tHiSOlHCUTACpf0cRkf/RfDYz9ugLWrwc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772272; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=IfoKac7+X6HFzNtpeSY6wixaiOq9cgwLiWAR7KmvaDc=; b=cz/i4BV0r+bupvwROw1fn0yXjkWIirCFHqmkKoyTV+4sOJ54TVGbu2UfB/Bn3sXTr9GB4z31OF2z4c+BbzkWlGHEQxr7vsefyXYIWF61T/V15KRZgiKcO8jCHD8tPpB3VIuDYAqTFkMVOoKihNi/rRXy1/XWHL6s7eji+uVnlPM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179277227280547.51924881665036; Fri, 23 Oct 2026 09:17:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHxc-00032O-Vi; Fri, 23 Oct 2026 12:17:41 -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 1xKHxN-0002lg-IZ for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:30 -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 1xKHxL-0002VT-79 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:25 -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 69NE5vmm4063370 for ; Fri, 23 Oct 2026 16:17:21 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrcgtm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:21 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93cb7f9bb86so197600985a.2 for ; Fri, 23 Oct 2026 09:17:21 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a9062ce5sm18271655e9.1.2026.10.23.09.17.18 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= IfoKac7+X6HFzNtpeSY6wixaiOq9cgwLiWAR7KmvaDc=; b=G7QV7Azh7UucjP7N GV6KjpkGblQn//NYPjyLOd/nP7ImzIoVnQfm37Mf9qwiX0EY8T3GBVHwv44dSEUT RXhXCNzYN5BB9xbRzbJZ5GdP0SiCD1SKyNX+Htv+lkLJXAEG2POofNe3tiDexxsL fe6FmlmPF2QsQ3iSYvTO0Ye4KmrQ6PQbsxR2wKxO5981T9wyb4ac1HU5XLyPYqcG GhXFQ1xRlhjzMXN5MedkHu9Jz1cGM6+yPWd/5oa3ikL7aL+Ir/3q4wYMEMS9Hzkx faNvHaAgXpgmTnAQ/RHAruUVBc9Hhuq8Rdkk5dxhd1FnG//snDyCNa39ds5cez9Y yrd6HQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772240; x=1793377040; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=IfoKac7+X6HFzNtpeSY6wixaiOq9cgwLiWAR7KmvaDc=; b=g9G05m6T2ci/haVpAlGFZHouE2XuPLYCOlVQfOQjwrKsbM2h67L1ledy13nBBH1IPn O+GNlCzocLheX/+AHMoXkkrZhO0PvZ4+fN3bpSiBeAAAZNGpecnjMtcRKHcet9Rq7VoM NX2qO4SOj6LlUf1SZkGrdEvcA18gi5fHk3BIhCuIW7y/ILxce/GJcbaHiOXDIhl6lAQ/ pXo4k5ou453QhJIysvTsZcTetaE0crEdHevn+Qjkug5myQM4PE3wYQbN0d+9qP/Z2axT xu8YbwnRCbvoYOoaqQMDr8jWhUir9rLL73tCvHcY7BvEXpOtBXJrBMLFIGP9g62EzFXl MMwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772240; x=1793377040; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=IfoKac7+X6HFzNtpeSY6wixaiOq9cgwLiWAR7KmvaDc=; b=FWKPg6JlVEVYGrB0N8Ur1Ls1USiI3bO6fSobA2ElU2cN5E23SPj0Wh2dcNKvRtAu9P UbTbyDa0JMFpRu/0nRcYo9ZLcxWlGTjYc9Soz9llihi5aAAzzqjngEhcE7Asldgt6M3t kLoiX4cOdPwuDl7vuvEH8+6K3B2Hzod4TAnPw1zJoAtrqdqfV10ZRpQ0rsS0z/6eUVOz v7QjqYO0qWjhn0R9RHP/+ToPB9Pgn8iXUpS0hSy4OzBskqDc0JE6K72sYU/El9WHesQD ZYuhTWHUWnrkUEUcvHSIAQtqmhk2B9M2eS+e/IZXlP29ZNCu9aHLgyclvYl4eqdh0ZAp nhWg== X-Gm-Message-State: AFq9FYLuYs+mOVKbkYemQoOAy1P5GTJ1zznrtds0SGEAOxFf3DC0CAah cswXd/UhwycGYYqPoGahGubOQ58Ll2sGnAKJ9CwJR+DQyg0EJjbwg5zz01yeeM1TeTqSpXRXd9G zekZ8o+1XGKEMGBJm9IG80XKGTprT5qOxEJioDO1GE6xsCXTvYMlj/+veA8wvdWRWwOnp X-Gm-Gg: AYBFou0hgbZawrZQYRsDQ5JBX3/NydOgyu+dMrdRwMiVbJCe4clMvEHniVS6Jh3O/VC VXzZ8KJ6b3sh453XG0a+iedpVVuJe2d49dTN0mTd7TbIvaJ8q5OVXgLVnV7PEXoAcBXs4xwk4gl A4LUG55xCSZGAFmPYH3gqXyWEas3mmSTi44w13Bem7L7VexgZ8l0rUQWHITeFvozbrGSt0S0oZ/ 4v0ws/Sv/IzPpzKia/gHEBLRhL8FzdNDb7nL24kty32WL+ZUftvuK6Sxiv72eCg4JlaShYS2D/C g90BJOuYz3WVpfhXMmpVaTZJUZkMVeJfNH6K8q4zQWPJ8M5PlKP1hsE/av5ED8W1HF4aWz4WzIg tT5lEfmdQVeu9wIc4Vhy6lxt28G9HpVhC0XOjRFNW X-Received: by 2002:a05:620a:280d:b0:93f:53d1:54c7 with SMTP id af79cd13be357-93f6f8249ddmr521968285a.70.1792772240400; Fri, 23 Oct 2026 09:17:20 -0700 (PDT) X-Received: by 2002:a05:620a:280d:b0:93f:53d1:54c7 with SMTP id af79cd13be357-93f6f8249ddmr521962685a.70.1792772239751; Fri, 23 Oct 2026 09:17:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 31/83] target/i386: Implement and register CPUClass::exception_name() Date: Fri, 23 Oct 2026 18:12:39 +0200 Message-ID: <20261023161332.60153-32-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 5leX6oUfhcaA-jxwXDamZv5LpMun6YtE X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX1okencmrg6kw AWpXFwlWESxpFQ4QGtGw34+BFMw9fMDtgX854JXThLIujJ7IHky+mSvVk4Xur//7XivA0dZ2hlR ssqJIkBW2RYjXkxewa1Q9KZlRriHsOw= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb8891 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=Fd9WCTdBRaK1f7vQhjgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXyV1g4UnG8sMb GXGJV1ns81ieUojjo3HwXHqzbVHBeQIcAPdy6dcZ7lvDKrD6ZbRIhl24uGA+Np8tXke0GWF187A AtuZjp5GbSjMu7vpoVlQYF8vrsg2qeDc/Li89pGQxR+Tjv8+nTIhr30nN4iwMcd0SusexiPtZ8T zMn+/lBT4IWTVF4sWBUbT4AbYjmy5zzJUWnzKifpEW6pIycCIoj5NoT7n8/adbAD3GQP0C8V1cz M/kCacrD2bjXTCGlOeeGz8jQwtXqUrSHNKC6AF8vEU5LPi9zeqk205L07HSaNpmjCXAFJmCfhJy LXjmVj4yKRPCSG77v1T3sJFghFVHFjDhYRLwZGoWZab0A9G/NKRQDpaQ4scMpuM6fADCG+0vVei YKawLA1S1oeXL/AvDKgxaBGaZQ2mcAxzVbCmZYlPYbyPXzPueheaC9DcHcyGwg0y8eDnxGui2mt 8zjfnPLqO1/SWdnJpdQ== X-Proofpoint-ORIG-GUID: 5leX6oUfhcaA-jxwXDamZv5LpMun6YtE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772273948158500 Implement x86_exception_name() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve X86 exception codes to names. Use the new helper in check_exception() and do_interrupt_all(). With '-d int', both now print a name in parentheses after the vector number. do_interrupt_all() labels hardware interrupts "IRQ" and software INT n with n >=3D 0x20 "INT", instead of looking them up. check_exception() shows "none" when no exception is pending (old_exception =3D=3D -1). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-13-philmd@oss.qualcomm.com> --- target/i386/cpu.h | 2 ++ target/i386/cpu.c | 30 ++++++++++++++++++++++++++++++ target/i386/tcg/excp_helper.c | 7 +++++-- target/i386/tcg/seg_helper.c | 9 +++++++-- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index e7a88074c07..3945e90371b 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1517,6 +1517,8 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *c= pu, FeatureWord w); #define EXCP_SYSCALL 0x101 /* only for user emulation */ #define EXCP_VSYSCALL 0x102 /* only for user emulation */ =20 +const char *x86_exception_name(int excp); + /* i386-specific interrupt pending bits. */ #define CPU_INTERRUPT_POLL CPU_INTERRUPT_TGT_EXT_1 #define CPU_INTERRUPT_SMI CPU_INTERRUPT_TGT_EXT_2 diff --git a/target/i386/cpu.c b/target/i386/cpu.c index dd9cd7c5625..e65eca0459a 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -9372,6 +9372,35 @@ static bool cpuid_has_xsave_feature(CPUX86State *env= , const ExtSaveArea *esa) return false; } =20 +const char *x86_exception_name(int excp) +{ + static const char * const excp_names[] =3D { + [EXCP00_DIVZ] =3D "DIV#0", + [EXCP01_DB] =3D "DB", + [EXCP02_NMI] =3D "NMI", + [EXCP03_INT3] =3D "INT3", + [EXCP04_INTO] =3D "INTO", + [EXCP05_BOUND] =3D "BOUND", + [EXCP06_ILLOP] =3D "ILLOP", + [EXCP07_PREX] =3D "PREX", + [EXCP08_DBLE] =3D "DBLE", + [EXCP09_XERR] =3D "XERR", + [EXCP0A_TSS] =3D "TSS", + [EXCP0B_NOSEG] =3D "NOSEG", + [EXCP0C_STACK] =3D "STACK", + [EXCP0D_GPF] =3D "GPF", + [EXCP0E_PAGE] =3D "PAGE", + [EXCP10_COPR] =3D "COPR", + [EXCP11_ALGN] =3D "ALGN", + [EXCP12_MCHK] =3D "MCHK", + [EXCP_VMEXIT] =3D "VMEXIT", + [EXCP_SYSCALL] =3D "SYSCALL", + [EXCP_VSYSCALL] =3D "VSYSCALL", + }; + + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; +} + static void x86_cpu_reset_hold(Object *obj, ResetType type) { CPUState *cs =3D CPU(obj); @@ -10948,6 +10977,7 @@ static void x86_cpu_common_class_init(ObjectClass *= oc, const void *data) cc->reset_dump_flags =3D CPU_DUMP_FPU | CPU_DUMP_CCOP; =20 cc->class_by_name =3D x86_cpu_class_by_name; + cc->exception_name =3D x86_exception_name; cc->list_cpus =3D x86_cpu_list; cc->parse_features =3D x86_cpu_parse_featurestr; cc->dump_state =3D x86_cpu_dump_state; diff --git a/target/i386/tcg/excp_helper.c b/target/i386/tcg/excp_helper.c index d6410d6fc11..f1b9b188ecd 100644 --- a/target/i386/tcg/excp_helper.c +++ b/target/i386/tcg/excp_helper.c @@ -56,8 +56,11 @@ static int check_exception(CPUX86State *env, int intno, = int *error_code, int second_contributory =3D intno =3D=3D 0 || (intno >=3D 10 && intno <=3D 13); =20 - qemu_log_mask(CPU_LOG_INT, "check_exception old: 0x%x new 0x%x\n", - env->old_exception, intno); + qemu_log_mask(CPU_LOG_INT, "check_exception old: 0x%x (%s) new 0x%x (%= s)\n", + env->old_exception, + env->old_exception =3D=3D -1 ? "none" + : x86_exception_name(env->old_exception), + intno, x86_exception_name(intno)); =20 #if !defined(CONFIG_USER_ONLY) if (env->old_exception =3D=3D EXCP08_DBLE) { diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c index c89d97e022b..d75ee54f9e8 100644 --- a/target/i386/tcg/seg_helper.c +++ b/target/i386/tcg/seg_helper.c @@ -1207,10 +1207,15 @@ void do_interrupt_all(X86CPU *cpu, int intno, int i= s_int, if (qemu_loglevel_mask(CPU_LOG_INT)) { if ((env->cr[0] & CR0_PE_MASK)) { static int count; + const char *name =3D is_hw ? "IRQ" + : is_int && intno >=3D 0x20 ? "INT" + : x86_exception_name(intno); =20 - qemu_log("%6d: v=3D%02x e=3D%04x i=3D%d cpl=3D%d IP=3D%04x:" T= ARGET_FMT_lx + qemu_log("%6d: v=3D%02x (%s) e=3D%04x i=3D%d" + " cpl=3D%d IP=3D%04x:" TARGET_FMT_lx " pc=3D" TARGET_FMT_lx " SP=3D%04x:" TARGET_FMT_lx, - count, intno, error_code, is_int, + count, intno, name, + error_code, is_int, env->hflags & HF_CPL_MASK, env->segs[R_CS].selector, env->eip, (int)env->segs[R_CS].base + env->eip, --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772277; cv=none; d=zohomail.com; s=zohoarc; b=eV4UQCYhiSDXI7l+dcVXyIGbTx7FBnv2oy5WbL9o6/4ZImkgXXW+Ed5e5ik4CQ6jTjsLi2FpkgbPOoyqKM6OIczcaCeVqD9Td/+tVIcDOt5qyPSGWCcuHHuw1W4epHg2+t+yWopg7spl8dWN/0k3uLCDCZVkU+pJF2Tt2UUQY3k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772277; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=epFgZpDurF8jjpl8AheXX0iforQDPUNhZmhrBqPhW4k=; b=G5dwEOcITa8LZFw97mtzoFvvzocLGbKt+DOb6pwna/yjsopeXRtsBCTEdrV52Mp9Ucp8aru4+ZhJ4XnZAosjSgKrqDUHgeAk8vM1m/n28Hgur6Aat+d01OYjABAjzrETjYno8CK1iZzZQgPZFNdIBttNTEVF4MWvXwrNRZ2pZOA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772277133439.1179155544893; Fri, 23 Oct 2026 09:17:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHxf-00036L-KM; Fri, 23 Oct 2026 12:17:43 -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 1xKHxW-00030G-6T for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:34 -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 1xKHxU-0002Vr-0A for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:33 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6uhf1492398 for ; Fri, 23 Oct 2026 16:17:29 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauya8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:29 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f32050e72so341505585a.1 for ; Fri, 23 Oct 2026 09:17:29 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2b066685dsm14624435e9.15.2026.10.23.09.17.26 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= epFgZpDurF8jjpl8AheXX0iforQDPUNhZmhrBqPhW4k=; b=GUfTKpTSGljdR4xe ImbH3w0jZ1WCjKLyi7c8ZlGPUfGw58l9Yx7xNYDuFfMdnviIX1YLSwnhpOgB0nWS 6EcqmF8ZzJ6kF5cecJcIZzZViQGjXLO9pB30p/N+6f/JFIT1i7WSd4s6pmw4kdIm /TiEmlCR+PmPdiU7P9SczuxNSPOdlZ4p/XQVxe19KTqGMBgN8o9l4QZzkVkWcZJ/ Mo7m79HDCPOWVq3WQ8rjomUgb74h7ZkdwxEyqD8zqCsLHJ0lVJUs6J0Fh78LVJd8 hB1mz34nvimcuxewMHVzd4yf3uNyYhdrzqR74ZgMKqImuTAMNAc384nj8NasnQp9 F73/iQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772248; x=1793377048; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=epFgZpDurF8jjpl8AheXX0iforQDPUNhZmhrBqPhW4k=; b=hSnBzTbvChH3iiwNNDoJJZqZvCA13HNUfoGlQF0nP13uV1ayThXHUpBvzKCft5tZYe c0DigufnTi2E22ywp4vPBFIRQcSl+2SROMdQfaDMe5IOqrRwErJx18Qh9QhJ5tYeJnOL vwqk325EC8NOH3UhqeQiyax1iPS+if1cwuCFqyXyWWffSkrHD4kf8XCBYK2UT2Mwg+hG nJyx3+e3sbM0WtDUYYph8cP3G1L6Qaula2l3kgqMA+2KgBZYL4OWLpsWztGBFgCJ+9Ql mjrwYJUXyxrWudMCnmNR5oOF5yDfdOcfILIRPgC9fapL3Y+E9JkdNzCSf6N2lkOOeNoY FmkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772248; x=1793377048; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=epFgZpDurF8jjpl8AheXX0iforQDPUNhZmhrBqPhW4k=; b=nEpi279FrossBehdqlK8y4UxDrXrUsdAsg+MOGCrInE3pTBTVxvfSejYGOzGPS7cRI fA7+v1sYhCuyNOAH2YOnVjKYMMrRa8IG8sl6w2RCDx4clJewyjESE/k8bxHN88Q4XcMV 3/jpavF1ekNEZpGm9ZpbdZutb6FnIBenquqSFP6uRBdfVe9l/h6EaOExUNf/gvcnH5TD 0JQ8BBAfkp0hN2uPSUzBzEPeNrjCsPDWYxg3iT4tftnUVQORSSEF7tBB3GJuwytUycMS lbdgeGIDjQ16snt73ypTgd0L0AEBFtV/3n85/Xo44Oxd6bODcpJT56Vux+2MxChizhUC UrRQ== X-Gm-Message-State: AFq9FYKW5cgoTBkpNYBnQLi5Wp4VJfFoNYvOVMK7ZOV45NQMwQH0zQXJ z1Aj96XpDHyTJ0OViF/Lpd40KJYnKn27J7+N6Fs3ZjdWkoTO8M9ZHj9booFU8dHwLwmhbjX+rFH d43FjpPBbbsgcBeXuhbPz82vpmTwEY0zlVVy07lnyuOwwyNbhhY+M5v0nPgY8InNGkb19 X-Gm-Gg: AYBFou2kEHoqCAhQvi1V3OdVCjJZqbUz/Il8I7m+njwQqiVeywkEy97jmP20yEi9VJS XWB4neRiPUV/EupSVkPBLSD7THvJasmoVx4hG9+VWmFl9cAqhFGNGYQhyizni2DT45C2xFjAb9U fDtnqurx4Kd0ETSn/RlFSwHLd8/GvPPiQdiXxfSWeCKO440hnkdpTLfzoDaWE+zMD3Pv//B1q/F 22uDj4yOiMWaCUPO2QCsdiOC6nQA2XfCNPa+7G5oPnh6zhfsCSGcbYbCHfHgqg8Ry/R0kcnACH0 XEfrnVjvRARWelPAu3sK8cXiwCy8QtyiRBWJX8omelKywkl0BSZo9k9+I/GThkfoIPZqcedpafn 5MIYRzcsarXvWJ/sKjLg2dXnzl0GWPeyHgIAycS7H X-Received: by 2002:a05:620a:608e:b0:93e:53fd:4139 with SMTP id af79cd13be357-93f6f79ca36mr476027885a.9.1792772248213; Fri, 23 Oct 2026 09:17:28 -0700 (PDT) X-Received: by 2002:a05:620a:608e:b0:93e:53fd:4139 with SMTP id af79cd13be357-93f6f79ca36mr476022985a.9.1792772247607; Fri, 23 Oct 2026 09:17:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 32/83] target/loongarch: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:40 +0200 Message-ID: <20261023161332.60153-33-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb8899 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=VSQHGHcfQv50bvChvJ4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX9acUVG9cOn5n fUqe8tyWf/xdqjhLSlxfLZSB0m2koARh3IeaL5z1ZN7QWhFK+qi/b0bjhkgw1ldUqiyrrqO15q+ q4bnQCl3FmFqETZBrvfv79PmXmtiv8s= X-Proofpoint-GUID: o1LDEX6fXIUcgoSCtwJ0QabdfGjgxvWY X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX36E9qppmsJ3U dJ1gO4eNpZ8cBxZLYRYvMxG9i4gQ0TwIoc8KuVWtOWCC39ln3AKu9yzh91v715pFdSOt0ajL8eQ Zww2+XVfqJSqO2of7eCzg12n7EQU7uYGw5Eq+iNxDoSAJgDIKYLffjBJapsLrW/4iG55JMjb8jc 7XSdo7Fj+wemHGhUpkms9A9Me0R/4N7sP2nzRDZXE89xouy/arvt1MRgv3vuiZMmir4je3hlPBI Hws5v4/vUvPaVqxeoQjgZX3MqE6kxvdphWJu/fvP87lMDn2gDKuPlMeb4P0KIfmPO3rE1LYjuG6 yQKyIJXr3jcQ19EXZDv11LeH4l4UoR4LbkLIwnOjUwznyD3e6U1U3I4HT4DI6eCnBUrvdhs5JA8 L6N2bp3on2Irfkjgj+Gu3xUhg6D/Ds8NBLRwAOXLRrpZuA2pcYJ5ahI37hptSOfIhlcWOLox3uz REhwgOsJP3rZYZaz/2Q== X-Proofpoint-ORIG-GUID: o1LDEX6fXIUcgoSCtwJ0QabdfGjgxvWY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772278017158500 Move loongarch_exception_name() out of tcg_cpu.c and expose the prototype so non-TCG code path can access it. Register it as the CPUClass::exception_name() handler, so the common exception logging can resolve LoongArch exception codes to names. With '-d int', unlisted codes are now logged as "unknown" instead of "Unknown". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Bibo Mao Message-ID: <20261022215115.19680-14-philmd@oss.qualcomm.com> --- target/loongarch/internals.h | 2 ++ target/loongarch/cpu.c | 38 +++++++++++++++++++++++++++++++ target/loongarch/tcg/tcg_cpu.c | 41 ---------------------------------- 3 files changed, 40 insertions(+), 41 deletions(-) diff --git a/target/loongarch/internals.h b/target/loongarch/internals.h index 9d064d1948b..bc32bba7f75 100644 --- a/target/loongarch/internals.h +++ b/target/loongarch/internals.h @@ -41,6 +41,8 @@ void cpu_loongarch_set_timer_config(CPUTimerState *timer,= uint64_t value); bool cpu_loongarch_hw_interrupts_pending(CPULoongArchState *env); #endif /* !CONFIG_USER_ONLY */ =20 +const char *loongarch_exception_name(int exception); + uint64_t read_fcc(CPULoongArchState *env); void write_fcc(CPULoongArchState *env, uint64_t val); =20 diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index a95fdfc2b62..9579f4db2a1 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -835,6 +835,43 @@ static void loongarch_cpu_dump_state(CPUState *cs, FIL= E *f, int flags) } } =20 +static const struct { + int32_t exccode; + const char * const name; +} excp_names[] =3D { + {EXCCODE_INT, "Interrupt"}, + {EXCCODE_PIL, "Page invalid exception for load"}, + {EXCCODE_PIS, "Page invalid exception for store"}, + {EXCCODE_PIF, "Page invalid exception for fetch"}, + {EXCCODE_PME, "Page modified exception"}, + {EXCCODE_PNR, "Page Not Readable exception"}, + {EXCCODE_PNX, "Page Not Executable exception"}, + {EXCCODE_PPI, "Page Privilege error"}, + {EXCCODE_ADEF, "Address error for instruction fetch"}, + {EXCCODE_ADEM, "Address error for Memory access"}, + {EXCCODE_SYS, "Syscall"}, + {EXCCODE_BRK, "Break"}, + {EXCCODE_INE, "Instruction Non-Existent"}, + {EXCCODE_IPE, "Instruction privilege error"}, + {EXCCODE_FPD, "Floating Point Disabled"}, + {EXCCODE_FPE, "Floating Point Exception"}, + {EXCCODE_DBP, "Debug breakpoint"}, + {EXCCODE_BCE, "Bound Check Exception"}, + {EXCCODE_SXD, "128 bit vector instructions Disable exception"}, + {EXCCODE_ASXD, "256 bit vector instructions Disable exception"}, + {EXCP_HLT, "EXCP_HLT"}, +}; + +const char *loongarch_exception_name(int exception) +{ + for (size_t i =3D 0; i < ARRAY_SIZE(excp_names); i++) { + if (excp_names[i].exccode =3D=3D exception) { + return excp_names[i].name; + } + } + return "unknown"; +} + #ifndef CONFIG_USER_ONLY #include "hw/core/sysemu-cpu-ops.h" =20 @@ -877,6 +914,7 @@ static void loongarch_cpu_class_init(ObjectClass *c, co= nst void *data) &lacc->parent_phases); =20 cc->class_by_name =3D loongarch_cpu_class_by_name; + cc->exception_name =3D loongarch_exception_name; cc->dump_state =3D loongarch_cpu_dump_state; cc->set_pc =3D loongarch_cpu_set_pc; cc->get_pc =3D loongarch_cpu_get_pc; diff --git a/target/loongarch/tcg/tcg_cpu.c b/target/loongarch/tcg/tcg_cpu.c index 7ea2a1eb933..cbf0e12c81a 100644 --- a/target/loongarch/tcg/tcg_cpu.c +++ b/target/loongarch/tcg/tcg_cpu.c @@ -18,47 +18,6 @@ #include "tcg_loongarch.h" #include "internals.h" =20 -struct TypeExcp { - int32_t exccode; - const char * const name; -}; - -static const struct TypeExcp excp_names[] =3D { - {EXCCODE_INT, "Interrupt"}, - {EXCCODE_PIL, "Page invalid exception for load"}, - {EXCCODE_PIS, "Page invalid exception for store"}, - {EXCCODE_PIF, "Page invalid exception for fetch"}, - {EXCCODE_PME, "Page modified exception"}, - {EXCCODE_PNR, "Page Not Readable exception"}, - {EXCCODE_PNX, "Page Not Executable exception"}, - {EXCCODE_PPI, "Page Privilege error"}, - {EXCCODE_ADEF, "Address error for instruction fetch"}, - {EXCCODE_ADEM, "Address error for Memory access"}, - {EXCCODE_SYS, "Syscall"}, - {EXCCODE_BRK, "Break"}, - {EXCCODE_INE, "Instruction Non-Existent"}, - {EXCCODE_IPE, "Instruction privilege error"}, - {EXCCODE_FPD, "Floating Point Disabled"}, - {EXCCODE_FPE, "Floating Point Exception"}, - {EXCCODE_DBP, "Debug breakpoint"}, - {EXCCODE_BCE, "Bound Check Exception"}, - {EXCCODE_SXD, "128 bit vector instructions Disable exception"}, - {EXCCODE_ASXD, "256 bit vector instructions Disable exception"}, - {EXCP_HLT, "EXCP_HLT"}, -}; - -static const char *loongarch_exception_name(int32_t exception) -{ - int i; - - for (i =3D 0; i < ARRAY_SIZE(excp_names); i++) { - if (excp_names[i].exccode =3D=3D exception) { - return excp_names[i].name; - } - } - return "Unknown"; -} - void G_NORETURN do_raise_exception(CPULoongArchState *env, uint32_t exception, uintptr_t pc) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772277; cv=none; d=zohomail.com; s=zohoarc; b=HDOPxcOwD13LUQ3JySZGDUHyWYxmwwJJteSWkz37Z4l6GuncekNTr+PJUl2wLsX4CLp52bQ302p+4m29zt4d46GTEeeC7VrN1BzM+FHcvK7PjeHCRdMDddhly/r3ioqgsfp7AyZPa9s3kX6QzAxm9AtjGPGYXk5Qvym3jHJ7JuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772277; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=oc6Gc8gHZXH8iigAQnOMEl8h3XTo1QGeE6XNfXubUfE=; b=J3ZZEGAUXg81Q9joIlXZ8rVhksVEFQrkoD3NyzeoCWV1rmWEH9Dk+mrn2GmFCMgCAS6RaOCLbWHUlpUcSo0AO7/RIAXZrm0m3Gd0+0iBJfVf3cdEgiKO5NOidj/Go2qsg1LHMBnrTaY3l9e+kk1zEyQSrNDVQGNRjvQ0lNzL7yA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772277683396.7923795249251; Fri, 23 Oct 2026 09:17:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHxj-0003D4-2v; Fri, 23 Oct 2026 12:17:47 -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 1xKHxc-00032s-UA for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:41 -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 1xKHxa-0002WW-Po for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:40 -0400 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5xdK2109275 for ; Fri, 23 Oct 2026 16:17:36 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqms4gke-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:36 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f26dd2165so354856985a.3 for ; Fri, 23 Oct 2026 09:17:36 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3fa012sm774095f8f.23.2026.10.23.09.17.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= oc6Gc8gHZXH8iigAQnOMEl8h3XTo1QGeE6XNfXubUfE=; b=Nq+iPB/nR7241wy7 33fHsc3zghm0YiZvE6gJpApyzdcGcRni/fPlJgt1I7sg8HCpuWDdiSuZp6NLKSnd ND6z7znq9Xqv8gVEx26ZXd9I3+R93+LaVLGY2SxfbxpvH0+5VjQPRhSacJcW67zA Ojq6sJGSoluQKHJek/NPNk/nBnsUKlXyu5PZj9EKRrFW4migKK0COzsTRTmFiHtr TEuKPNhUwKINvVH7GVyAo6wrlm20LQxieKDZ/N19XYnApp/cvHv0beqXj5hbyWAi 5yab9bHXSlZfJpALj2RLsAfWNnJehwuKQHhnGLFigX0l48fv4Ze6MCu71PcAfRci ffWfmQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772255; x=1793377055; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=oc6Gc8gHZXH8iigAQnOMEl8h3XTo1QGeE6XNfXubUfE=; b=NmKXn3j/z8JT2W7dSJY0Cl/bpOrQ4rYRGpy4ffLFJ8l7yl6+d4e4OmucJotJFaNpF8 +swKUzCff+PiL+jcBGUhCrNraMgU16XsZPUIsL2+L0MUNP4gLEWAzNWQFxk734V17H4t LiCTgitviHeDXuiNlSnEkcnI2VThPlbk5Lsfnscx0VEiVkPtmYtVGwRSyiZhTHoo3zKP 2cahBk2oKxMMSE+QzTX+zMYTfIPcs2R2AW9jHMcX1ipeJdBiJwtBL/sHxmlnTUOgNTt0 IXLjs1aDUFIMMiRCaqIiTlkDjwuhRZMbqq1fEM8wk8Ll4LIpQNrj00bMlt/nuV2tx3Me d7Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772255; x=1793377055; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=oc6Gc8gHZXH8iigAQnOMEl8h3XTo1QGeE6XNfXubUfE=; b=wxP38HqJh5XTc2iTrL6PyeMQjXFRZ7ux7Vi0y7KIjwQYcKkw05IdtYxXwOCjBL+Fpw 17pkArXkaUBcernYTqvqL+HUyDVcik1wYeErbxhrzKiXDFFN/l3W52EHA84yf3MT6nIi Ivl+rqxDk9Hy1wePO3k7A6DZQpzoovpoM/EzHDOotObM5jVZ1pQ7uLgy0hQTAg1/OdY8 v3WgA1uoUluJbQtcGxh3yi0TRY3Asy/GhT1BqImJJiO9vfeEvRK/XqBWY7R9WcPZQBss x5UNda8YNaUIutQjKVuQtlCdwnmK8o2zYGSVRbramHyKcqRsDG993ZVlFYM52HHD+Rm6 inoA== X-Gm-Message-State: AFq9FYIvGjIMn6KN1zUu3o8wfTET5k666ui4GI72kIx7eVW/TersiY+K XvjwW8bz3kme7Vve9Htn+T/iEXShtzbFIJxWMBR78dwFhKG+WzRON3GNrZqYbDGd2EsuMq+GIX7 XBNdH9Lm5krO7DnVuNKUQeDXqakMoc7jTIGKkWUVwt6uQZd5XGSIlvVoL1Lol43WA0FhD X-Gm-Gg: AYBFou1dY7VuPkCe75CJu76sVSDxLkpwH9zQG4aJkpCs4fVgAkByVh5pnMhpO9KalWr otvKFcuVp/h0NbpujU4auBbV69K80F0oskftskd6On1p1tQWzLwlMH3Ne49jB0bhockWR3aB9kI sCF6PT4S5ySDajZs5GeJ8KCFk+uFYp4AB9uGEQ8ZdQSGraNdzK+mrM7GPjZMDnfirY6sQTQygpK pj+LEUznZa+cU0FIHiFHvaRp5r5yAjSULRwyZs5Ye4w9HgSgRb0CecIoVJXyo7c+UO70XBPvFOq tbCyoXRaNfahpVkdhoYSKgr62xMtNbs63TJ6v+XRuLqqkihB9zVbbIRaUhYIz2v1cM6r09C6lJq fuk0Ts5+JPTMQjV+LvuuoNEy1gE8BhH/1e61NMeOe X-Received: by 2002:a05:620a:6009:b0:93c:b721:b10d with SMTP id af79cd13be357-93f6f79df64mr466317885a.8.1792772255168; Fri, 23 Oct 2026 09:17:35 -0700 (PDT) X-Received: by 2002:a05:620a:6009:b0:93c:b721:b10d with SMTP id af79cd13be357-93f6f79df64mr466312985a.8.1792772254540; Fri, 23 Oct 2026 09:17:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 33/83] target/m68k: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:41 +0200 Message-ID: <20261023161332.60153-34-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXz0XnTaGlxfPW pHJ77iAVqnBG2me4r9fcFtFVQ8+bi2DBBMuWmls0qZOyQPYgFsDtfEqd8dcUXDxhM2YD63EDMT+ F8L3nx5sUok25S+KUkyaSavGKnS8b46uQQpgqnfhKRN+dQseOvUaSvI13iWBHtiY++LwSpzILmC 3l0j1CNDpxurRr8hkJoYQrFnWX7kqscL0dIvto4zRlvwOCD7yEFg20zOLOhzx5oeWNMH186GAUP zj+v0edixtRh35JolJA3//SO2LgnWlSj+51f/dfDULp5rG+ark6R9ew6kucb2BWHCFqSNiYaI52 LIMnltMHAMd95+hWzUlGwfqFLuiCn9+kvCRY29VHFZRvEAN6gk9mO7RNwi2ObzyYzsBfZXSAOVD NYBLRVpJLsOsoywjUxYSqNWnAkF2A30T+SrJFRosmkEV53An2WFLe3cfS9KPsrNCqjGUggrKCSQ jzdpaGTEOTsniVEy9oA== X-Proofpoint-GUID: TpzAezFiYEJ_8cVz9tqQa0WmGVi2VIO7 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX67GUYiey/AaQ jU0YQbgsqHQVgiH7cjaMye0s9ot/t9kvbpn6iM7P9GjOw5f0YdHiLSbgXBvlx+gPQh3UwS+sNak jYOSt9GKt2tHaBZk1BUo85UaMywuCrc= X-Authority-Analysis: v=2.4 cv=UdbE26SN c=1 sm=1 tr=0 ts=6adb88a0 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=KgwFk9o9-AijF0zHnMMA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: TpzAezFiYEJ_8cVz9tqQa0WmGVi2VIO7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772277973158500 Expose m68k_exception_name() prototype and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve M68k exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-15-philmd@oss.qualcomm.com> --- target/m68k/cpu.h | 2 ++ target/m68k/cpu.c | 1 + target/m68k/op_helper.c | 8 ++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 7cf3791108c..44b4afc41c6 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -69,6 +69,8 @@ #define EXCP_RTE 0x100 #define EXCP_SEMIHOSTING 0x101 =20 +const char *m68k_exception_name(int excp); + #define M68K_DTTR0 0 #define M68K_DTTR1 1 #define M68K_ITTR0 2 diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index c7771cbf643..01c6b6afb1f 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -729,6 +729,7 @@ static void m68k_cpu_class_init(ObjectClass *c, const v= oid *data) &mcc->parent_phases); =20 cc->class_by_name =3D m68k_cpu_class_by_name; + cc->exception_name =3D m68k_exception_name; cc->dump_state =3D m68k_cpu_dump_state; cc->set_pc =3D m68k_cpu_set_pc; cc->get_pc =3D m68k_cpu_get_pc; diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 38f7a689814..c600f83ddbf 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -80,9 +80,11 @@ throwaway: cpu_m68k_set_sr(env, sr); } =20 -static const char *m68k_exception_name(int index) +#endif /* !CONFIG_USER_ONLY */ + +const char *m68k_exception_name(int excp) { - switch (index) { + switch (excp) { case EXCP_ACCESS: return "Access Fault"; case EXCP_ADDRESS: @@ -185,6 +187,8 @@ static const char *m68k_exception_name(int index) return "Unassigned"; } =20 +#ifndef CONFIG_USER_ONLY + static void do_plugin_vcpu_interrupt_cb(CPUState *cs, uint64_t from) { switch (cs->exception_index) { --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772344; cv=none; d=zohomail.com; s=zohoarc; b=PiBB7S90Kjc7RdoylVTZutEruS8e8bL2OGdlHInbrGS0cQFzh5+wza/Zziqq2uxWEADHwva577mt/22KZWY1M0iU0INc5sepjPcJmKGooODa9ega6uDT+BDjObO/DEVfZPygZ3zoocnIukeRpSoR8JOwLUSzk1VBpAlT29O+3dk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772344; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=lg2VdeYIGJVJrhK5sQ+Y2lqv6jQurQ4Am9+SyZxywyg=; b=FHHGkfTe0fOf/ZanUugb1JnxspWC77r1L5u52WPM3AbcXSXsChco6FyYwZCy831ZfmxBm9vBfNw9RO2UBF9Kz8KgMm6zyd+QaGppauc5KpGNXaTC/haK4z0ryJfZlmQ4Gw29zTKWcK47fuKIPfrDUBTuDedWHAaCZDAiLwQ+5Hk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772344158447.9483668922488; Fri, 23 Oct 2026 09:19:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHxn-0003Zi-2Q; Fri, 23 Oct 2026 12:17:51 -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 1xKHxh-0003GL-QC for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:46 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHxf-0002Xj-Qd for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:45 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6CZi2215814 for ; Fri, 23 Oct 2026 16:17:43 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc81eu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:42 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93caf7856ffso230932585a.3 for ; Fri, 23 Oct 2026 09:17:42 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d42f4c6sm697150f8f.59.2026.10.23.09.17.40 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= lg2VdeYIGJVJrhK5sQ+Y2lqv6jQurQ4Am9+SyZxywyg=; b=dqpv8BZw9aB0RM3a ku4trE7DJ5L0ThR4cxBrSBcSFOoG7HoYxhJF8gkhyTd9Fx406AyLeRWtfMBA1e90 RbTpbxO1nA3Lpgo4mgoECO9PcghnD831qtklbTDk/Y9pTzwdwDF6UIZn7AEOeDTi hyJ7aon9wRlHt8CsDc1qBqKFNZmXOmBcqpg4Mk0EHujHroY2As8QMO8AXZTEVzxV I5HL4NJ6AYnABYLM1PyqpNFoyJQ5u5Wehjwl9o/d2hzttu+fbD5tuFVNmbHsn4Y+ OkbZ7T1n9LfbxqHnScdH1UcoUer7fFenwUk+5NBZgtKgugkNPuY6GVrrBk9YCndZ JHvafA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772262; x=1793377062; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lg2VdeYIGJVJrhK5sQ+Y2lqv6jQurQ4Am9+SyZxywyg=; b=W0J4yYZ88LObh1asPQna65HFPooNKpxSnZ1I23ud3dWGViMY1Xhd+FxcyYCQYZU9YM hESE0bOZavDv8Pi2wcMFeYdGC9ENpzzyeY0WaAOrkm2xozdep9NSkLJllwG6p2mUOTSp iLpy2QYU7lK7wX31qbW6jvEFG4JnEpkI1YbbgymZOYoJl9+ZPSQz3cX7EgTpBEaif80V 2Tu6qI3GkdB4YlVPaoGPmYwcItKTA2K8f5Kew9qHJGkXjQoSOMfa5nNr55wqhRMUQFds kK9hfaAYZsmUDygDQyCRMrHmGvtisoTvFWJhQssNanknbJ6ETZ2Hc0nP5HzWmRQaOGcY /WqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772262; x=1793377062; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=lg2VdeYIGJVJrhK5sQ+Y2lqv6jQurQ4Am9+SyZxywyg=; b=KLg4vYLpS16q17AssvZD5pINAYRHVUTjR2OIl842J4ceQyF8fPqoPvJN2TkIMrVvcZ 6ORl9zGQXWUFolwNV9tzpubnNaAUdopyxipq0JZMFe8SIZb/M2IDKn5wRuWmUIFzaDKO EHWtdvzpoJ8VM1OoXJzjYEm5mqrVVG6G7olxHADX71k9VKdL6FVX7fRkCzdyG0lBKHN5 mJahruHmFrE5/ep4b8SzDHJ0wDSUXnwrE6u4K35bqIhZviWi+Wgrd5D2e/EFDSyg9FKM V4nFzA4VTFKAoz1n6FMLowfGIlecrTQbQZ1wOQ4ry4d68qvyM2oGEXt3tsmiG8L0/tAg r1vw== X-Gm-Message-State: AFq9FYIqEilOV0rNTJzTxmbt2qc/d0rLspP7Von3eeqO0H77RzpDM/aX NpdCI4zRFPJ/y3ld0VcJMt/H3C22/q9/cxb2JGFMN8RcHS+ku2Gd2OxzuzLlfTOv+d+V7vR/e0k 1wO3yHj7vN4gAtAcpSpqfSjtyDdyUeEQqFYGMmjL6PKFEOdfTEKuPFNrT21qp+btXp2rT X-Gm-Gg: AYBFou1DPtk/IP4CeG9QLLLG99Nno7A3gFir5arRv0Zeq8uhdBK6bhId6r8YRVT1ahv 74jNEEnuvn+Tg4mGyToYOuB9qz5EXuBPRlv2iqExJSYMZZ1qjtWF6K6ESrF5Z4ifi0UwQRLPUgf a8+qqsZHt9wBQa/MZhvn3lTSIsWe+TxIxxgPMAebX1y3NEth7aZTRPuES7LstzRDrbzQPFOdQR1 3PXDLUz/kadddbTgTVri03d8kRFlZlwJ2nZmu71UIzX6Lqics3ongAa1aN8zRGsCRRgJBCgU6dk QtqV6HS80rvSc+erCjptW7cwnNQpp9sjnPTnFgGr1e03dWCQ8r3hjxoDB59xiB/BM4SwlbRluWf p+rQ6QMeGe/8710X1r0WPHYIiNgxX1t2eeO04rDBq X-Received: by 2002:a05:620a:2586:b0:93c:29b3:3525 with SMTP id af79cd13be357-93f6f7c4fc7mr518093485a.36.1792772262013; Fri, 23 Oct 2026 09:17:42 -0700 (PDT) X-Received: by 2002:a05:620a:2586:b0:93c:29b3:3525 with SMTP id af79cd13be357-93f6f7c4fc7mr518088185a.36.1792772261454; Fri, 23 Oct 2026 09:17:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 34/83] target/m68k: Use a static table in m68k_exception_name() Date: Fri, 23 Oct 2026 18:12:42 +0200 Message-ID: <20261023161332.60153-35-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX/XQ5Po+1cPJn anlq2F3PhJBErWXHUlbsk+HmJ+vSFof1bZRnbYuVIRc9UAdTIkRIXpNX88XNCOhF0V/FiTVTUPu XdlzCR8CUV/8gMz3CsJjhV7x0xpN6JCXlEbX99e0/Xrk94yJmMBiDzINi8rf+qMd1zHvM31SZ08 NCwZobPMAaysH0LkKC7r09/Ag6TzFOG46zlp8UuoYkOlW9rbU75q2919PcGBlHZaoomf7ah8q6d Ie8NI0BfhJexsuv8sls1LNMGvsb2OB0BmicgEje8tms/FIq7m92cLTSSaqA5OzbTvmGITSColvQ fKdFnJaznBjdofkv59Vly6JdMbBpGzwdzg8L2NK7jXBzzsQVeoG9GPIwT52lxOU9TysaXygESQR EfDCi0uddNxzQ9ij3E1tpSBfYQmZAA7sq/UZB7vjtukAlJnbXogKWOjbGXXPuxr2nbc490cSbHq 5J3HdWQIenHk/Fo17Og== X-Proofpoint-GUID: _nFZHvYhE8d-u_2JRGFzMcg0jHp3Y8nF X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb88a6 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=MrkvrxfUm_GaFPyPbecA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: _nFZHvYhE8d-u_2JRGFzMcg0jHp3Y8nF X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX8Wljo/PGn+b6 8iUrnexAHMqN0rHsXvTr8lzdQq6bdGCtPZDJNyWHduivU1LH3JTAKNeZp790yesjQ726jivCXhJ qRznQDzJPlgjAq5Ya7ZRcJ6iOm36bHQ= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772345551158500 Replace the switch statement with a static lookup table. Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-16-philmd@oss.qualcomm.com> --- target/m68k/op_helper.c | 153 ++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 99 deletions(-) diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index c600f83ddbf..c9db8a1b39d 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" #include "qemu/log.h" +#include "qemu/cutils.h" #include "cpu.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" @@ -84,107 +85,61 @@ throwaway: =20 const char *m68k_exception_name(int excp) { - switch (excp) { - case EXCP_ACCESS: - return "Access Fault"; - case EXCP_ADDRESS: - return "Address Error"; - case EXCP_ILLEGAL: - return "Illegal Instruction"; - case EXCP_DIV0: - return "Divide by Zero"; - case EXCP_CHK: - return "CHK/CHK2"; - case EXCP_TRAPCC: - return "FTRAPcc, TRAPcc, TRAPV"; - case EXCP_PRIVILEGE: - return "Privilege Violation"; - case EXCP_TRACE: - return "Trace"; - case EXCP_LINEA: - return "A-Line"; - case EXCP_LINEF: - return "F-Line"; - case EXCP_DEBEGBP: /* 68020/030 only */ - return "Copro Protocol Violation"; - case EXCP_FORMAT: - return "Format Error"; - case EXCP_UNINITIALIZED: - return "Uninitialized Interrupt"; - case EXCP_SPURIOUS: - return "Spurious Interrupt"; - case EXCP_INT_LEVEL_1: - return "Level 1 Interrupt"; - case EXCP_INT_LEVEL_1 + 1: - return "Level 2 Interrupt"; - case EXCP_INT_LEVEL_1 + 2: - return "Level 3 Interrupt"; - case EXCP_INT_LEVEL_1 + 3: - return "Level 4 Interrupt"; - case EXCP_INT_LEVEL_1 + 4: - return "Level 5 Interrupt"; - case EXCP_INT_LEVEL_1 + 5: - return "Level 6 Interrupt"; - case EXCP_INT_LEVEL_1 + 6: - return "Level 7 Interrupt"; - case EXCP_TRAP0: - return "TRAP #0"; - case EXCP_TRAP0 + 1: - return "TRAP #1"; - case EXCP_TRAP0 + 2: - return "TRAP #2"; - case EXCP_TRAP0 + 3: - return "TRAP #3"; - case EXCP_TRAP0 + 4: - return "TRAP #4"; - case EXCP_TRAP0 + 5: - return "TRAP #5"; - case EXCP_TRAP0 + 6: - return "TRAP #6"; - case EXCP_TRAP0 + 7: - return "TRAP #7"; - case EXCP_TRAP0 + 8: - return "TRAP #8"; - case EXCP_TRAP0 + 9: - return "TRAP #9"; - case EXCP_TRAP0 + 10: - return "TRAP #10"; - case EXCP_TRAP0 + 11: - return "TRAP #11"; - case EXCP_TRAP0 + 12: - return "TRAP #12"; - case EXCP_TRAP0 + 13: - return "TRAP #13"; - case EXCP_TRAP0 + 14: - return "TRAP #14"; - case EXCP_TRAP0 + 15: - return "TRAP #15"; - case EXCP_FP_BSUN: - return "FP Branch/Set on unordered condition"; - case EXCP_FP_INEX: - return "FP Inexact Result"; - case EXCP_FP_DZ: - return "FP Divide by Zero"; - case EXCP_FP_UNFL: - return "FP Underflow"; - case EXCP_FP_OPERR: - return "FP Operand Error"; - case EXCP_FP_OVFL: - return "FP Overflow"; - case EXCP_FP_SNAN: - return "FP Signaling NAN"; - case EXCP_FP_UNIMP: - return "FP Unimplemented Data Type"; - case EXCP_MMU_CONF: /* 68030/68851 only */ - return "MMU Configuration Error"; - case EXCP_MMU_ILLEGAL: /* 68851 only */ - return "MMU Illegal Operation"; - case EXCP_MMU_ACCESS: /* 68851 only */ - return "MMU Access Level Violation"; - case 64 ... 255: + static const char * const excp_names[] =3D { + [EXCP_ACCESS] =3D "Access Fault", + [EXCP_ADDRESS] =3D "Address Error", + [EXCP_ILLEGAL] =3D "Illegal Instruction", + [EXCP_DIV0] =3D "Divide by Zero", + [EXCP_CHK] =3D "CHK/CHK2", + [EXCP_TRAPCC] =3D "FTRAPcc, TRAPcc, TRAPV", + [EXCP_PRIVILEGE] =3D "Privilege Violation", + [EXCP_TRACE] =3D "Trace", + [EXCP_LINEA] =3D "A-Line", + [EXCP_LINEF] =3D "F-Line", + [EXCP_DEBEGBP] =3D "Copro Protocol Violation", /* 68020/0= 30 only */ + [EXCP_FORMAT] =3D "Format Error", + [EXCP_UNINITIALIZED] =3D "Uninitialized Interrupt", + [EXCP_SPURIOUS] =3D "Spurious Interrupt", + [EXCP_INT_LEVEL_1] =3D "Level 1 Interrupt", + [EXCP_INT_LEVEL_1 + 1] =3D "Level 2 Interrupt", + [EXCP_INT_LEVEL_1 + 2] =3D "Level 3 Interrupt", + [EXCP_INT_LEVEL_1 + 3] =3D "Level 4 Interrupt", + [EXCP_INT_LEVEL_1 + 4] =3D "Level 5 Interrupt", + [EXCP_INT_LEVEL_1 + 5] =3D "Level 6 Interrupt", + [EXCP_INT_LEVEL_1 + 6] =3D "Level 7 Interrupt", + [EXCP_TRAP0] =3D "TRAP #0", + [EXCP_TRAP0 + 1] =3D "TRAP #1", + [EXCP_TRAP0 + 2] =3D "TRAP #2", + [EXCP_TRAP0 + 3] =3D "TRAP #3", + [EXCP_TRAP0 + 4] =3D "TRAP #4", + [EXCP_TRAP0 + 5] =3D "TRAP #5", + [EXCP_TRAP0 + 6] =3D "TRAP #6", + [EXCP_TRAP0 + 7] =3D "TRAP #7", + [EXCP_TRAP0 + 8] =3D "TRAP #8", + [EXCP_TRAP0 + 9] =3D "TRAP #9", + [EXCP_TRAP0 + 10] =3D "TRAP #10", + [EXCP_TRAP0 + 11] =3D "TRAP #11", + [EXCP_TRAP0 + 12] =3D "TRAP #12", + [EXCP_TRAP0 + 13] =3D "TRAP #13", + [EXCP_TRAP0 + 14] =3D "TRAP #14", + [EXCP_TRAP0 + 15] =3D "TRAP #15", + [EXCP_FP_BSUN] =3D "FP Branch/Set on unordered condition", + [EXCP_FP_INEX] =3D "FP Inexact Result", + [EXCP_FP_DZ] =3D "FP Divide by Zero", + [EXCP_FP_UNFL] =3D "FP Underflow", + [EXCP_FP_OPERR] =3D "FP Operand Error", + [EXCP_FP_OVFL] =3D "FP Overflow", + [EXCP_FP_SNAN] =3D "FP Signaling NAN", + [EXCP_FP_UNIMP] =3D "FP Unimplemented Data Type", + [EXCP_MMU_CONF] =3D "MMU Configuration Error", /* 68030/68= 851 only */ + [EXCP_MMU_ILLEGAL] =3D "MMU Illegal Operation", /* 68851 only= */ + [EXCP_MMU_ACCESS] =3D "MMU Access Level Violation", /* 68851= only */ + }; + + if (excp >=3D 64 && excp <=3D 255) { return "User Defined Vector"; } - return "Unassigned"; + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "Unassigned"; } =20 #ifndef CONFIG_USER_ONLY --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772298; cv=none; d=zohomail.com; s=zohoarc; b=COMdIiV50N6Yez0sIltxfXJbMTaE/1ZmTvyzwjmYcTxXXh9eWOhnPZPZ/XnHkJJk7drCNFCKdGATwN3OtNfnLitzP8s++XijtXvczd0/BdsKb8Tc8Ld7VmHC6a0AJqBL2ycAPZTNBzqC8194PiSoeJrS239ELzPMu0ZT8Kh9U8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772298; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=xcgP0X6WunyfiWmZrS9ujopTFmtiq6gtX4+aU0FN2f4=; b=gpbaxetDhi46Jyvs4AlxYoM8rQOUl4tcDf9LVga/MTU/fZTCtnlgwy/SuDtKexvX7U1ZQss7NqocvJprh3g/T/E07/AfJ9opWhLdmo48qzuGf27sktFTiV/Vx4NzqrjZQG04skbBhrOfquQUG0qzKm+18stnfn/F6PwUr1A/ZUc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772298289921.8509460694289; Fri, 23 Oct 2026 09:18:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHy1-0004gW-12; Fri, 23 Oct 2026 12:18:05 -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 1xKHxr-0004Js-S4 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:55 -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 1xKHxp-0002Yk-9k for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:55 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE67q13019019 for ; Fri, 23 Oct 2026 16:17:50 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsykbxt6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:50 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93e49a1d3b1so245633485a.2 for ; Fri, 23 Oct 2026 09:17:49 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d427e68sm800163f8f.52.2026.10.23.09.17.47 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= xcgP0X6WunyfiWmZrS9ujopTFmtiq6gtX4+aU0FN2f4=; b=aLOVHkieGmomDjyd zgwVOEOYPdlpZq2bLutJ9oNjS9JPbqls3dSOaHKG0obxCFc6nnJ6e4Y5WSjdPlK+ Vdh1CItQy8xGqJLsUFmM2bPnoPLrxaiA9KpIn1qXDOohVJcjR4OX+5DS2tye3Z8a B7WHVdX0iggndqFeFU03tQwF9EWGibWQBI1tFhM89aK9Hosuus21DADNejA1B+Z0 ohOH488hib/2pefJSz8xjaikv3nBbvq2kOwSB+g2CLWPbAnJ8HqGJUEYwi+9QyES MZPvzk5VBbw6DATAni/rtV8C6tcJ6v6g2tNw8379thtKF6Teb8IALE9YLG33LmOL ADyluA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772269; x=1793377069; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xcgP0X6WunyfiWmZrS9ujopTFmtiq6gtX4+aU0FN2f4=; b=S16szMTUhz044zAx0Go8MvEyumuxIMthzv+FdUr7G6G5iTFdzSXJTMYrPHDedc1P4X Ap2a3IAZwG+c6KdRk0N4gSWD0l6u4LcyZRGksxVGJ3TZTIX8OYECajFYDirm7TwUe65v /qPaQNyeUGTHpK4CWanfXuBV3aKNdPhVmMUHP+MHl42O2RI7Dq8EpCSQOookjnfpA5nv UO4/LO7hbcLuRfCMEbSZjaTIGHyytF8xxa1lagYwStfcqtXDtW4j1mY+2ASrEJanrclm 3UaEqCdhD48/NxdcMRJ7HtWdghiB+eSRThyhkdxC8Asv5/lBZj/ESHCFRGSIJqsZV63d LOoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772269; x=1793377069; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=xcgP0X6WunyfiWmZrS9ujopTFmtiq6gtX4+aU0FN2f4=; b=dARs4/fWNcQ83xjR17PYhGOsrWzKj2NH+5DiFWM09CAavZ8AKpiwPJ5Izp/0MNmZQC KBpD3vSja2RGNH5Lvh6k1XQ55bQGUy6WGYFCgZf8+25HGImBgZsLcUVwmreRQdOKHLdl KTIu/C4s6eZe0uFw3oUVRryiaLYsHyqfH/CRz86lag/1Cr58g+Aa/yAmq1HmoCi+ckUz Ikn6w4rpZLgjPZl4ha71zlg2yNdpeZUJikr7Cyz31ceXE+pYiprp6DGKNSwzuMxKZmrs j2vcyKKQfWtMSUFF3J3jlGJe31c5qBjAIym5xCCfOVDV83D5gH0cEzoMBZ8U9BaMFZEk j30g== X-Gm-Message-State: AFq9FYJEfjCgM+XY/bpYz2JKtFS1jMX0eoqmt33tfnXYt4hSjDhRpZUu ezOIulyFuykkYDHTYgtqurKYq5fokXc75j114U7kTdpkAXB/hSLTIKOYoYiTCHa11VWJJ0N5pon dK4Vg7P3e83jqIEu4SDOHMeM7jmULrgUJ/yFeIXVfc8VRQyjl6pI4ZBysmEVPG5BH+LwN X-Gm-Gg: AYBFou0ft1ox4zUJlfYqUGgwRydZFp1GySpIE4pR3k4g5q1Vd+QLKD8xEACHkDS7AK2 TuFrqieKSRrzizBDb1XSu38S5Ro1SKdpeSTxuARF558lD8PC4HGMSjIjzc7jF7V3IeRbQ73mVfA x0dO+F8NZHosLNrpAd6S/YhYBxSDLo+034JpI6HwUFYmKzIfHqmQVNozBfeWIKKIFtvCqYJQsvY xczpBmK3sSuZu5YjvDpFVbFyNHWc7R9x2G0GP6paR3YhIYSwg0o687py7PDGl2LBbcLhNVKbsae wN2DhPIVot/igC+SHSJFPEDVSdd4AUdrDczx+7Ep3jLRnzU5TRq031xbOXtA72kxDV+0hdKCE8U 2CUgyTMRVSFRlbmtoG7Ju88TkrfrOAW/xgs1pjFFo X-Received: by 2002:a05:620a:2717:b0:93e:9171:b72 with SMTP id af79cd13be357-93f6f804a63mr481735285a.49.1792772269064; Fri, 23 Oct 2026 09:17:49 -0700 (PDT) X-Received: by 2002:a05:620a:2717:b0:93e:9171:b72 with SMTP id af79cd13be357-93f6f804a63mr481731385a.49.1792772268545; Fri, 23 Oct 2026 09:17:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 35/83] target/microblaze: Implement and register CPUClass::exception_name() Date: Fri, 23 Oct 2026 18:12:43 +0200 Message-ID: <20261023161332.60153-36-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXzT6QBmI2BoTs GoL3htk883O30a2OwnjztWHZGjtKGJ19WVqkvlga9zREtHRy1jK59cY7c7Z6qk7ywyjqV/Y31Hd O+Vc9e8wirK1WzoAy0c3Sqmp8G4LUwFsXL1RuanLUEVpY2H/O5KuvOGyPMoAu1jyJQNpsLZdRIc gpd7yjClqXqJDqulZFBoDopiecYCoG0EYJMXeUBsBdcdAm0oSH2HTeq6RmBavgSDEawZaPJTYvO JayauIFEsEROtppt5gqxnt5oW0ps2iL38bia6ub94AE2wrT5NlejhPDX3VQPxxKUXa+2p3EJTLy FyopyJieax3kIU9eZxhChs2aq24PELmnpqBRJe4ts5Ssd26+/NzdpZxBro6yxrkkfTWHKaPzAZ/ TLgmEF/3B71aKBNq4WcUsK7foyWQHm6XlDhfqZaoNP1uo4SdEawI2U1clbMlLFUG2DGSBeNws2X HyiIRTSLSmewvHDwSVQ== X-Proofpoint-ORIG-GUID: IxxRi8_ZosSNwRf7TgGg7z6wMFbaldpI X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX/gL1xsNAVcs4 jG1kvCCtjig0Sw/hs1lf4r7ot9AAF04RuledNGVwGpep2kflDoMpPKcDjxbF4xHky8rawv1R8Ha tZGli7Gwmyx+6pDFfXkGM7VTAl6+Drw= X-Proofpoint-GUID: IxxRi8_ZosSNwRf7TgGg7z6wMFbaldpI X-Authority-Analysis: v=2.4 cv=GLKdgeNK c=1 sm=1 tr=0 ts=6adb88ae cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=_ZqrUhsafL45AmjA-XwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772300364158500 Implement microblaze_exception_name() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve MicroBlaze exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-17-philmd@oss.qualcomm.com> --- target/microblaze/cpu.h | 2 ++ target/microblaze/cpu.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index b9602f72b94..fc2783693e3 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -36,6 +36,8 @@ typedef struct CPUArchState CPUMBState; #define EXCP_HW_BREAK 4 #define EXCP_HW_EXCP 5 =20 +const char *microblaze_exception_name(int excp); + /* MicroBlaze-specific interrupt pending bits. */ #define CPU_INTERRUPT_NMI CPU_INTERRUPT_TGT_EXT_3 =20 diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 6013a8def8e..6d3f7cdae81 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -23,6 +23,7 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" +#include "qemu/cutils.h" #include "qapi/error.h" #include "cpu.h" #include "qemu/module.h" @@ -79,6 +80,19 @@ static const struct { /* If no specific version gets selected, default to the following. */ #define DEFAULT_CPU_VERSION "10.0" =20 +const char *microblaze_exception_name(int excp) +{ + static const char * const excp_names[] =3D { + [EXCP_MMU] =3D "mmu", + [EXCP_IRQ] =3D "irq", + [EXCP_SYSCALL] =3D "syscall", + [EXCP_HW_BREAK] =3D "hw break", + [EXCP_HW_EXCP] =3D "hw excp", + }; + + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; +} + static void mb_cpu_set_pc(CPUState *cs, vaddr value) { MicroBlazeCPU *cpu =3D MICROBLAZE_CPU(cs); @@ -468,6 +482,7 @@ static void mb_cpu_class_init(ObjectClass *oc, const vo= id *data) &mcc->parent_phases); =20 cc->class_by_name =3D mb_cpu_class_by_name; + cc->exception_name =3D microblaze_exception_name; cc->dump_state =3D mb_cpu_dump_state; cc->set_pc =3D mb_cpu_set_pc; cc->get_pc =3D mb_cpu_get_pc; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772334; cv=none; d=zohomail.com; s=zohoarc; b=lXooc0xDW4Z+sa3vxQlN6Mb0nS8aCVCLFHtnbyeG24tp3VwrVAHZnfWSBqve9uGf7U9h2sKmLh6flhp83zMBnD3BMmVOVSeIH3+R/LTE53TDWeQw9L6wA6F2zxoR9MqDK1yMxxi9VGARz4IdQJNtST0fiGbA2Cs1N6HtIGhyrZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772334; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=7UyMttxFzDTGznMWXPCKERdc7dDyFIV3k/y2lVFHpS0=; b=bKvYG3GaKsbtag1FpW2oCc/Z7cpKNNMkkTGHOcRGNEpnOUV+u+X2Pq+vMdUWluXt0yFEeK0mUqyRr+Y95akJFVtZPsCKFj7vkiALoQscGB/Jh9qLJqHiNMkovg9zoH8y2kFwQVUojAy8TLXkvv6ceFusJtdgUH5W/jnYEhfLLsA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772334771978.1407616160627; Fri, 23 Oct 2026 09:18:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHyD-0004y5-33; Fri, 23 Oct 2026 12:18:30 -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 1xKHxw-0004fo-2S for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:02 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHxt-0002Z2-JP for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:17:59 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6CVm2215817 for ; Fri, 23 Oct 2026 16:17:56 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc81fg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:17:56 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93ecdc701a2so142969685a.3 for ; Fri, 23 Oct 2026 09:17:56 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29cdbd2f2sm15270545e9.11.2026.10.23.09.17.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 7UyMttxFzDTGznMWXPCKERdc7dDyFIV3k/y2lVFHpS0=; b=kgmphGB7u7Ths5yV zXYInjUMwHcgpQNLFNOOU8872JdFRiZ7kCoHtN4+0sDurW+WvRchctBI7bqP0Ejr Y6o+QNUAKvpfX5j5pP7kUSLdZeWKxPn2UJd3d4j/0tnRFCETtweH7y48xTZvq2H9 8Nt8TlcU5qBVrixZFLPgFH2z/0qLL8QDsKmYR97iNEgc+5WiB/SxISsqS3CHxTBz xxZ1bQcSUnlSD/t8cIRrm7I4aQfDKoRBIg8tto+XOsZfOHH14LS0PDCCJNMA2GJE RWH+R+1rVYj4KoolakUFEF2WpHQj/S9YszixHAUg2Sj0KA9mZpcJiGPF78s2/Vj4 Pouuaw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772276; x=1793377076; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7UyMttxFzDTGznMWXPCKERdc7dDyFIV3k/y2lVFHpS0=; b=jjb9o4SWXPfqQbpV4Rl+UaxhSFmOs4pldWIjxTefCEzHnH/dFjVQcQJ8JBWxt4pNOo b/Hhn7wZw7q+W/9yqa4JPTtQ4DikNXehFoMRsJeUNEc/VsQoOG4mODqJ+ywvX517wJrw MC+yTEpOM5y6DVaYkmBxTQzmcuCVzTSw5cXWgL5Uf6xoseNpV3zAU9UlcWeRrVu9AFNA +NfDigkU8GyE2kYRbvY7snkKw4kmiO2+rIHDElj71Ap9SpEgIAx/iJ5vwha/nUylvONS MQblj9ma2yiMFodGDYof75lCbBKTk4upXOdiAW5X7hnoTChwgSzTnLEB+PTGHWHxu2Cf /TbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772276; x=1793377076; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=7UyMttxFzDTGznMWXPCKERdc7dDyFIV3k/y2lVFHpS0=; b=Lt4FHV75VEkgkQgHGPQNNKrfBta1MCwVVmyiRWsWzYUevPD/HR0pAiGDC4B9HnOg6G OrYzhz9S+F8A/gVP8T/DWc2hnQBTCKNEofE/S/XKInqw5hGanaDZvxsmkt4DTS3IbAWw cCb4Lim9i7mN8jwCSN8FQSpMno6dvR69mURtOiwFmihXuQMT9Rt8/4HQfu7X5q8f9kNI eVmmwPtcAZVw1Q2G71QY0F7ITREQnE4RUSu5NdlG8YfBNLZ2aykgC4MrWPs5IE8Dau2D sj1j2TAelSf5IH4Kk3lAXMXGvtKlQnjNQy5FcTX7cnQ+OMgFXsLewFRXtp1/gVoUB67t 5d8w== X-Gm-Message-State: AFq9FYJlzkSeJ5LpOZ+bEdwQBAtLwx+2nCHRef82TvmXA2vV02yiL71U hn2h9EQAWwSgKyo0xJi77z1Ifo+wjhQpV4J6DEWrsiLtFYk18DfzHLUQgCwPSZXgDmz3c/k5gmJ 5x4hqzUpZEO69nalGXhxzQNdBy3wlKAbo1Y30Qy0vPQXBquNfwJCiJaIino27dssQDlO8 X-Gm-Gg: AYBFou0r6jr1NGxZH3x6ovUC228LAnSgPdNPf/i4+FNbqKqDu4mYt9oNkzdBXoFG7Kq cR8PiDDysvBCNSEFqZF5KRvLM0YdFfl8bxIiMH1fqjAlQv1axNeif43sCDOuFc6+pL7ft9E+c+o 3JGIYFknJlsHd4MyPjQKW5DoZM/cPY/VJCgntF0fJltTsY/+3u9Df0VTf1MZoSAfoHwzOwJ5DiD nXbA9dJO5L/JbhW8laNtV0f0HmAa+C1pKlzoZjPnH6oglYSGvbL4H8dfQwS04/ev/xBfhBJ9s5e U//jvyjcn1iiFXo4hf8Q8upRpnGY+jv0SUHrf9ItIKIB1hZw+SiOCgpLb5ywew74GszHYBamAJo 1D4EZTKywyIZWDVSyei4Td+8COXksr0Nd/JpHbGoB X-Received: by 2002:a05:620a:6011:b0:93e:d5c1:da58 with SMTP id af79cd13be357-93f6fa1057dmr459699885a.79.1792772275927; Fri, 23 Oct 2026 09:17:55 -0700 (PDT) X-Received: by 2002:a05:620a:6011:b0:93e:d5c1:da58 with SMTP id af79cd13be357-93f6fa1057dmr459695985a.79.1792772275434; Fri, 23 Oct 2026 09:17:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 36/83] target/mips: Remove EXCP_LAST, use ARRAY_SIZE(excp_names) Date: Fri, 23 Oct 2026 18:12:44 +0200 Message-ID: <20261023161332.60153-37-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX7uNBrL7kTU4I 6iIul+3Zao0Nv9nyYIm1UW+8Zs4odF0R4i+OvaS69p8MK1CUyasqaSvz7NTtA2l5QS9eLfP4ens 5YRGWnzlWZwjrvw6u7RNYoGD+Fp3UudgDQ8ww0j4zVoF0lu1emksF4JuTm8injM0pJQl3NbBqHB 9g+Ktcc6qn2SnVyj2fEfdN+hFz6slGxpdXX44lmZGKdR/wjtE/dhq7/v1ATETNF7xP1v8z44aHC 8LDK+crsMtmIyXcMwaI/lWncgA57koeZNxHXFxi5OaYKmeMQ0Dk0y7wDguIOqoCt2WQerMr10aW gUX0+R7DQzPoi+86cYGuXhbY23I/EmZNIuFwBnFp36O53m6TSpdIDTqTLevmxaB/kdWNyYebyHl TYb8JQgl52jteAs0J61zSJe0AmU1CSvCG2r9yrjYdbDkA7FzVM6Sd+LRhi5kqQnfQm3sTrBqwv0 8GoPboumAD9+vAABkEA== X-Proofpoint-GUID: 1Gof7zYJwWfpdWVhJl_Xm8PHQImowORO X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb88b4 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=p6m5v2aWr9E3IcuUVYgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: 1Gof7zYJwWfpdWVhJl_Xm8PHQImowORO X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX749cDt9Rg1P7 HYB+33p0TxbnBwfVaY6gz2eRfFAGuLyyXHxCE1k4KY+vJYWkQEH/4w9aO57YCM3mjYsjtcs3nsc 9aeTy0QcmB32Aj6kGPh88IlIDAXWWEI= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772334976158500 EXCP_LAST was only used to size excp_names[] and to bound-check mips_exception_name(). Let the table size itself from its initializers and check the index with ARRAY_SIZE(), so adding an exception no longer requires updating EXCP_LAST. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-18-philmd@oss.qualcomm.com> --- target/mips/cpu.h | 2 -- target/mips/tcg/exception.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 32549791a18..5d8b78a70b8 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1347,8 +1347,6 @@ enum { EXCP_TLBXI, EXCP_TLBRI, EXCP_SEMIHOST, - - EXCP_LAST =3D EXCP_SEMIHOST, }; =20 /* diff --git a/target/mips/tcg/exception.c b/target/mips/tcg/exception.c index 630b8b809fa..2f02f9be877 100644 --- a/target/mips/tcg/exception.c +++ b/target/mips/tcg/exception.c @@ -88,7 +88,7 @@ void mips_cpu_synchronize_from_tb(CPUState *cs, const Tra= nslationBlock *tb) env->hflags |=3D tb->flags & MIPS_HFLAG_BMASK; } =20 -static const char * const excp_names[EXCP_LAST + 1] =3D { +static const char * const excp_names[] =3D { [EXCP_RESET] =3D "reset", [EXCP_SRESET] =3D "soft reset", [EXCP_DSS] =3D "debug single step", @@ -131,7 +131,7 @@ static const char * const excp_names[EXCP_LAST + 1] =3D= { =20 const char *mips_exception_name(int32_t exception) { - if (exception < 0 || exception > EXCP_LAST) { + if (exception < 0 || exception >=3D ARRAY_SIZE(excp_names)) { return "unknown"; } return excp_names[exception]; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772335; cv=none; d=zohomail.com; s=zohoarc; b=cL5EBikqJYsiaiTJhSVE4S/J+w3UgMoA9iWi+HLfHPKD42oa3H9NgYBZATvNcpTTSc806DuVeYedB/rO/DD+lXhV0Qp1F55mVS4NbIPy0zdiDxjRs+bnClhumiG6ycL9zrJa82cFWHKfkMsnW0+xZYqABqHPwsBOGNNU/8kb19I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772335; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=4N3ewgGMCnNDW96xTy+HMLfbifRt5Y3bSUjDJAd8upA=; b=h2byfKPiLTFgR2zxcb3Hb1cTxVPabzn9SH8wArgKZkJK+WSpGozTFU2b2/4IEtQViblsBWjf/cIdj5hsi1jcuvzckI5Vb4UEJgSmiyfQ6tThn8ZFGh+xbQNXurdR9pfe7oYTsrfJlfsvtANQnZggDHYdmBLfadQ3fdQbWeQKDbs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772335725911.415781858998; Fri, 23 Oct 2026 09:18:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHya-000561-9l; Fri, 23 Oct 2026 12:18:41 -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 1xKHy7-0004sK-I3 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:15 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHy3-0002Zi-JB for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:10 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG3rt43812359 for ; Fri, 23 Oct 2026 16:18:04 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas881xb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:18:03 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93cb7f9bb86so197764985a.2 for ; Fri, 23 Oct 2026 09:18:03 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2b065950dsm13214345e9.12.2026.10.23.09.18.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 4N3ewgGMCnNDW96xTy+HMLfbifRt5Y3bSUjDJAd8upA=; b=JKkL59kR83qIet+k z5bwrkTJjSBrrBPuMnYsbG4FkxTrWzVqbGjxEYUmBpGWxzU9vLoSKswruRfKKWL0 tueD6E3dL+5ySJfLDzgrXG9Gc04nID08Ya/kUc8uBbKNs/MT+c2VZUX+3qXOXPpF ReanQcGPQwlKjqQ/or7iznMAVs+MTm68t7P8qDMykfyWSBp+UlEsq/NW46hMKSVl FVmHdtUeki7koh7b/AYwuycHAqI3a7dKar0wAxoT+VI6ypFgidBqg7aN5BGDMzIS Cj7xybUfQPGvm4+BPbrvOHv+vcU7Pw7RU74hrWq0vtCwzj8ySk1osbaDHxilWV4i 3JuMbA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772283; x=1793377083; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=4N3ewgGMCnNDW96xTy+HMLfbifRt5Y3bSUjDJAd8upA=; b=ZHrkl0JYFfu7RPin9gxBry6ApyUTf4DvVTiq1jUl35v8G4p2elBdeQ3n7u7yJfSVZn qdws0oHJLgidCKN2uvxmuRDzZgOAjaURiOEZ1V6xYSxA+/cIWLThmuKVXlTLuQoMzscU lm3viOzmjqcELdZsiohtToUPEi+pAEPKW7wlpXcltMZcdeFZ52BXU6eWyy+zFo6811n7 QI4uasG4VDztRQ/XJRI8ByHTaY1Vc0imUTG4XEnvg+JBj/mQTs1TZBJNrmfmNKOtlF9x 2+ixPGJ/kAthRzEPPWVefLSxYECfQUvEM14E+BhgFpMupVZD3XvT0QVpoa9MoylXuKD5 Qrmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772283; x=1793377083; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=4N3ewgGMCnNDW96xTy+HMLfbifRt5Y3bSUjDJAd8upA=; b=i9I6fe3uPZXlZxW8U3wsJsVBT2coH2DluCymUml2bA8ci/gCi/djxP7sPTmuYR4smR rPu5MAItipwGJHN6MuLktlZ4R+/jTZLWIdr9i9OhKUjTq11IYSzTBQNROOoQFNB+iWdU JDEE9Ra7zJ0IuzrBi4Rfox9leu5RTItjcrKr8Gp3tWkpNvRujI9phYk0yToRgw79Uoos ZqKvitptotmV4kNw/gR4ZiX/blfsqlc48EocmG9CKAAi39MoC+Tp8nzb2t3o7iN96rzN CkQnznEB2GAFKvZZC2N9ghLWYgUR2uFArmyG7oxBw2aFE1QMeOmzBneINLzMxOy4zcq0 yS4Q== X-Gm-Message-State: AFq9FYIVofK4PlG+Dhiy2aFt5mTWYFEMk9P6+7Lv/8Mwjx0kMzUrGz4p k19P8e9dvJkVBH0efEXoLn5dFZxDfZ3V3TL4bDi1TK/bXQEvgmyx3s41fQCZGlBJ4uQWh+NE7dQ s5jXYHnlSpvl+9ObLzmA11MRO6rztiXHT3ahi18we3Ou4XXIDe5Wtb7e9EiFVTIihmk/a X-Gm-Gg: AYBFou3wzWaSYGLrRKfXYHaP0+52IIqOreavKssxaQ5dC98Mm2vwGIW/+vL1OaMn+m3 VuAoTTqWk2190KWXzPwiyQnoIjybjjhMJ+wEnqeEu3HKzkPLHXMahxxyyu1CxM99Dsama/gP+Mi xVw5zXH6CTCYXcjoKfkqgqtSn3Xn6wBBvSvugX0mrc08CLAF74qqBgVbAw2B/ixY9d/AumXvCqY iaNvCIQc98bcSP5VytaWeML5SOBrNZf2K2dNOYH/WfjFzx9L1zPmao6JLwXj8lSPswx179v+mcZ WItMv52LaajcpJd8YaO9935emFw+HyqX057XgAy7IaPwZdmzsA5LisZC3fxKKtsvrOItnwZ5GUT DCxpmxC/sYv9h3pOUUTo2J/fU2JNOhKDwV4jsAXZN X-Received: by 2002:a05:620a:19a5:b0:93b:d7a0:d9db with SMTP id af79cd13be357-93f6f7de923mr501572285a.53.1792772283110; Fri, 23 Oct 2026 09:18:03 -0700 (PDT) X-Received: by 2002:a05:620a:19a5:b0:93b:d7a0:d9db with SMTP id af79cd13be357-93f6f7de923mr501566985a.53.1792772282512; Fri, 23 Oct 2026 09:18:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 37/83] target/mips: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:45 +0200 Message-ID: <20261023161332.60153-38-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX5DxSGxos5sad 6ZVQGfNyvV2OV8mm7zcnxnWIejR0us0NtVD0HKbgJW7SgNHoqVXvFuHh2Wrnkbe/Dzmlp5GPO4g zFa7dLK3NN42FkI6jGukT0HyyZ6g2/g= X-Authority-Analysis: v=2.4 cv=OPqyTiaB c=1 sm=1 tr=0 ts=6adb88bb cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=IWzrOf9u_v1LvXMeo9oA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX72Ou4CqhU8yj +vg2KbtsP48pvJasNsk85Vp6GhWxcACcyP9FD2Md0pWAOTnwD0Z1PPwuSUL89qGxo2BEF3nF4H/ LWztzmLNdRb+GUGZAo0hclWmHql9i+vHjxrXBWFWmlgJoVX/mknVvl90q8646Om74LVM1vsT0mq dfPRJjwoX0SH+3mhQ/AAZmn/qYYz/DIBz4jLfAWBqk/woUwXkgAABV8rTGAzKZIU8XdzmmE8Tdf jHPWl/2PB+QO3XKyKeGe1XVTskP0VtYoqBSzzEop7tzI2SJSGaveT1cMOG46kW3cr+skMIYaI49 nciPnDz8XvVzdb3hE/8pia5Y4L9/kKXcNtY23ImzyFs0/bFXkAvDicS31dqYsZJ5PLiQXoAugAN 07u2HNcA/gLuQ+XMc5suwDQ3abYPU9rJB3FSuaDzQh5xGCNoYxvwoi+Hwf9WEXYoDhPFkTXDjwM PqpYwvsG5HBVVhgC0yA== X-Proofpoint-GUID: QMaiImKbALmgVWQEAPuZ4Qtg3KHz-1pi X-Proofpoint-ORIG-GUID: QMaiImKbALmgVWQEAPuZ4Qtg3KHz-1pi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772337070158500 Register mips_exception_name() as the CPUClass::exception_name() handler, so the common exception logging can resolve MIPS exception codes to names. Return "unknown" for missing array entries. With '-d int', codes without an entry in excp_names[] are now logged as "unknown" instead of passing NULL to "%s". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-19-philmd@oss.qualcomm.com> --- target/mips/cpu.h | 2 ++ target/mips/tcg/tcg-internal.h | 2 -- target/mips/cpu.c | 1 + target/mips/tcg/exception.c | 8 +++----- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 5d8b78a70b8..b080c5de4de 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1349,6 +1349,8 @@ enum { EXCP_SEMIHOST, }; =20 +const char *mips_exception_name(int excp); + /* * This is an internally generated WAKE request line. * It is driven by the CPU itself. Raised when the MT diff --git a/target/mips/tcg/tcg-internal.h b/target/mips/tcg/tcg-internal.h index 950e6afc3f2..9f230e757d6 100644 --- a/target/mips/tcg/tcg-internal.h +++ b/target/mips/tcg/tcg-internal.h @@ -27,8 +27,6 @@ void mips_restore_state_to_opc(CPUState *cs, const TranslationBlock *tb, const uint64_t *data); =20 -const char *mips_exception_name(int32_t exception); - G_NORETURN void do_raise_exception_err(CPUMIPSState *env, uint32_t excepti= on, int error_code, uintptr_t pc); =20 diff --git a/target/mips/cpu.c b/target/mips/cpu.c index c069aa1c0b7..759a4e93a0a 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -741,6 +741,7 @@ static void mips_cpu_class_init(ObjectClass *c, const v= oid *data) &mcc->parent_phases); =20 cc->class_by_name =3D mips_cpu_class_by_name; + cc->exception_name =3D mips_exception_name; cc->dump_state =3D mips_cpu_dump_state; cc->set_pc =3D mips_cpu_set_pc; cc->get_pc =3D mips_cpu_get_pc; diff --git a/target/mips/tcg/exception.c b/target/mips/tcg/exception.c index 2f02f9be877..823866ee600 100644 --- a/target/mips/tcg/exception.c +++ b/target/mips/tcg/exception.c @@ -20,6 +20,7 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" +#include "qemu/cutils.h" #include "cpu.h" #include "internal.h" #include "exec/helper-proto.h" @@ -129,12 +130,9 @@ static const char * const excp_names[] =3D { [EXCP_SEMIHOST] =3D "Semihosting", }; =20 -const char *mips_exception_name(int32_t exception) +const char *mips_exception_name(int excp) { - if (exception < 0 || exception >=3D ARRAY_SIZE(excp_names)) { - return "unknown"; - } - return excp_names[exception]; + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; } =20 void do_raise_exception_err(CPUMIPSState *env, uint32_t exception, --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772344; cv=none; d=zohomail.com; s=zohoarc; b=bUSfDZGjD47Nyh2ytLTj2dvvT3kpYR4r+7OEEy6gS2XUm6J7kcjP6aOw2Jz8owswWNQmpKLKrOcF9zLcB1jOH6XztiuJVkgImoj/kY6BLQ6m+0kgJYI3xHWj5p7wOAF2vXcgQxNpb948YwwBVCntQaRxGDJqSOTnhxJOIfP+/bU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772344; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=gf3nV51IHCES/sR28++evayAqXGfMFfu3J0g9pt+Hq4=; b=F08aCzgkR4l5RudyKqp1Ft7y7x8WO+qebq1hP/WjwexOAoeS0mYdJOUcJRxyLQKXLDMK/KFprHJCp/AxzygABhpQH23TBV6NYbd3J8GZh6qm0up1kVv5x+CX9xN1H5ZdOhmzNTQofct0dTeUfT+dR4BPqwd5vsp0dg6qN1IBC74= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772344602324.55660937073446; Fri, 23 Oct 2026 09:19:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHys-0005ow-Fh; Fri, 23 Oct 2026 12:18:59 -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 1xKHyD-00051D-CS for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:30 -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 1xKHyB-0002ab-6P for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:17 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6Cbl2462547 for ; Fri, 23 Oct 2026 16:18:11 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmtvjcf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:18:11 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93f20addba1so202067885a.1 for ; Fri, 23 Oct 2026 09:18:11 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d40e830sm783034f8f.35.2026.10.23.09.18.08 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= gf3nV51IHCES/sR28++evayAqXGfMFfu3J0g9pt+Hq4=; b=psUdwn9J6sgIT+qe EOWP8jbn2oUd7JKIBuLIOzZG6SnjOvxTc7YX6hOMKTYu6TvTXQqQhpuV+ar90jZC cA21678vP5/hwW0ndBy0Yp0+S8LwiS4iVg0c0fKnoRJ8jaArr5MTI/1kJHv8W6U4 S/15uuc8bzCPfrHlt92PKW2R+Bou4hJCxxrr9lsDJRy3MkAPdpgUiuCwa1D3H8g8 Ifr6AmVro45vrZaOpGp2PdYpVfXYPK3LySrmXhpXb7dS8t1a5m4Z15kTZUIlVIe9 xJsJdD6wveUEqyl8/ztBxQ02UTCWdmJ4dRSkN0KzhgrTLZC/9Kb7Pkt37MOv1giT ra7X1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772290; x=1793377090; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gf3nV51IHCES/sR28++evayAqXGfMFfu3J0g9pt+Hq4=; b=Ojch1K3zcf2Lg9vWAyEj0zuK1l3GYlhbhn4MZtx0j1SGtJmXNUDKlvHcVIDM9pCRhi t9ovrUO0pVX8L2Ot0+UJtpWD2LTuVhZ3kLg30+aR9at0hsOVGOIc5kGs6scs2RrzN41m 4ghXRLLO5qTUXPjc4u3RWjJ2BMIxNWGiA64TWXN8AgpLwezzsbhp1Ny8aI4vejVSFAFl wSZgL1Uiop135o4DoMy26ACv6O+udz3OUkUOBtk4bzStP2Ry8fg7aGRPE4Jw3PdPXBYc KKermF2//6LDEvoQ4JTOpI4uRlhUpVZTWU7wr5ElyqZad7nmQ/llmGWiOXK8XRneg8/v UfGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772290; x=1793377090; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gf3nV51IHCES/sR28++evayAqXGfMFfu3J0g9pt+Hq4=; b=OgllAR+GH6ioyz4F2CFVEc3DJ6ZF861FvseRqnJqHfJQehIdVXVPSN51X6dFqx5lSh iKoBcKSxFig+zDdjnsjBQLAu0J4c+g1PlWngEZ+Pfhtayq4Eph4FFeiVY2vqN3sNYCkw H7ij1LuhgQJZ2U8+viQN9cBeRtT8SIEUaBDzekOZV7h7Q8EuwP0tQLVHNUGiUXGUeYd1 bM2zds+MgKuSFtieNrtsz4WBLP86idhnoJIm1OPYpEkiP6MAFxM7cpqNmh7Xi3jsnmqv kEmGOeKMWaSALwEVvG4N8QP9K1jF5egSWcECvVcDDZz4q/upQ3YxHy7ggVDcQRNv/De+ cYqw== X-Gm-Message-State: AFq9FYLw69rZuVPGDUFYom5CgDyr8GENY40Np1XFSvgrWVIu61K0ag/y fZtw53ckm9WCsJAYsMhfM7X0QPXW26OI3kKFqf+z1Xg0biba342bRp8jrB+LmSg/Elj4Xn3cyD0 PgDZ+hlnpaqC/lilW2NOB7NWjWe73WdehPvXRkBgCI8/O5QFDow/FfgF8irM6pVI2jVm0 X-Gm-Gg: AYBFou2vTHXATnd867anabLKSYkVweNP0bbKkiPvCX707H8kSdCfKOXGoAcUhAv61B0 Wut8WZduZeyTRAiJH0cdX+r83E4dy8x9dqeUTyd1GO7uKjJ4RTRRR+o9uTplUNSNMiTRNnG9YiK aHP3FlPpnYwyYAEyRcw2NMuxBbkzALGYE2eQ7Qjn3VVJvBYOawjKXAqivBH5H89hi1Pao4CGAwZ LU9bMUD+pngabuTfbPqB5r151vVXDUDMxqBlRZJc+Yi4lpQBnOAnqi3AELQteXVGf04+5Wdb1BP jCnIWKKk2xdXLaI160JY5Or6pj7GoKjthPhDkVIOP79oXMRsjDvEgBI2eWjoPSs344SIlzUmRBO cAyXCklPENtT9Tamnn4JrNCk9WW/h1rrWr1zKaMhN X-Received: by 2002:a05:620a:8002:b0:914:afc1:c66d with SMTP id af79cd13be357-93f6f5a3254mr466674185a.11.1792772290337; Fri, 23 Oct 2026 09:18:10 -0700 (PDT) X-Received: by 2002:a05:620a:8002:b0:914:afc1:c66d with SMTP id af79cd13be357-93f6f5a3254mr466670085a.11.1792772289867; Fri, 23 Oct 2026 09:18:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 38/83] target/or1k: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:46 +0200 Message-ID: <20261023161332.60153-39-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=Gt3XaU1C c=1 sm=1 tr=0 ts=6adb88c3 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=slxP8ohElPSaHwuvTCoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-GUID: n9Z7Zhuvu4RevaRWOe3rJIfcf0EnJ1Ff X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX0c2P/k4IEgMB HYyyriNt/wl6QIIt9Hpk5Z2UYz4/vGJtIKQCrSL5W794G/90juzmYATtRPveSngDyDxqIqYmLIO y6yt1R0EVX1zQ/a6iLL7omK2jflVZvUTtPvaRvyhrQ4YwBdxOupxBKVHTCPwVOpCk5bJtIBxkVe zoncckGFj1MQZNBq0WBnTKwuUDDdUDzV3xG1DNGgP+18DEMbCkNhEm/DX335XBFCm5T56vWrd2E LlSI0chbHCsnkEvPqypNbp/vjWkj1iSPjq+GKstQAwy2oR5lzYEZ8L4RlN5VVLVKDdjw6m5125B gEd3BqZd5OsjlVijY2PunAbbIviXFmaJy6e6inMEiXIQRSlJnYR4gqNmkLCbxiVEvFdpgjd2klD 7HMq7NP/1hYL5dYZ0Xmq88apLzocI+z777NlzHsuO4aRz6V9JoK9w41n8xQngXpCeDH/Ka7ppCg t9ZXmaXAVcw56yJfsfA== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX1P514v3cV+p9 X0R34LFaZwdXefsxXPDxJzJxk4M8H6kF8lnHfI4wRqxPzOmFOL51f3dhBe3FQDf8nZX8UjvZb9J 2cwIJ387Z8o77GVhELxrjgFKdkIJV2k= X-Proofpoint-ORIG-GUID: n9Z7Zhuvu4RevaRWOe3rJIfcf0EnJ1Ff X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 adultscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772345522158500 Factor openrisc_excp_name() out of openrisc_cpu_do_interrupt() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve OpenRISC exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-20-philmd@oss.qualcomm.com> --- target/or1k/cpu.h | 2 ++ target/or1k/cpu.c | 1 + target/or1k/exception.c | 22 ++++++++++++++++++++++ target/or1k/interrupt.c | 19 +------------------ 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/target/or1k/cpu.h b/target/or1k/cpu.h index fc4387ce7ae..96ed1779fae 100644 --- a/target/or1k/cpu.h +++ b/target/or1k/cpu.h @@ -155,6 +155,8 @@ enum { EXCP_NR, }; =20 +const char *openrisc_excp_name(int excp); + /* Supervisor register */ enum { SR_SM =3D (1 << 0), diff --git a/target/or1k/cpu.c b/target/or1k/cpu.c index 42d9351b6d7..5aba8a42a95 100644 --- a/target/or1k/cpu.c +++ b/target/or1k/cpu.c @@ -284,6 +284,7 @@ static void openrisc_cpu_class_init(ObjectClass *oc, co= nst void *data) &occ->parent_phases); =20 cc->class_by_name =3D openrisc_cpu_class_by_name; + cc->exception_name =3D openrisc_excp_name; cc->dump_state =3D openrisc_cpu_dump_state; cc->set_pc =3D openrisc_cpu_set_pc; cc->get_pc =3D openrisc_cpu_get_pc; diff --git a/target/or1k/exception.c b/target/or1k/exception.c index 785181ef2ed..55c539a86db 100644 --- a/target/or1k/exception.c +++ b/target/or1k/exception.c @@ -18,10 +18,32 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/cutils.h" #include "accel/tcg/cpu-loop.h" #include "cpu.h" #include "exception.h" =20 +const char *openrisc_excp_name(int excp) +{ + static const char * const excp_name[EXCP_NR] =3D { + [EXCP_RESET] =3D "RESET", + [EXCP_BUSERR] =3D "BUSERR (bus error)", + [EXCP_DPF] =3D "DFP (data protection fault)", + [EXCP_IPF] =3D "IPF (code protection fault)", + [EXCP_TICK] =3D "TICK (timer interrupt)", + [EXCP_ALIGN] =3D "ALIGN", + [EXCP_ILLEGAL] =3D "ILLEGAL", + [EXCP_INT] =3D "INT (device interrupt)", + [EXCP_DTLBMISS] =3D "DTLBMISS (data tlb miss)", + [EXCP_ITLBMISS] =3D "ITLBMISS (code tlb miss)", + [EXCP_RANGE] =3D "RANGE", + [EXCP_SYSCALL] =3D "SYSCALL", + [EXCP_FPE] =3D "FPE", + [EXCP_TRAP] =3D "TRAP", + }; + return STR_ARRAY_ELEM_OR_NULL(excp_name, excp) ?: "unknown"; +} + G_NORETURN void or1k_raise_exception(OpenRISCCPU *cpu, uint32_t excp) { CPUState *cs =3D CPU(cpu); diff --git a/target/or1k/interrupt.c b/target/or1k/interrupt.c index 6e89157639a..399c98e3881 100644 --- a/target/or1k/interrupt.c +++ b/target/or1k/interrupt.c @@ -66,26 +66,9 @@ void openrisc_cpu_do_interrupt(CPUState *cs) } =20 if (exception > 0 && exception < EXCP_NR) { - static const char * const int_name[EXCP_NR] =3D { - [EXCP_RESET] =3D "RESET", - [EXCP_BUSERR] =3D "BUSERR (bus error)", - [EXCP_DPF] =3D "DFP (data protection fault)", - [EXCP_IPF] =3D "IPF (code protection fault)", - [EXCP_TICK] =3D "TICK (timer interrupt)", - [EXCP_ALIGN] =3D "ALIGN", - [EXCP_ILLEGAL] =3D "ILLEGAL", - [EXCP_INT] =3D "INT (device interrupt)", - [EXCP_DTLBMISS] =3D "DTLBMISS (data tlb miss)", - [EXCP_ITLBMISS] =3D "ITLBMISS (code tlb miss)", - [EXCP_RANGE] =3D "RANGE", - [EXCP_SYSCALL] =3D "SYSCALL", - [EXCP_FPE] =3D "FPE", - [EXCP_TRAP] =3D "TRAP", - }; - qemu_log_mask(CPU_LOG_INT, "CPU: %d INT: %s\n", cs->cpu_index, - int_name[exception]); + openrisc_excp_name(exception)); =20 hwaddr vect_pc =3D exception << 8; if (env->cpucfgr & CPUCFGR_EVBARP) { --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772343; cv=none; d=zohomail.com; s=zohoarc; b=LQF43ttRKc3Pw1PVhiy+bTNeprn4G+eEpS4fqvA/T9MgMzR5kYN7WLvMerrrp/xBmwm/YXisg4w+0DR63SgUtpYp5HYBoaMpZUu/XvkS/CsDquoA9R+ErFBMv1Xa3b9MfK1KqYbnJjmdRLtZYeV6AXiUZpuBTCX4osVCpxy+lf0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772343; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=UzBrLyD535/Y603iJ1Dw+wfYw5v4tQHqEdAByKIdD74=; b=ZZQrdW11SKwAs3MUsa19xQdNL9q29aKxxWMkkRvwYyGB0aXyrmc2Vt44EH1/X22N0pLfDS5PG4MyJWOSuSS+0MKkQWvf/QVtjsaH0f+jnu+TaPIC+yrkfOaRkUur8lHa/e3b7RkyhpDMexV+cuS2Rma4gBpISeuYE8LJQgUb0Is= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772343969224.37455095116206; Fri, 23 Oct 2026 09:19:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHyo-0005Xt-Rl; Fri, 23 Oct 2026 12:18:55 -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 1xKHyM-00053b-4b for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:32 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHyJ-0002aw-JG for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:24 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6Poh3000292 for ; Fri, 23 Oct 2026 16:18:19 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7cn0w2f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:18:18 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93caa0ce0cdso133536785a.2 for ; Fri, 23 Oct 2026 09:18:18 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312eafc80sm18746605e9.3.2026.10.23.09.18.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= UzBrLyD535/Y603iJ1Dw+wfYw5v4tQHqEdAByKIdD74=; b=M4rbZbRNmqHKxwWX IUGrTDjujLv/8D1tviGrmgtaHBiiGt1Tn4FYUxdIdVKqEHxhEuFwuFmUEt2e+Vg4 0xZs3qP1bE9zxJAlWew60uqfgql44okXxZAdsJI0Pd8D1r/LmtnsrwS4+sv+Gw5W w3c716wqPj7h+ScFjXGaaYxc3TvpkO5R5tZDUoqXpLOO/Z1mhwTyhgvKTX+vqJOH M7n5WZhzfLcE6BlutQsGXi57RxRCxI+asABY7NLeXpaHkQkzHBq1iKY54hIyW89Z dwasHUMRwHtbD/hNabbQnTItC8qqkmE2JlJWH9EcjCNSlgdyrJnaaanx99lZQJR/ o7Yonw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772298; x=1793377098; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=UzBrLyD535/Y603iJ1Dw+wfYw5v4tQHqEdAByKIdD74=; b=NgEhjiPdrJbKNzdLnj70n46WlA9t8sGAdhWNbTgj9zxbmpufWGT0RIkPgR5oKDpRHp gNs3ClPaEgOITJpka/4S0Nhd43GqMBAVvXQsWOFYG5xlHsx25gj8wL32pYugJlWeDqvB qBoU89Q5hAyNPsmIl9TMU5GoGItezcWld7CpMtX4CCdsW8eR983M6jYx5xDm1Q7LL5ma 4fgoA3T4Zeskw5R7TsXxIEONm9RMxWUP5yvBe7cIwtaPk/CKsoIOivEWREmtZ6NjSazW CLP4tSTk1tKPAWf+G4fvuSKUpROn4Y5b+6NyjjqzRTYa6BqBSKOa0c4qLmB29qdPP7nG fJjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772298; x=1793377098; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=UzBrLyD535/Y603iJ1Dw+wfYw5v4tQHqEdAByKIdD74=; b=REISCbFEb5AfmmfgPDBJyENVvdmPOYHvkh9v53oHJxZCSLGkDyQgGdBbEm7MTpJ1cO a/TxMHdw8A8U2LMNh+1bW3NnMKq6x3VQN3X/q78q8FSu5G1XjPbeNcuOR2E/mxXfCQoY G/Tk3+Ek1gtjTwrnguWK/sVrGl9UQ6eGCeZ/2cPjOM/zAGNbXKUI7a2DpJTG2ZLY1GCc 3Bo5WVYLvzgXdTCTvLcG+uEa7dH6YKd4hhdFh9E5wBP6hXwfoTEAqqxgPiBN+J6BGLja XrW79qCLFjzDuocKBaSJ1bACLwK9SksbRiwiKFzoXHLfjdgdz+/cPM4iFd3GyopZIk59 44lw== X-Gm-Message-State: AFq9FYLjQ1GwMlqCMiywFAZ5dC1vtkLoOqkHJzuKJHTXf6KqsKzQWZXx ltTCmblrc41EXb20eyLIU3OUSRA9c6f6j8yA2T4w/ysdyA6/oOm8EzqkJ3IeBOC8J1ZsvA29J30 4RdzzfNYIe3/OGikIMagOcf21kskZnjfrIRpDVWLHUoUCcXSyjeUFYsEQ+tOp0j7YzDqe X-Gm-Gg: AYBFou2b5IOaIegawZ2uqbcrhYsNX7q2bUXhyBfUgSlZy+6qlLhgULI450D56WsNhj1 WPZSPow287P7Qo90S4gm6F5NI48KZoXq4th2rB9UViEnUPcQ+D5Kax8uWq+z1Ou+WN96E/9AA/e rWU50OvvogrlvXoJ7VYhNIVVdBLzMElZB2pXGcBr9HNkWhxlGVEMspE9HJuvFhdoOqxdSaZyru3 R6qwJ/WdQl05t+k05Qn+4Cn75Gbv0PdRc2eaAfxU6lqrMX3pVbj+QdWFq2i36A5+IeOxHGzeXbR Vn8t8Yc6JH31aHQ0Xt6TpnUANLMJPm1r3ILLJ4iY6Qfc/iEWpH7Yr4CdK5g29840lJdteXQZNBz gHPsjn3YUXOh5dS8YySnLkWpmnjSAbb74FRaX1PfZ X-Received: by 2002:a05:620a:4725:b0:93d:23b3:5088 with SMTP id af79cd13be357-93f6f907cc0mr501464385a.16.1792772297990; Fri, 23 Oct 2026 09:18:17 -0700 (PDT) X-Received: by 2002:a05:620a:4725:b0:93d:23b3:5088 with SMTP id af79cd13be357-93f6f907cc0mr501456685a.16.1792772297254; Fri, 23 Oct 2026 09:18:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 39/83] target/ppc: Name the EBB exceptions Date: Fri, 23 Oct 2026 18:12:47 +0200 Message-ID: <20261023161332.60153-40-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXxoIP1kNBWbuO bTeOztACL8kdTTpFDgzSovLG0+6t/7Ta1ZjDr2mrNHZEGJapId/mC2yyEqTgJw6JD/Q++sW9iV0 9pdfpw1yMKOuBBYIdQ+4zBOUZJjr93JzMU5wX13kFsdnZQUF8xmQmlYU4fx1LrQiKgC7Se0IczR 2NQvh2nrW6OQs1PTBvxQEJfbiutDM5eYHivlR6JOEXkCMON8j47t/QXISopWLSRu1uMStC6IXLM Ytgt/y2i1hRmNimqxllCibcNhFweqb+m1vTfyYO1Nu38DxyLAkIHkRlUiiqIYDunonaTIqjX1cQ CbArSuIwH1rxY6B0z4i5orIStKTWJjRgqtX7wUcpexagJjpTcvY4Tf9QvLmJXtmnltyRvvRsBp5 5MDZe2XOqtZAwGXYACtyjtGELIZSbuLjetWn/FGJhS5UfNrDmR7wJXnBJ6QiFaxARI04wDSKpQY 5RDLkfyVPkFYD7jdxDQ== X-Proofpoint-GUID: KLtqJDXF5nGfxjMWN8m69PHfIDuGSFaP X-Authority-Analysis: v=2.4 cv=a9mlZkSF c=1 sm=1 tr=0 ts=6adb88ca cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=69wJf7TsAAAA:8 a=EUspDBNiAAAA:8 a=Ni8MKOl5piV74ivutUIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=Fg1AiH1G6rFz08G2ETeA:22 X-Proofpoint-ORIG-GUID: KLtqJDXF5nGfxjMWN8m69PHfIDuGSFaP X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXzENxyHSO7A4q YeTRxNESPh6LpwUP1MecR80K5OS2w8YYuAiwI/AXSarlPzr8m0r+GOgh0kkr7gZpnAjw9G12faV Wzem9UyCJHsg9xHuSKqdhxSj5OMyJSk= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772345481158500 POWERPC_EXCP_PERFM_EBB and POWERPC_EXCP_EXTERNAL_EBB are raised on POWER8+. With '-d int', powerpc_excp() logs them through powerpc_excp_name(), which has no entry for them and reaches g_assert_not_reached(), aborting QEMU. Add their names. Cc: qemu-stable@nongnu.org Fixes: cb76bbc43fda ("target/ppc: add PPC_INTERRUPT_EBB and EBB exceptions") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-21-philmd@oss.qualcomm.com> --- target/ppc/excp_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 6d05b865058..895127fb2e6 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -100,6 +100,8 @@ static const char *powerpc_excp_name(int excp) case POWERPC_EXCP_SDOOR_HV: return "SDOOR_HV"; case POWERPC_EXCP_HVIRT: return "HVIRT"; case POWERPC_EXCP_SYSCALL_VECTORED: return "SYSCALL_VECTORED"; + case POWERPC_EXCP_PERFM_EBB: return "PERFM_EBB"; + case POWERPC_EXCP_EXTERNAL_EBB: return "EXTERNAL_EBB"; default: g_assert_not_reached(); } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772509; cv=none; d=zohomail.com; s=zohoarc; b=asUkMDk1m43ftszFCjM5/UotzfBcVHO3WD/1tg8mJO6BU9xIVUJ3dwwzwa67Krtj0krkn9cuaCo9Y7CCiNY8p2U0Y9sHD9YYjqTxJYC66B8h5nRTTNffn4yUy+AB6Md8XZuCgYFm4YbWYb3bRXV+FMBXF39D3u3vlsBM+rw3zUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772509; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=DhLxB7MEJOaltEhJwCEIexGsl9KAJr8R9xhlHNbSuwo=; b=Rq4MU3XOww6WMbRhOWK8nY/UCdIwLfvsja3Z31iNj+U1k8vpkq2s9TmhGgbqIxMXv5qowhHs4z3fSkjp34cLbUauKElwQQ/7btdpzu/gxVmqsj1Kbg1CPoXM9k0Qe9LSiuZrGQ5r9fhu80oQLUHImp2ZCWYK2CjVkkErJiDOdtU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772509415307.8189772990801; Fri, 23 Oct 2026 09:21:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHyx-0006Jn-KO; Fri, 23 Oct 2026 12:19:03 -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 1xKHyQ-00054q-W8 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:34 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHyN-0002b8-E4 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:28 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG2p2r3228243 for ; Fri, 23 Oct 2026 16:18:26 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgart0233-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:18:25 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93cb71b1443so218332485a.2 for ; Fri, 23 Oct 2026 09:18:25 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d428372sm844143f8f.53.2026.10.23.09.18.23 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= DhLxB7MEJOaltEhJwCEIexGsl9KAJr8R9xhlHNbSuwo=; b=RXCpxVUkOFNtBvzX tQBSoi6CRKHIsQixhG1haa/07CdownfieX73vG7Tdd4c8vvfiqjT6ceauzTyQaiN TRZ9vdIQ6LOry4e9STLZoahrqWDbcuCG6ZW+uzJ3B3h7q87IjY5sFeS9qdwoeeJz BzvWJ42ukf0ZzuS5VLvlfm4VtLQT/PPAZ9isiREnLdWDpFb0SgJxepEAlCHxYf4J GVmeL8WieoPkGW/ZRMhpnIWKwCq+O0v+WA6KUxlAMl9Bw4h9sIHY4aGn6xl8e0DD nukW/0jAvie48OmQqH0TerfZwX1JaUGlcL8/fyz7ihDHqVa4jkn6WIFJa3J75QXK bLFteg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772305; x=1793377105; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=DhLxB7MEJOaltEhJwCEIexGsl9KAJr8R9xhlHNbSuwo=; b=Zt5Avs24icWFhP6QosdCTs/tBGNzikO82soUqbEzVgPFlDFhU8F/SF54xSTn4TTu/Y 9VXpiJ9+M5+NY3Z4s0Wxy+9QdbcNod69PxtXREtOY3EJvwF4t0JLGFo7P0R7oDuQQAJY sJ52EdfKbBCFBY7Se1X1qTarEIn/QAM4QLVBDIdaST1BVv6UhdJ0xIOgz9zLSlRgyfOt ScSHgNqGKvKKzUPn5i/o4Ty7i/3978zGsAf9rFpks6GOAzNivN50K2rzN/QZjxGusq1E UZXHl1U4GI4G+OMkRAlWbgjUHnI4TamVa71tLz2/IIucJHqA4ekTfStkw6QUzeOJCuE2 pKpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772305; x=1793377105; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=DhLxB7MEJOaltEhJwCEIexGsl9KAJr8R9xhlHNbSuwo=; b=pSfWNqPoW3IbQmJB8pe94OtIaZUVhMkV7eLZ4kVVTars4eSrKGFfXsTwtq8Xzn4afi g3CijCzMwVqrYIBD8Z6M+zU/ua2scS5V9GD2Ir8GU2jIZKsDaKnxxoYtQZ1e7MFGOL2d vDgEd1L4DPXX0dnImwkVevSmrCLc4zFp+IQegE3y3AAfR/Jume8SJZHqQrKjMmcoZy9U 0ERrXJyDaEBGUSRrgazjw4ZZUPmiMS8k5FgoLrhsrgJyDGaDxH0zngBdi4LG12XWZhES 8oEYTQr5KhkdixTAaCYlzQZMXwhOI2NTRdRNqVeY/MI0+V+I3zGXGR451IHGWtwRn0ye amaQ== X-Gm-Message-State: AFq9FYJAhk3sYUE0lYWJrfWV16TwWzbC5ifzQOWtVVUoKtHDhbVyUL2o vgHu1dNPqp37cFHQA36v/yGqhoHIQXJeCscoL5Gd+6R3eyZJihaSPXocl4Rl8sHg3x3tIzIQLl+ jFWPBAUwM4odmrQuQ43JNcBeHfo8+C/jv2pnzZ5Ep5YI3o36uqiu/z53nX/B0Qwa6AIcC X-Gm-Gg: AYBFou1/ctMgaFJNXIOoBxSiiMRY9u8rD9lnr958c3inmw4yv8l00G9rfZLj4dL8/T/ rSp1Yqp8db9RgAFBzqD90Y1qFr+55HzWRbxlzlWw3NVefJkpivrpuGzbiqJNj2KLeToQLBd2HRb RopjJC+R5iS/IZygGFrZF49eP9doTDP5oOGMeQIqRSBk/gQsarYZ3hedv1ZV/iUO5qptYKmOMha hqacW/DnVTtNKPNgKw84EmEyS4rWXH82zDlLa0/0PGzDnk8A6NnKFBYxNlffrtUrsyP8d+Yx8oK f9cKAsTNxMurXQMmqqNDMG1zD+PtP1jzYAv3ysuhIKhaMxPMua6vsNN/jzNbgKCaFL68ALJmp8P I4g6opiROI6/IDXBo5LtdT0M0RTYWSa/1qbM65vSS X-Received: by 2002:a05:620a:2628:b0:93c:b47b:26f with SMTP id af79cd13be357-93f6f7fa76dmr499663485a.49.1792772305106; Fri, 23 Oct 2026 09:18:25 -0700 (PDT) X-Received: by 2002:a05:620a:2628:b0:93c:b47b:26f with SMTP id af79cd13be357-93f6f7fa76dmr499658985a.49.1792772304469; Fri, 23 Oct 2026 09:18:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 40/83] target/ppc: Use a static table in powerpc_excp_name() Date: Fri, 23 Oct 2026 18:12:48 +0200 Message-ID: <20261023161332.60153-41-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX1DjXAmtfHx1m tH4wQk9V6Coooibg1mNNjHLHGPN4vN1as7vSD8povGjZARuqnxx+NIuOPbp3+5LLHSxc8gNrDtN r1tPPN72jd9lkNApTZ8oLvTVK+pjO8+qsw9a4RYOc1Le3EzD+EKaCj5N8f7vqUqC5XoW39z4No2 WhGMgD3iu5c3NmxEyL0f3sNTCICSQoZFYBUcFXPdYbaVxImDIBvdjFJXC3FVJ8qLZOSuTcIM6v1 4bcjna4g4+PhAmgvKfu/cNtEEWx8feOkcsUMyseCD7cg/P5ReXzTUIyhMfRaAGBoAfF6orQnZ+i 5tE12CX7Jv21S7p3zbp3MB6PjstRoNVpqq/CwpDbdtd5FnX79N5MbN1ii9LpgZLmBSLBH2gPiCa q1QeESnUVGO0GS0ud+nt1nW7eu2aXox1QerjXQFBzxGl7Hzsq0rDiZFUown4Db6a5Zxx19zwKi+ /9GLYjh5bX2Dp41mj1A== X-Authority-Analysis: v=2.4 cv=JI+uIMKb c=1 sm=1 tr=0 ts=6adb88d1 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=ToDOQhdInOzr0WCV1tUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX0iC3K1eXhvCa SJ6AuLihyE68+v9w4BAaBzPnHlt3Xt1u9SuhsKqKVh4eI/QHXHrMkWwuNvpY74LG/azBmx8HpCj Uyi6Peov2ZkGY7PW5hU6QF4/zXs0wmI= X-Proofpoint-ORIG-GUID: K6FqVyEniPVr7KoMpxzHoiMm6g4zyHr7 X-Proofpoint-GUID: K6FqVyEniPVr7KoMpxzHoiMm6g4zyHr7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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, UPPERCASE_50_75=0.008 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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772510358158501 Replace the switch statement with a static lookup table. Unlisted exception codes now return "unknown" instead of reaching g_assert_not_reached(), so with '-d int' they are logged instead of aborting QEMU. Do this before registering the function as the CPUClass::exception_name() handler, which must accept any code. Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-22-philmd@oss.qualcomm.com> --- target/ppc/excp_helper.c | 137 ++++++++++++++++++++------------------- 1 file changed, 69 insertions(+), 68 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 895127fb2e6..4892cbaeb07 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "qemu/log.h" +#include "qemu/cutils.h" #include "system/memory.h" #include "system/tcg.h" #include "system/system.h" @@ -37,74 +38,74 @@ =20 static const char *powerpc_excp_name(int excp) { - switch (excp) { - case POWERPC_EXCP_CRITICAL: return "CRITICAL"; - case POWERPC_EXCP_MCHECK: return "MCHECK"; - case POWERPC_EXCP_DSI: return "DSI"; - case POWERPC_EXCP_ISI: return "ISI"; - case POWERPC_EXCP_EXTERNAL: return "EXTERNAL"; - case POWERPC_EXCP_ALIGN: return "ALIGN"; - case POWERPC_EXCP_PROGRAM: return "PROGRAM"; - case POWERPC_EXCP_FPU: return "FPU"; - case POWERPC_EXCP_SYSCALL: return "SYSCALL"; - case POWERPC_EXCP_APU: return "APU"; - case POWERPC_EXCP_DECR: return "DECR"; - case POWERPC_EXCP_FIT: return "FIT"; - case POWERPC_EXCP_WDT: return "WDT"; - case POWERPC_EXCP_DTLB: return "DTLB"; - case POWERPC_EXCP_ITLB: return "ITLB"; - case POWERPC_EXCP_DEBUG: return "DEBUG"; - case POWERPC_EXCP_SPEU: return "SPEU"; - case POWERPC_EXCP_EFPDI: return "EFPDI"; - case POWERPC_EXCP_EFPRI: return "EFPRI"; - case POWERPC_EXCP_EPERFM: return "EPERFM"; - case POWERPC_EXCP_DOORI: return "DOORI"; - case POWERPC_EXCP_DOORCI: return "DOORCI"; - case POWERPC_EXCP_GDOORI: return "GDOORI"; - case POWERPC_EXCP_GDOORCI: return "GDOORCI"; - case POWERPC_EXCP_HYPPRIV: return "HYPPRIV"; - case POWERPC_EXCP_RESET: return "RESET"; - case POWERPC_EXCP_DSEG: return "DSEG"; - case POWERPC_EXCP_ISEG: return "ISEG"; - case POWERPC_EXCP_HDECR: return "HDECR"; - case POWERPC_EXCP_TRACE: return "TRACE"; - case POWERPC_EXCP_HDSI: return "HDSI"; - case POWERPC_EXCP_HISI: return "HISI"; - case POWERPC_EXCP_HDSEG: return "HDSEG"; - case POWERPC_EXCP_HISEG: return "HISEG"; - case POWERPC_EXCP_VPU: return "VPU"; - case POWERPC_EXCP_PIT: return "PIT"; - case POWERPC_EXCP_EMUL: return "EMUL"; - case POWERPC_EXCP_IFTLB: return "IFTLB"; - case POWERPC_EXCP_DLTLB: return "DLTLB"; - case POWERPC_EXCP_DSTLB: return "DSTLB"; - case POWERPC_EXCP_FPA: return "FPA"; - case POWERPC_EXCP_DABR: return "DABR"; - case POWERPC_EXCP_IABR: return "IABR"; - case POWERPC_EXCP_SMI: return "SMI"; - case POWERPC_EXCP_PERFM: return "PERFM"; - case POWERPC_EXCP_THERM: return "THERM"; - case POWERPC_EXCP_VPUA: return "VPUA"; - case POWERPC_EXCP_SOFTP: return "SOFTP"; - case POWERPC_EXCP_MAINT: return "MAINT"; - case POWERPC_EXCP_MEXTBR: return "MEXTBR"; - case POWERPC_EXCP_NMEXTBR: return "NMEXTBR"; - case POWERPC_EXCP_ITLBE: return "ITLBE"; - case POWERPC_EXCP_DTLBE: return "DTLBE"; - case POWERPC_EXCP_VSXU: return "VSXU"; - case POWERPC_EXCP_FU: return "FU"; - case POWERPC_EXCP_HV_EMU: return "HV_EMU"; - case POWERPC_EXCP_HV_MAINT: return "HV_MAINT"; - case POWERPC_EXCP_HV_FU: return "HV_FU"; - case POWERPC_EXCP_SDOOR: return "SDOOR"; - case POWERPC_EXCP_SDOOR_HV: return "SDOOR_HV"; - case POWERPC_EXCP_HVIRT: return "HVIRT"; - case POWERPC_EXCP_SYSCALL_VECTORED: return "SYSCALL_VECTORED"; - case POWERPC_EXCP_PERFM_EBB: return "PERFM_EBB"; - case POWERPC_EXCP_EXTERNAL_EBB: return "EXTERNAL_EBB"; - default: - g_assert_not_reached(); - } + static const char * const excp_names[POWERPC_EXCP_NB] =3D { + [POWERPC_EXCP_CRITICAL] =3D "CRITICAL", + [POWERPC_EXCP_MCHECK] =3D "MCHECK", + [POWERPC_EXCP_DSI] =3D "DSI", + [POWERPC_EXCP_ISI] =3D "ISI", + [POWERPC_EXCP_EXTERNAL] =3D "EXTERNAL", + [POWERPC_EXCP_ALIGN] =3D "ALIGN", + [POWERPC_EXCP_PROGRAM] =3D "PROGRAM", + [POWERPC_EXCP_FPU] =3D "FPU", + [POWERPC_EXCP_SYSCALL] =3D "SYSCALL", + [POWERPC_EXCP_APU] =3D "APU", + [POWERPC_EXCP_DECR] =3D "DECR", + [POWERPC_EXCP_FIT] =3D "FIT", + [POWERPC_EXCP_WDT] =3D "WDT", + [POWERPC_EXCP_DTLB] =3D "DTLB", + [POWERPC_EXCP_ITLB] =3D "ITLB", + [POWERPC_EXCP_DEBUG] =3D "DEBUG", + [POWERPC_EXCP_SPEU] =3D "SPEU", + [POWERPC_EXCP_EFPDI] =3D "EFPDI", + [POWERPC_EXCP_EFPRI] =3D "EFPRI", + [POWERPC_EXCP_EPERFM] =3D "EPERFM", + [POWERPC_EXCP_DOORI] =3D "DOORI", + [POWERPC_EXCP_DOORCI] =3D "DOORCI", + [POWERPC_EXCP_GDOORI] =3D "GDOORI", + [POWERPC_EXCP_GDOORCI] =3D "GDOORCI", + [POWERPC_EXCP_HYPPRIV] =3D "HYPPRIV", + [POWERPC_EXCP_RESET] =3D "RESET", + [POWERPC_EXCP_DSEG] =3D "DSEG", + [POWERPC_EXCP_ISEG] =3D "ISEG", + [POWERPC_EXCP_HDECR] =3D "HDECR", + [POWERPC_EXCP_TRACE] =3D "TRACE", + [POWERPC_EXCP_HDSI] =3D "HDSI", + [POWERPC_EXCP_HISI] =3D "HISI", + [POWERPC_EXCP_HDSEG] =3D "HDSEG", + [POWERPC_EXCP_HISEG] =3D "HISEG", + [POWERPC_EXCP_VPU] =3D "VPU", + [POWERPC_EXCP_PIT] =3D "PIT", + [POWERPC_EXCP_EMUL] =3D "EMUL", + [POWERPC_EXCP_IFTLB] =3D "IFTLB", + [POWERPC_EXCP_DLTLB] =3D "DLTLB", + [POWERPC_EXCP_DSTLB] =3D "DSTLB", + [POWERPC_EXCP_FPA] =3D "FPA", + [POWERPC_EXCP_DABR] =3D "DABR", + [POWERPC_EXCP_IABR] =3D "IABR", + [POWERPC_EXCP_SMI] =3D "SMI", + [POWERPC_EXCP_PERFM] =3D "PERFM", + [POWERPC_EXCP_THERM] =3D "THERM", + [POWERPC_EXCP_VPUA] =3D "VPUA", + [POWERPC_EXCP_SOFTP] =3D "SOFTP", + [POWERPC_EXCP_MAINT] =3D "MAINT", + [POWERPC_EXCP_MEXTBR] =3D "MEXTBR", + [POWERPC_EXCP_NMEXTBR] =3D "NMEXTBR", + [POWERPC_EXCP_ITLBE] =3D "ITLBE", + [POWERPC_EXCP_DTLBE] =3D "DTLBE", + [POWERPC_EXCP_VSXU] =3D "VSXU", + [POWERPC_EXCP_FU] =3D "FU", + [POWERPC_EXCP_HV_EMU] =3D "HV_EMU", + [POWERPC_EXCP_HV_MAINT] =3D "HV_MAINT", + [POWERPC_EXCP_HV_FU] =3D "HV_FU", + [POWERPC_EXCP_SDOOR] =3D "SDOOR", + [POWERPC_EXCP_SDOOR_HV] =3D "SDOOR_HV", + [POWERPC_EXCP_HVIRT] =3D "HVIRT", + [POWERPC_EXCP_SYSCALL_VECTORED] =3D "SYSCALL_VECTORED", + [POWERPC_EXCP_PERFM_EBB] =3D "PERFM_EBB", + [POWERPC_EXCP_EXTERNAL_EBB] =3D "EXTERNAL_EBB", + }; + + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; } =20 static void dump_syscall(CPUPPCState *env) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772363; cv=none; d=zohomail.com; s=zohoarc; b=emxpSiGEWCG3Eh7fopPSkO1alHj7dUGl6TrOUzIk1dPmSfsrpTvG52Cgs5HkJPRotovbTn7bSAN/N7ktJ5o435XbnKyQJvLqub5RUqeRjgz92zzFmANo4UeiUm8xwOfn/RidtZEimtgBq6LSrGFcL/aI6wQqiraR5LSCZwYbWCQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772363; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=LxdMwygRiC+MDcV2vX2TTd9aXLCl/l0AA4GQ7p5ojoY=; b=nfKhhInULKqv7fO1UTZFema0YqnQZ02ZFZS3DJ3XHGCMmOdpj9ZWPwVF63AeVGzKQjlWz7bTiLu0IYPHMVnJMxWfXeqwyaPAccXW7YntLhSfzgsSONRb/UCwfNn2x6mFMfnfIlckB/Kk1d/RfKIQ04XCKWGDL9Ap8mYhFMWzBao= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772363368734.0936261549255; Fri, 23 Oct 2026 09:19:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHyv-00065J-UL; Fri, 23 Oct 2026 12:19:02 -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 1xKHyV-00056y-9t for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:36 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHyT-0002ba-Jx for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:34 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG41jB3812454 for ; Fri, 23 Oct 2026 16:18:32 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas881yt-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:18:32 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93dd3c3badbso265819385a.2 for ; Fri, 23 Oct 2026 09:18:32 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29cda986dsm15339985e9.7.2026.10.23.09.18.30 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= LxdMwygRiC+MDcV2vX2TTd9aXLCl/l0AA4GQ7p5ojoY=; b=Dtbd3dUZqspQiwtA e+D6FmdbZnW/be6FJUBy9XuYmBiYM1CjGY2Gx7L8NlzExS3na3wTtebxms6tku/X y4R3IFzELUBU3rIIAy0uW49l/e38pkmp8rsObZIem5wqHeczIiOTl5tkk+byZtZ1 rhTEIOkbad9T93ATjzH0OtYj+tLE1aqyOITxWIZughGx3njMQFwNq0y48C1vCU6q HjkxKi10exXLwdf5hLAdy+9D0y+nZeczqU9X60lrK+nqE53k6TxnLMoUBqkqTIGN nbstj0aZEZ+68NjYFqi7nk9IqBzfgtrY9DqXZuUtg2fk9dfp6A78oQuEkLpsawvV mE98Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772312; x=1793377112; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=LxdMwygRiC+MDcV2vX2TTd9aXLCl/l0AA4GQ7p5ojoY=; b=fJ6Vi0qvzSOgSswGxXw/XA0BK5I9z7tA3HaK+yMPlnJpWNO0+6k/Gcden37QueVTOS nVSJlTkKOmYpCyirWEWNSRSBrHYuJVKaZS1brck/ELi7jdWJHJuWdziU6GQMssBfPOz9 VagV9qjKEyg7pG6FxgeuNRHwAwDRyl6ZOumqAZWfz2tjk8ELmnzuYTcjh9y9r9PZgbK1 YVup+8oPr2DbZ3tWybBE8x2rAtLOWuzxhb02VZLV6eFcDBzd7qVohvLt0h5NZQHowaNv hheMkAbL469Tu6RqKabQhQvuGwI5WFcOci5exzlwDzc1VB4COYj9JaEcWITIeYJ8Rbne EfBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772312; x=1793377112; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=LxdMwygRiC+MDcV2vX2TTd9aXLCl/l0AA4GQ7p5ojoY=; b=S5QCwDz0x0GviDsdhFepGZB+EfADIDx89XE+RYTM/Q2+enEnz7LluvReJW6Bus3b5+ XEpoUpU5nUli4I4E0QOCzhVFPie1atlFgx7q3hdNswiR8tsfr2SloZ2aoaTrLljHn6ea R0/wf9YwYU/iSMuTWLZv1njQU/qvzR1FBzAg18JqkJ3eCS8Un42AXaez8DmAzxtHABSA CCC0Bg8DaS676/BaLGamzPC1WoyhSJD2m5CvNcra63bg5Fsjdm2t6T2Y+oS1Bnvgg2CG qKLdqsY8NeVuxo7QqRu6TGzML7FNs2sJC+pYzI2w6Dssz2Ypi2Yesjngth5fiHfO89TC 2e3w== X-Gm-Message-State: AFq9FYIVfPc+y9ME6FPqurOxBbhBc6Km92u6bc7lxJl8RsPQ1oklRamw cpzCS2cAwDkZFSu2P+kb3vg7yavl500huXBpcN95Q72S2nPaYQ0Cu8eKW+1/tTUZNPzn+YZWbbx A0PZuZT0topdHbvSgQRsPlHCqpBK9tD6XXcGdTbHyYz7N1htWkIrfdZr/qVgCeqMWACrb X-Gm-Gg: AYBFou2Uq5WpqfU7SegRhZzyZ4CsTk1i+oHNZBQ0ZGQ221FSiJSYdL+Pds/2DPbWLCu E2YGj4VPOmJYhvp7Kdl34igjUOK/nvdr6DatNUw8P5LYvcobk9N8OgM0fCO+uKmvO23kOOBURtA Rls7QJ6WcKkpuOZgVZf+oY9eWJJWtss9z0iiY9Ndf3+9JQupyE3iEik0KYBJMcXA3uEEHRf+e6V XrCeE+s4S267SkgJPmLHl924gbdeXIXOlJ0R7hEy299dHiGieBDPGL6C6VkLWsJxCahy3qWkgYm TEPTfSuw6JBvtgKaFP5EBSa7RV4Vr3ukpQ00Ig04yUD9y7Ch7Bq892vlgUvAWFRaxK50a08wOYw +o/llqZ2rHIzT+wcnWg1x3eBRNIwnPn9r3qoHmWzW X-Received: by 2002:a05:620a:4151:b0:93a:83d:1d0e with SMTP id af79cd13be357-93f6f7c49d7mr481239085a.38.1792772312090; Fri, 23 Oct 2026 09:18:32 -0700 (PDT) X-Received: by 2002:a05:620a:4151:b0:93a:83d:1d0e with SMTP id af79cd13be357-93f6f7c49d7mr481233285a.38.1792772311487; Fri, 23 Oct 2026 09:18:31 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 41/83] target/ppc: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:49 +0200 Message-ID: <20261023161332.60153-42-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX0xRNiipKvv7W YBtZvVQ8qMdJplRJxPr3sbwVwoAO8kT7MFZG32gXDVn7y3QIrt1CU2eebLyiSmipIEyBcrFzupQ mBxPD03eIANkWFWThLKUd6UA0VFr6w0= X-Authority-Analysis: v=2.4 cv=OPqyTiaB c=1 sm=1 tr=0 ts=6adb88d8 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=GQJXTKmK7mRzDcunaLEA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX+vYTUSpRwPKx l2topkwWPoCgTQO86Qum3Dne68qJDw4dX9ZhocCk8fqbODdAGkuanR0CGN3wPcfDTrolAuF11dY dVFBF01yhZN6pA6KLl+GVWajYhP0UsKS4+9iA1kapDBBsvTGEF6e0d5oUkZiomzxiYm4hPK9X2D 12+kzWcn+vSrjtmeVUsdeeOiUNRdRZx0hvCYvFwrlfy25cltODwB5wI/MuzF4gY0E7YtsVTTq5Z 5jAFGt/bhMhE+E0S4JjS0mLTs0QzV3fJ2DqhSF08kCQqjYZYYdnYGx2feagqkd9PXVpChjFLNdC UpEl5RnvUmRRnpCJOe69MbRILjigr2THebg/oXw/vJ8z8ZW3wi0bzh4TyKFsFJzjNmZ8c0FIRDg pEmxddPb7zBybDQ6ZDUO/cWgGWjDfaaAWxhOYgLW5yE5ynVE+9rvASezKmO0mIjCniV4f9is4O4 t3qspeu/xPAnkPxWWFQ== X-Proofpoint-GUID: 9IH-nZdOCWQqYjgmuDa_c7spL676pXAI X-Proofpoint-ORIG-GUID: 9IH-nZdOCWQqYjgmuDa_c7spL676pXAI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772365476158500 Expose powerpc_excp_name() prototype and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve PPC exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-23-philmd@oss.qualcomm.com> --- target/ppc/cpu.h | 2 ++ target/ppc/cpu_init.c | 1 + target/ppc/excp_helper.c | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index fbffc9b3005..0f44096bad7 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -153,6 +153,8 @@ enum { POWERPC_EXCP_SYSCALL_USER =3D 0x203, /* System call in user mode only = */ }; =20 +const char *powerpc_excp_name(int excp); + /* Exceptions error codes = */ enum { /* Exception subtypes for POWERPC_EXCP_ALIGN = */ diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 89a8b14a393..7f3036d903e 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7530,6 +7530,7 @@ static void ppc_cpu_class_init(ObjectClass *oc, const= void *data) &pcc->parent_phases); =20 cc->class_by_name =3D ppc_cpu_class_by_name; + cc->exception_name =3D powerpc_excp_name; cc->list_cpus =3D ppc_cpu_list; cc->dump_state =3D ppc_cpu_dump_state; cc->set_pc =3D ppc_cpu_set_pc; diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 4892cbaeb07..76ac41e964d 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -34,9 +34,8 @@ =20 /*************************************************************************= ****/ /* Exception processing */ -#ifndef CONFIG_USER_ONLY =20 -static const char *powerpc_excp_name(int excp) +const char *powerpc_excp_name(int excp) { static const char * const excp_names[POWERPC_EXCP_NB] =3D { [POWERPC_EXCP_CRITICAL] =3D "CRITICAL", @@ -108,6 +107,8 @@ static const char *powerpc_excp_name(int excp) return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; } =20 +#ifndef CONFIG_USER_ONLY + static void dump_syscall(CPUPPCState *env) { qemu_log_mask(CPU_LOG_INT, "syscall r0=3D%016" PRIx64 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772382; cv=none; d=zohomail.com; s=zohoarc; b=WVBIwoeZj7EwaQnzd+Wq1Y8G3wFT8hMzx7NbBCRxRZGlZtuf8SvSr2ySghm/74chCxe6qtfVFrPPhMaT3KYhSZ1VRfk5D9NMUbjBDqYdDXBBuQ+Tq6QAb84en3rp1PZ+WA1Poi+IA7SdYUeoGGcTFBbCXaXSxLCGzkaAzjyQ3oI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772382; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=m/FmiOituai+pOcvcRi/Tc03upJT4eaQSvGRgqTC3HQ=; b=jtwI0KQ1QEt/RAF5xc12JR2OHJEVUEujvZWVN9KirotKYjpcY9CvpYvgeUI7eVArTUNgjflNYBo4xHdB+0cU1zfXPzgZwlpizO5+7+AUISNEavuNv2DsouTNuDPaj7oim/VM2gEmHiE6af274vaMnIZXnQk4MihdvPVwSpBGBQY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772382762906.470154686956; Fri, 23 Oct 2026 09:19:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHyy-0006Pb-2I; Fri, 23 Oct 2026 12:19:04 -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 1xKHyd-0005Dm-E3 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:45 -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 1xKHyb-0002bu-HA for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:43 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6rjx1492220 for ; Fri, 23 Oct 2026 16:18:40 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauyeu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:18:40 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93cb93c874bso382115185a.0 for ; Fri, 23 Oct 2026 09:18:39 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312e820f9sm4979225e9.1.2026.10.23.09.18.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= m/FmiOituai+pOcvcRi/Tc03upJT4eaQSvGRgqTC3HQ=; b=AmJp2V4naOKvY1uQ xBNeaqyiKX2hEjt48hm2OGXWGf7ZxoMSla5RdvJQDhFePt/3TxAXIv9Bhyam9I0X HCKiSBRtPkC1AUrfw6jD1tGxFdX2CcdFmYSl98W0YgBqSSo4Tdh7/0+9W+TvMNcd r07t2wFw5SuAy1Np8bqpVLrPPZLHx6Paqa16RYGY3rkZ/0TqvMGwBixjPQYUsMhr xuIDvqAC8akkNwbvq89DZbt4dkzJ3EQO16LcPyIxcOklspmo7qyduxU4J4CgFVMt gQdZW+Kk5CE3wB5mlebEDxQJ6kdExWZQREmIAcXVC1GKSAbkb5LS0RsicHQvUP9U egt/SQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772319; x=1793377119; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=m/FmiOituai+pOcvcRi/Tc03upJT4eaQSvGRgqTC3HQ=; b=iDOyc0u3F8JaNqBD2g1QIg9U89sFPC2i2NXUlSLBxySZA7YC9cKlrqaox0Dj2zQtq3 8txBNDOsYniOuQqKylDOI4sFMjInkdi0UTQ4T4E96shER0MGjStENJM1Qzcsb08ucVj7 ZXlUqy4kCQs/FIml81hUJlZLHtDvuiCo8ZUbC7XOCagvUiF/SKPL8DSu/U05A3BWKBQN 3d3VfIxNSLN24F8t6unyUoSUup9JP2QV+N4lWh9nUC3ScrcrDB7nGg69GCZlwKSCZgWY W+jjinLAIs8stEhLxhXlLw0dt7zoZtwW69V4rTFdA9ixLahlbX1VfDoSDbcWtf7JrUPz nHQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772319; x=1793377119; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=m/FmiOituai+pOcvcRi/Tc03upJT4eaQSvGRgqTC3HQ=; b=f84dI+CM4kCfZrMr8DsC6CpE+JmE4w46Q+PagJVTx5a6QfNRWa92Agip+MQVObYa2E u4NCPf89vw6oMBvNWPwsdT2qmih3tzg/3ctB4/YsTqoXEEGOqLJCB//JtO6s0vUlW9kA Kr77lqswiyREN2Hex5K3cVk9nqp2LFShwn1F7kbAlftiHqDoxWMMIWOQerl2csHjnXn/ NZdPeTjQkrdtcp6DSr1/sUmNC7q0KjKaf5Cr+UyzJbV7jch/YKqW4L869xpIqi04Xp/O WXN8VQ9ToNJPxIzhvqLRYLPJFAGTentq53Q6R2018UWvGjyctglbLLqJZA58DAY7oMzc 6ktg== X-Gm-Message-State: AFq9FYLJP63qbTxJRqGegZv3ry/ELTpi/Y1/t3+sw3nFPN/Myjr/vcV2 BPLronzNi/dBdP8OoRN0TUMid6TvcS7PNiy5uAP+5tlePs7Yj0nu04fgmJ3b0QCAKaswhqg1hL5 lHQX0za6BtrXJ29atP6oqCH6wqkQPiCjNU2L3uwbjsWUrWTfxV3ZKoor24ii0iw9Oos4p X-Gm-Gg: AYBFou1PftFX4g8jB6jJCiLAT9BypagxTXUQu/wzFdAo6M6hTfON9NP42kEl3+MAmVe UCjGS1uOwU/p/nc+mLsuqj+3C+cJMsm81b9hnmlqPl28Z4ePRkozAqXzbm6R+2Hek+i/4nFoT6q mFXjyLvPe8Wjy3dJvaWqhKit5fN1xEukYdJsSyJo6Uo/mnkNG4peYlkGc0anexSCBMAwcJeZjG2 BNaHO3sfG8h7Ayuh1UDigC/N78K6Xzv+0jdW2Fm4COUXvxFpVjTHm+/RsCJ4c+tRkMT3kBDscga ygfeU7MZMhy10oFZ5aeQMa+wZQZSz8qWuogIirkFkYn93pKivBafAi82acmNvuQp4QF4rZ8ebc6 U2u1dY3XCrVOCPDb4jiEC62LKDPsrtFY0svS+kEvm X-Received: by 2002:a05:620a:4047:b0:93f:1789:8359 with SMTP id af79cd13be357-93f6278ad0fmr992196485a.31.1792772319091; Fri, 23 Oct 2026 09:18:39 -0700 (PDT) X-Received: by 2002:a05:620a:4047:b0:93f:1789:8359 with SMTP id af79cd13be357-93f6278ad0fmr992191785a.31.1792772318524; Fri, 23 Oct 2026 09:18:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 42/83] target/riscv: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:50 +0200 Message-ID: <20261023161332.60153-43-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb88e0 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=FRSEYCzRAAAA:8 a=y9j7XMdMAJhvWi9Kj2cA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 a=H4N_Y-AU75W7NKDNhZlT:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX45grUhZJmwQN bzSTfIzYF/fCh4Ns+MPJK+pHSYnv7uw7QTFZkM9L0DPnSzGKU54wwyi26951RcrMDRLZpBj+48c EAMM3YpRe7hWiUj05b2Y73hh5yA8DbU= X-Proofpoint-GUID: h8QMSCYAR4D8tjUYeOGoZ62EZRVuSDeb X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX+8aCMLLK94t2 /8XQ3UTlfe8xCxu1BD/QBOjoAdV6Tz2SdTBczjZ5XwvXY4dwT4DrCRkzv9SLhrcYb/LFkZsVNqd u6czCyybQyn1RgWO4yzyVgYRRHzny3zSCmu9rTJNLoU5vcOq1EOgObN5+JaRzkRISnS2uSXgPk9 K89vs0YFC6r/12EphBLQ3h1I/lF3InJRbvDuk7nu+dSMNcFmLTBSTP2ObEMCMQOQBbUV0/GrFoM fk4zRIglWbRPXlHafO5A1m4QHkCU5jli5YutbMWecavJ9pWlEffM459X/2+EOG2NT+3DK1GWqYF I5FeZlICSCFMN/lGauYDd57O34yIqb8nfjp74f2kxmd8K0yc57c2eAf3XnFULjqle3u9pKr3zBW STcUTYNu06N0EaeVtWQHltrS02GKYHYPzSVIeZ3tCpqYEzXAv5t/W8ZKoOtI8HZJ2TfQs6InXpt kE1NHZ5layIkxR8YPDw== X-Proofpoint-ORIG-GUID: h8QMSCYAR4D8tjUYeOGoZ62EZRVuSDeb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772383863158500 Factor riscv_excp_name() and riscv_intr_name() out of riscv_cpu_get_trap_name(). Register riscv_excp_name() as the CPUClass::exception_name() handler, so the common exception logging can resolve RISCV exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Chao Liu Message-ID: <20261022215115.19680-24-philmd@oss.qualcomm.com> --- target/riscv/cpu.h | 1 + target/riscv/cpu.c | 20 ++++++++++---------- target/riscv/tcg/op_helper.c | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index b65d6319940..49a1186bdbb 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -672,6 +672,7 @@ G_NORETURN void riscv_cpu_do_unaligned_access(CPUState= *cs, vaddr addr, bool riscv_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); +const char *riscv_excp_name(int excp); char *riscv_isa_string(RISCVCPU *cpu); int riscv_cpu_max_xlen(RISCVCPUClass *mcc); bool riscv_cpu_option_set(RISCVCPU *cpu, const char *optname); diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index f9946f54ced..ae750f85c6c 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/cutils.h" #include "qemu/qemu-print.h" #include "qemu/ctype.h" #include "qemu/log.h" @@ -398,6 +399,11 @@ static const char * const riscv_excp_names[] =3D { [RISCV_EXCP_SEMIHOST] =3D "semihost", }; =20 +const char *riscv_excp_name(int excp) +{ + return STR_ARRAY_ELEM_OR_NULL(riscv_excp_names, excp) ?: "unknown"; +} + static const char * const riscv_intr_names[] =3D { [IRQ_U_SOFT] =3D "u_software", [IRQ_S_SOFT] =3D "s_software", @@ -417,17 +423,10 @@ static const char * const riscv_intr_names[] =3D { =20 const char *riscv_cpu_get_trap_name(uint64_t cause, bool async) { - if (async) { - if ((cause < ARRAY_SIZE(riscv_intr_names)) && riscv_intr_names[cau= se]) { - return riscv_intr_names[cause]; - } - } else { - if ((cause < ARRAY_SIZE(riscv_excp_names)) && riscv_excp_names[cau= se]) { - return riscv_excp_names[cause]; - } - } + const char *name =3D async ? STR_ARRAY_ELEM_OR_NULL(riscv_intr_names, = cause) + : STR_ARRAY_ELEM_OR_NULL(riscv_excp_names, ca= use); =20 - return "(unknown)"; + return name ?: "unknown"; } =20 void riscv_cpu_set_misa_ext(CPURISCVState *env, uint32_t ext) @@ -3130,6 +3129,7 @@ static void riscv_cpu_common_class_init(ObjectClass *= c, const void *data) &mcc->parent_phases); =20 cc->class_by_name =3D riscv_cpu_class_by_name; + cc->exception_name =3D riscv_excp_name; cc->dump_state =3D riscv_cpu_dump_state; cc->set_pc =3D riscv_cpu_set_pc; cc->get_pc =3D riscv_cpu_get_pc; diff --git a/target/riscv/tcg/op_helper.c b/target/riscv/tcg/op_helper.c index b8b3e43ccd5..f85f5cd83c9 100644 --- a/target/riscv/tcg/op_helper.c +++ b/target/riscv/tcg/op_helper.c @@ -41,7 +41,7 @@ G_NORETURN void riscv_raise_exception(CPURISCVState *env, CPUState *cs =3D env_cpu(env); =20 trace_riscv_exception(exception, - riscv_cpu_get_trap_name(exception, false), + riscv_excp_name(exception), env->pc); =20 cs->exception_index =3D exception; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772357; cv=none; d=zohomail.com; s=zohoarc; b=cfYxHe5qBvRLjbZ24qo8I5SbUD5X76evdKndaIHPYzhDd9P4Ub8h2LzSTSqU8dcBBj6jOfudic6PiSjPYJABFTPkeIaJZU6uxQquuZOJRz31kv1fUFC8slqX7BYHdbTuKIktZ2DaA8HNBoKpv+unXAEUmrKxMjgGv3FQVL1XbB8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772357; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=gmaXSipMzcOAho28yq0eKwdCXZAQ22Ci15FanxjsLr4=; b=B1NUxdKVo/ctT/1nZp2zvzV3x9EgWir0ODm/N9I4qZUuReEeOsxVJTgbe9yf48NHCj5ceW+w/lXxbYk2zkDq7lawo2TQzOcqMKyzu79/jvi9V8r1dFjDo46e6ofdWNCZ8ZtGe5qD7wU9eSlIfEY0ssioxWUriaxp9W8whTEOTtU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772357848165.67814494705647; Fri, 23 Oct 2026 09:19:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHyt-0005vu-Jl; Fri, 23 Oct 2026 12:18:59 -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 1xKHyn-0005Sg-QC for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:54 -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 1xKHyl-0002dO-Hq for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:18:53 -0400 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5xlI2109294 for ; Fri, 23 Oct 2026 16:18:48 GMT Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqms4gp3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:18:47 +0000 (GMT) Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-91b7e7d5f56so26983496d6.3 for ; Fri, 23 Oct 2026 09:18:47 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d405cc0sm715933f8f.30.2026.10.23.09.18.44 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= gmaXSipMzcOAho28yq0eKwdCXZAQ22Ci15FanxjsLr4=; b=GASTqxY/KeE7HsWz Xqc76MrE9Aec+JnD+wV1oyZKn/ZERv+Mw5qdyF/590cODgLeUR3YRFidjcKokci+ 6eABULvHT3KHrpunPbtgjRGYB2mz5QiztBSSWwSVtzejz5W3p/FswvNNGzP5AL5d JRtSIt5+RBjsEQVhZVk+B94FOJnEDSjbwAv1w2udRparIfIwPbSfYAr2KYkZYLfb dOcmAr4avfh9pougXkv/D0tt8yVHNxAEMFI0nwp12Wwr+z1+ndOJU+JaL8DvHJvL o5aJTtEwGMptnxagYDxYuRzW6z/LmKrE5RNV+JLH+rG7Qzw+OTaTu0PS3zEONaXh ug0T1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772327; x=1793377127; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gmaXSipMzcOAho28yq0eKwdCXZAQ22Ci15FanxjsLr4=; b=jZERmFfkG9QFwwUDMIGwIr4GMoJde9Xl8ClDetvdjraKalxTUq/qrEKCv08+kfgI0u lQ7rzfEa6bRP8xb3a1dLcS9yIP2dr6TmsCUTaT5Wy7VXiAQU5DyFrzC7CcOGaVnGoXtn Je2qD2LvWMq8F+FChZS1WzGCi+KzFOFkqjnZDFP4OuX9n7ZpvkjnNW07ge5nsquCuI9B rTiH/axfHYRgw2h/02auwRqRxfj9XZJKCtMhkspLkJdVN60j2kx8PQNcmEIhrIvCrao6 DLvMfbq38nRtceDCqTtQZxLQuTV+ya7CGXY5CTG6mYMPat9a+HZROsnrdN0g6ixmX0gi q4fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772327; x=1793377127; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gmaXSipMzcOAho28yq0eKwdCXZAQ22Ci15FanxjsLr4=; b=yDuYbXgjy61crli2gPbBog60qr3AXlb35B8FA3vSQL/IO24Q7KfssqmcOabO+ghUU+ JtIPfKuCOjjmDzoSk0lUDH7ItwsbHzuNqwOlpgp5IqMqDOPXfvGMIWTgxSanjBdEGX9j TQ8lgRdoygqImOMN9LoL7vDLUslEOwb9ldKcsmwPY1CVMSb+VqSNeV837MDJHSqM+iSe TI7bPrAFr9il6q7tDPVciojmh6YKB99WEEbEZtwqQ56zvmdYqMs8Pyqr5h79JDSbUo9+ VpUhdOPmCyc8WsRr3SYvUglGVdMIj3XCTH8uctaiMRnMlrvOkPP53HhNZsOMoJsEoyYA TfzA== X-Gm-Message-State: AFq9FYLCgbJaoCNNdu1dZbGpCYEtb5KK0X57leZjY9hmsbgztf8asa8w bGuqmaI/iBc4HC6uMUwpcW6mD8pejLQ69fvLBEXQMFAmkzpUevNKXzFAujbgxJCx3WGUlQgrJXa qtY9eOs+BumgoXP3xLRvgV1tISgWyp7jzZoKqqzdR+9GnHxlFu/rPmitXKc8vjX++sMWi X-Gm-Gg: AYBFou2AzN4qydnVhwywNngq+J5xfbTLaL9XtkHRbgsoGQU4dsTGb/8Qkl7NMADirR3 7CWACZ8l+QcdJEvkyAD/WzwJfeG86r9+PqtMgWph6OuJYoVGRpyLIeo2zLo+M3BcLnPxPqK+2Yx TQvIYza6Oyf7oKPrh+Dy09FSmCROzEfJjCvs6AzapbGC8F1HZAPqKbq0dbvMtp7G4IGK6s1wWqu 6XCNI2lklTnDjukD5fidoswDJrIhAC1xuzmcQtsJ4aJt8Xnd4oL9Es184Jfn9mxxpgRCyzpT1Ni 2eHdLtB6L2zjFKVoK6yNHcBqoDqBDwt2X7/RLCTSQB33AwA0eQdusNdKEvwnjLm1Gqnx1rgto1R e9tMwZSxIlnnW0oBXrXaJs+xVVgzecCk58W94aiej X-Received: by 2002:a05:620a:1d09:b0:93e:d364:ca10 with SMTP id af79cd13be357-93f6f570973mr497623985a.12.1792772326935; Fri, 23 Oct 2026 09:18:46 -0700 (PDT) X-Received: by 2002:a05:620a:1d09:b0:93e:d364:ca10 with SMTP id af79cd13be357-93f6f570973mr497619285a.12.1792772326323; Fri, 23 Oct 2026 09:18:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 43/83] target/rx: Unify BRK and INT trap handling Date: Fri, 23 Oct 2026 18:12:51 +0200 Message-ID: <20261023161332.60153-44-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX9ig2jdGhzWFo 4vg8+7B503pcCQxdGqjj+hMzbVY8WOhYqWCyHEa5BSPpDXi5XR4VCRvGI+2Qb0WFVp3CABqmrk3 4pL7Mhmh4JomeoK4Wjg5NYDkWwxp/sIn/YzwMvuuhkD/FvieC+eRrzrQNa1C5zIJtFK2M2Qphqz xTidtBRtJrxbsjb+wmVFO4JZeI8Sw0qQCSQ2zYK0IM6/kxOEsgn3BqAz1GEmfMk+KfvSM5eSBJV t2S50vVmzXiT7iyJco1kIMmY2YHt89aUqXq0Z2lHQPJBqZxV6bvJEX1x7v5STDxyWVNq5wpkt+V S0SAoLobMz4Tk4KE7xfdxpIJmYhKU0lUX8mB3MfvP+94L+gTXAz977TOdTgqutdvlF53lwfzXZE O6OY6oV3H/REzBDcwu8pBUBd3TIHqjrH9cN+eJVd804zMlTP0PnMS9faCQQXr+kpKr5xCW052cG bPYMQhYvcKVTwG9XKVA== X-Proofpoint-GUID: sxx9BgOjxG2WVYH-642YKKsS-Na5QkjG X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX0oGnd2AvXGdK PyY4tUPXtw0Dvr/BM2NkyNIvfeN0FVfLKOjiuS+AzmaDJ1X0rQ4H3wuWroypXlmQLSQM1LxpCiF 0D0SiH2C/uRpnblXA0yWTjJpqFAWQVk= X-Authority-Analysis: v=2.4 cv=UdbE26SN c=1 sm=1 tr=0 ts=6adb88e8 cx=c_pps a=UgVkIMxJMSkC9lv97toC5g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=YEB5RgzmAAAA:8 a=jDMzgGwzCE0q-kHIl9cA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=1HOtulTD9v-eNWfpl4qZ:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: sxx9BgOjxG2WVYH-642YKKsS-Na5QkjG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772359430158500 BRK is equivalent to INT #0, so route both instructions through the same trap helper. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-25-philmd@oss.qualcomm.com> --- target/rx/helper.h | 3 +-- target/rx/op_helper.c | 7 +------ target/rx/translate.c | 21 ++++++++++----------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/target/rx/helper.h b/target/rx/helper.h index b1ef843be1e..13f019ff81a 100644 --- a/target/rx/helper.h +++ b/target/rx/helper.h @@ -2,8 +2,7 @@ DEF_HELPER_1(raise_illegal_instruction, noreturn, env) DEF_HELPER_1(raise_access_fault, noreturn, env) DEF_HELPER_1(raise_privilege_violation, noreturn, env) DEF_HELPER_1(wait, noreturn, env) -DEF_HELPER_2(rxint, noreturn, env, i32) -DEF_HELPER_1(rxbrk, noreturn, env) +DEF_HELPER_2(trap, noreturn, env, i32) DEF_HELPER_3(rx_fadd, f32, env, f32, f32) DEF_HELPER_3(rx_fsub, f32, env, f32, f32) DEF_HELPER_3(rx_fmul, f32, env, f32, f32) diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index 5a7a87943fe..fb1fa4ffa69 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -455,12 +455,7 @@ G_NORETURN void helper_wait(CPURXState *env) raise_exception(env, EXCP_HLT, 0); } =20 -G_NORETURN void helper_rxint(CPURXState *env, uint32_t vec) +G_NORETURN void helper_trap(CPURXState *env, uint32_t vec) { raise_exception(env, 0x100 + vec, 0); } - -G_NORETURN void helper_rxbrk(CPURXState *env) -{ - raise_exception(env, 0x100, 0); -} diff --git a/target/rx/translate.c b/target/rx/translate.c index bd445bc0634..0672c5c5653 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -2170,26 +2170,25 @@ static bool trans_RTE(DisasContext *ctx, arg_RTE *a) return true; } =20 +static bool do_trap(DisasContext *ctx, uint8_t vec) +{ + tcg_gen_movi_i32(cpu_pc, ctx->base.pc_next); + gen_helper_trap(tcg_env, tcg_constant_i32(vec)); + ctx->base.is_jmp =3D DISAS_NORETURN; + return true; +} + /* brk */ static bool trans_BRK(DisasContext *ctx, arg_BRK *a) { - tcg_gen_movi_i32(cpu_pc, ctx->base.pc_next); - gen_helper_rxbrk(tcg_env); - ctx->base.is_jmp =3D DISAS_NORETURN; - return true; + return do_trap(ctx, 0); } =20 /* int #imm */ static bool trans_INT(DisasContext *ctx, arg_INT *a) { - TCGv_i32 vec; - tcg_debug_assert(a->imm < 0x100); - vec =3D tcg_constant_i32(a->imm); - tcg_gen_movi_i32(cpu_pc, ctx->base.pc_next); - gen_helper_rxint(tcg_env, vec); - ctx->base.is_jmp =3D DISAS_NORETURN; - return true; + return do_trap(ctx, a->imm); } =20 /* wait */ --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772590; cv=none; d=zohomail.com; s=zohoarc; b=R6Lgg5YfO6JIDtpxz1yZ/RnBa16AXkA27CSvT/fb4O1xbZtom3GXd/Nma+53GGOT3+JE8+HcTyfdnL9gZOAm9uWr/fKv8ZL3TKUDgbdySMfng/mhR6ZpehP6lt6My1JFHuNv+JjHf0BYd4oNq/Jn8jj984qAau62IXk7+ioR63g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772590; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=AlE49BvQBS8lcAh5ZK+SkMfuBNmF3tbOuB/a4zz3eG0=; b=Mj9/iDTwqX52Nrkro/74qt6lGECOtQvdxBGLi932JmHVxmFPUpR2QAC4dtqT/AGxLycUf/86ckBU89nO15RYU6wtiKSqICbROKxlft3DmdUcpWTNXjz7LmPxHJT5tZxzX+foqWGTaEvcT10hDOG00il1g9a2t2S73pKO0/J3Mks= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772590111371.9567835432283; Fri, 23 Oct 2026 09:23:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHyz-0006eP-BL; Fri, 23 Oct 2026 12:19:05 -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 1xKHyv-00069M-Hz for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:02 -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 1xKHys-0002ds-W0 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:01 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5vcd4072850 for ; Fri, 23 Oct 2026 16:18:55 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7bw0xaw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:18:55 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f26dd2165so355206585a.3 for ; Fri, 23 Oct 2026 09:18:55 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d410708sm729357f8f.38.2026.10.23.09.18.52 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= AlE49BvQBS8lcAh5ZK+SkMfuBNmF3tbOuB/a4zz3eG0=; b=HOi2/T9vd0+wD8IL MDkktuHOjCnb3HqyNhIEp6eqhWcTZSuQB4SZd9rR1Bgs+lV0gvpm0V78lLYrVr2Q CF8GV10NtBdCZJlKkJepFRgTaAZcVvRiZ/9qtFAxeAY1ZLOgSsQtNItloBw3ym17 0vZWFaZ/RLLtL4Vt7UASUSfLBCfW0op87PVAZCflPXt5njgtV3qM6Js46QLbaMI3 OURikvOe+TybxxvAMnHL+xprk2hMds3xytqPD2hnzz9MbJU/J5rXv657H6SBXCNZ wdLrzeEKktMoWqFj+bbn7dQ4jYThbTKGiq55eigoVOWciqkGKaA33ifDy5uwNQRl 54xvUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772334; x=1793377134; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=AlE49BvQBS8lcAh5ZK+SkMfuBNmF3tbOuB/a4zz3eG0=; b=cmF7obuqGLD0B/TDwpJf4cA++Svqy8Nz7tRlp8ZLzBMxw+T5W+jabsXDo33Vuyeb5L DmxOdLgOdW1Q/Qyh749GfzdbtdpyXxc10fch0BWfCTtm43TzUKpMdpeRewv1NBcH8Z2F HtGrZeubKjSWbN5rBmWloqYC7BcZRK0PEwfE9ISijQscSwEmZxyO8Q0X/BhX6ro7TIC3 OC/ezda6fN8bUXztt2qfzXNcc5VlfmgCzyu36Qn8V8KyahE1m+S0aohuT/kZ40/ZaDhh rV++01bScw1pZfSfXtcCsSE+u6wMMMXX5qJJKfUSSOwvryHVFbcknqOrkDkFMtJZP5RC PItQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772334; x=1793377134; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=AlE49BvQBS8lcAh5ZK+SkMfuBNmF3tbOuB/a4zz3eG0=; b=OhzfVaobwwN5BQ8Rh96IBsCwFtYQSYwdt9TMez5LQFjkX265Uy25aNvicDzy2qPksv uY6pGIq+0BpYIiUHCb+yGN0uoYCE1xae/IZSMYD3khb0Ki9SeWf+14XfAGpcl13dks32 rVpefuaubygNPxtqLntSb+bXVhcfAENKANEXz56lJ+P2QYNK2jEhLEEvvoMlzcXUD6pU Ol+jYg6RQT2O0UsVwPYrsa2xI4dPWwUbhO2IpXoxrBU5Pi46mcnVZraTppnUO12WIIJL m+OrwofYYdFy9L+0WGxyUu8RxXyRQ2A5Xu4YdLZ7qDnTNWt9QXpcuNbTVIGzN5m9jRQV QTiQ== X-Gm-Message-State: AFq9FYIf2LGUEmwxg2Dn4n1W5MqOfLNjzPXAY2EsZJFcM9PEvFhoDAxB 4CGeln9tD+80VZlTmhY4WKKqyxAcWcDwnXsppC4ZyBmHbV8NXaBEvDOt3nge0wNRyPh7DSF1mqV jxxPMkmjh9NcC+VAnneKE3mvOAyKZWwtFJV57NkdARGh2ClbGay3ZQUwWfOeSmpwPW4SN X-Gm-Gg: AYBFou1uMXW5TYcni4tDFxrzYyI22utZVwvOwap36MeFMKoNJOQTVbxEf0lHOUxrhnQ 4Ot2GP/e1ZxamvxlHtA/1OJRkM1iDfpFHbKpiY13BoNIEmopsdD6m54Umw/ik7ZrTSCAytlBCKm BtfR4sgRtzcdaxkZxC3CWxVRD5aUBIjNlMYffSvhUiklAZo/1NiVGII85B8Y/E8BxgmFye/zjs4 9hrkZF+QYaHX1RNQAEw8OxLzt21pT8U91irS59GSKQg1+/wtGo/hDnAOXnlS8HkoQpOHXMPdNz/ p/UkFx3NwaV2r5h3b3t4dxBGM+Rgu5WxkSCa5Yo458LPaNwpZlsV/ghw6vMszoiPzmdvkZvMmjj qQFjkeUzINCu+mz6zxWpkqAudypG4950/pNiIdVjf X-Received: by 2002:a05:620a:6009:b0:93c:b721:b10d with SMTP id af79cd13be357-93f6f79df64mr466958385a.8.1792772334092; Fri, 23 Oct 2026 09:18:54 -0700 (PDT) X-Received: by 2002:a05:620a:6009:b0:93c:b721:b10d with SMTP id af79cd13be357-93f6f79df64mr466953685a.8.1792772333438; Fri, 23 Oct 2026 09:18:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 44/83] target/rx: Define exception vector constants Date: Fri, 23 Oct 2026 18:12:52 +0200 Message-ID: <20261023161332.60153-45-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: SbfPpq-m_17BhGLnVZ2Vo1sLcpdvmPi6 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX4TM0BLery9BV HZWRa6s6gNhfn5XET73aJoQIAXv2TauCewSkA9TvgpDLA7BlQKpVreu7xByEI8jLdOK/hSI9ZVd qkIvXmcdmjTexREWnVI+ZLPbYzi2Upw= X-Authority-Analysis: v=2.4 cv=QdTzLcbv c=1 sm=1 tr=0 ts=6adb88ef cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=YEB5RgzmAAAA:8 a=BYMmWKsKsDm6Gxpir0kA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: SbfPpq-m_17BhGLnVZ2Vo1sLcpdvmPi6 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXyjATQibtidBW VtGEk/WCehk93+oMdWGv1bMRZ4uzcGqbyC/HBEKu3AFaDOxSR6u93bD62FjaQCcFpSg5VvPVwkg u4oA7V8uuEkjjhMLn0oCwQuta/BTBx3fxdi7qyzpVsOqq1TxHPbxJ90Ih5RjbOpcXl3FoPE/p0f H4ifljNJR0Flj06sIw6bTkfdInT9JBnhw0yyGmz3QD16GY7wfrsLi6AILo8jHTyzea6PO4SozXZ 37i5pm06WN6MRtwbaRbact0tQVRVl2NkC7m7WRP0a8L7EAHcxZRJq+8Qfdg/zgbgxAXJ5SyocKX c1mhdv7nUXmsqEaaRjBIAJb/NFxU+LuO7Mp0BVFy97aYswLrUX9ZjPbhSb7S3tzR11o+5MHfymB 6aju/F3idPPov6tC2j0Cvfkwm7dUn/hzcQXhgDfbljjE4IwE5XJrNAXaz+74w0rjv1zDmatAo42 NHmUjGhHXJH5Ose0pkQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772591851158500 From: Yonggang Luo Name RX exception vectors and trap ranges, and use the definitions throughout exception handling and exception raising. Assert that exception indexes remain within the defined range before accessing their vector tables. Signed-off-by: Yonggang Luo Co-developed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato Message-ID: <20261022215115.19680-26-philmd@oss.qualcomm.com> --- target/rx/cpu.h | 13 +++++++++++++ target/rx/helper.c | 21 +++++++++++---------- target/rx/op_helper.c | 10 +++++----- target/rx/translate.c | 2 +- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 64ba48a7329..0d9f4898a26 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -71,6 +71,19 @@ enum { NUM_REGS =3D 16, }; =20 +#define RX_EXCP_TRAP_COUNT 0x100 + +enum { + RX_EXCP_PRIVILEGE_VIOLATION =3D 20, + RX_EXCP_ACCESS =3D 21, + RX_EXCP_ILLEGAL_INSTRUCTION =3D 23, + RX_EXCP_FPU =3D 25, + RX_EXCP_NMI =3D 30, + RX_EXCP_TRAP_BASE =3D 0x100, /* Up to RX_EXCP_TRAP_COUNT= */ +}; + +#define RX_EXCP_COUNT (RX_EXCP_TRAP_BASE + RX_EXCP_TRAP_COUNT) + typedef struct CPUArchState { /* CPU registers */ uint32_t regs[NUM_REGS]; /* general registers */ diff --git a/target/rx/helper.c b/target/rx/helper.c index 0f99279bbaa..bc76dd28ab3 100644 --- a/target/rx/helper.c +++ b/target/rx/helper.c @@ -86,13 +86,14 @@ void rx_cpu_do_interrupt(CPUState *cs) env->isp -=3D 4; cpu_stl_le_data(env, env->isp, env->pc); =20 - if (vec < 0x100) { - env->pc =3D cpu_ldl_le_data(env, 0xffffff80 + vec * 4); - } else { + assert(vec < RX_EXCP_COUNT); + if (vec >=3D RX_EXCP_TRAP_BASE) { env->pc =3D cpu_ldl_le_data(env, env->intb + (vec & 0xff) * 4); + } else { + env->pc =3D cpu_ldl_le_data(env, 0xffffff80 + vec * 4); } =20 - if (vec =3D=3D 30) { + if (vec =3D=3D RX_EXCP_NMI) { /* Non-maskable interrupt */ qemu_plugin_vcpu_interrupt_cb(cs, last_pc); } else { @@ -100,22 +101,22 @@ void rx_cpu_do_interrupt(CPUState *cs) } =20 switch (vec) { - case 20: + case RX_EXCP_PRIVILEGE_VIOLATION: expname =3D "privilege violation"; break; - case 21: + case RX_EXCP_ACCESS: expname =3D "access exception"; break; - case 23: + case RX_EXCP_ILLEGAL_INSTRUCTION: expname =3D "illegal instruction"; break; - case 25: + case RX_EXCP_FPU: expname =3D "fpu exception"; break; - case 30: + case RX_EXCP_NMI: expname =3D "non-maskable interrupt"; break; - case 0x100 ... 0x1ff: + case RX_EXCP_TRAP_BASE ... RX_EXCP_TRAP_BASE + RX_EXCP_TRAP_COUNT = - 1: expname =3D "unconditional trap"; } qemu_log_mask(CPU_LOG_INT, "exception 0x%02x [%s] raised\n", diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index fb1fa4ffa69..06841088ac0 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -115,7 +115,7 @@ static void update_fpsw(CPURXState *env, float32 ret, u= intptr_t retaddr) enable =3D FIELD_EX32(env->fpsw, FPSW, ENABLE); enable |=3D 1 << 5; /* CE always enabled */ if (cause & enable) { - raise_exception(env, 21, retaddr); + raise_exception(env, RX_EXCP_ACCESS, retaddr); } } } @@ -432,17 +432,17 @@ void raise_exception(CPURXState *env, int index, =20 G_NORETURN void helper_raise_privilege_violation(CPURXState *env) { - raise_exception(env, 20, GETPC()); + raise_exception(env, RX_EXCP_PRIVILEGE_VIOLATION, GETPC()); } =20 G_NORETURN void helper_raise_access_fault(CPURXState *env) { - raise_exception(env, 21, GETPC()); + raise_exception(env, RX_EXCP_ACCESS, GETPC()); } =20 G_NORETURN void helper_raise_illegal_instruction(CPURXState *env) { - raise_exception(env, 23, GETPC()); + raise_exception(env, RX_EXCP_ILLEGAL_INSTRUCTION, GETPC()); } =20 G_NORETURN void helper_wait(CPURXState *env) @@ -457,5 +457,5 @@ G_NORETURN void helper_wait(CPURXState *env) =20 G_NORETURN void helper_trap(CPURXState *env, uint32_t vec) { - raise_exception(env, 0x100 + vec, 0); + raise_exception(env, RX_EXCP_TRAP_BASE + vec, 0); } diff --git a/target/rx/translate.c b/target/rx/translate.c index 0672c5c5653..a350f6b4d26 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -2187,7 +2187,7 @@ static bool trans_BRK(DisasContext *ctx, arg_BRK *a) /* int #imm */ static bool trans_INT(DisasContext *ctx, arg_INT *a) { - tcg_debug_assert(a->imm < 0x100); + tcg_debug_assert(a->imm < RX_EXCP_TRAP_COUNT); return do_trap(ctx, a->imm); } =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772371; cv=none; d=zohomail.com; s=zohoarc; b=G4GRrB9qlg8ornOlJJYvtO0RXv043QAFUmmq0jbUTCdY5LipecJJmKNHvn+ktyTc/A3Ci1MlV0gBiusT7XJDrW+NDOlmwBHl0YMF1mhDdI4PchdfLiXnwtLqUMW+4gAQBiClsHQhRe04hdr43MCFsFeE10QtnPtIp0aryN3B81M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772371; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=XFmqOrUwfsQuMPiyPh5TP4sIOt+boNYJeHuGOv70aLY=; b=mBed0ym5WGUYoaXLCx1xw6JwUMAO0p4CG+h1976rsAiIoS5mzdIzDVbCHrMGlm84ga9+AMdVphQHpEVjYrP4o/q6o0DhxhZIsryZcySKF7HhVZ1O+bgn2blGqHUq31SStxP1KgbiNYKZrTN8FUKYlvywOGIdeeDokP5Le6S1X1A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772371264719.767352617511; Fri, 23 Oct 2026 09:19:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHz2-0006u9-Mj; Fri, 23 Oct 2026 12:19:10 -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 1xKHyz-0006lE-TE for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:06 -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 1xKHyx-0002e7-Uq for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:05 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6rYv1492211 for ; Fri, 23 Oct 2026 16:19:02 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauyg1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:02 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-9308eafb465so307994685a.2 for ; Fri, 23 Oct 2026 09:19:02 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2958bf25dsm20223105e9.2.2026.10.23.09.18.59 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= XFmqOrUwfsQuMPiyPh5TP4sIOt+boNYJeHuGOv70aLY=; b=LUqLEnDNHXJrnGlh xgY11qLO0gCeSTuPWuOT07cQ7EIbiydg6Ah9XdDFzY2do7SgcQHj0KQo5yUg7oqn iwqYvCf+EKaEt1K+fYLsVlKxp634PkJMZqHwn47VhyYZ3zXTNdiBhLyYZ2Lyayek DFNUMAD8+1g11TyZi0aYkF/piR8HZLrpah7FVuBzMq5QildfF7vfnyJFq7oU8YCe HiUmCr+teE54hfERyjuyMkwz6v97fDyZ6od6yz5EDX1G5Nmiw9ltS25Sl0wJk+/K D8t9Gw0jEq+Q5HLzVWhhW1I3jnXi7ScCMC9OiRbwNB0LniOthv4vQmQNFvcUYEoZ enx4YQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772341; x=1793377141; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=XFmqOrUwfsQuMPiyPh5TP4sIOt+boNYJeHuGOv70aLY=; b=b+huohZC68unfGaZoM/lBw4k/Pqx8evsG/TUkt/PoSdGRVkrHPjzCkORLbpJAnQRp6 uYRGQZIO1FWBhS7IGUlgHADxK/QL40xFJVMslNGmM8nstWodu0doCuK7qcWHIB5bK9z9 M0M7TE08grU7iUkNiG9GAL/j6wfRrtV38GjGlvbZj4VFb3JfOSA6yvvk7yhVo1mD6DSc SJi6smELz9O3oSovqhc2AtOLFKi1oBsHouKn4l9b6kzVEugyGvRTQ7rT37CkLR0Ejkmt 6KgJ+CG8GgErngJ30dDbuGE9IU5GwHFS/rUuaMKmmQK+9T5D32jkaMRFeXoV+iKdbwXp 104g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772341; x=1793377141; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=XFmqOrUwfsQuMPiyPh5TP4sIOt+boNYJeHuGOv70aLY=; b=gzJBbGnoDr6fxkn3+BAG7g9Bn5hRZrN+Z+OtCAB9XmPgeMweY/VhtzwF6Lhdlg977C x/ntAnHC624nzwuQWz/mn79Dtccus3leCGK+jB4Sy0kFwsv0H/hFQqxgX127yEC5GO1n rsbTF+R2mCNnJiGAWj4OHtpnmjNOUZoPp4/88WdF3abzEXGkDl13IOkKwef0oCb5gkoC NZUrtK0GOIQk7aBUrQf4w/+DDkbEVVlNeN6jMWD9WYavQBURq3fiQH1y/rM4h1MxddnA r0MtpLS6A5jmBr5R4HaMkaae5MjxEXOtNaC/ybxm6EfEcZ/KlQbKT6LyjsHzMUq2XBMz y1ow== X-Gm-Message-State: AFq9FYJXV5tDRpd2RIDHhdrnssMpDJxHbXa7GjoVh/Mrz6mO0pLh0IWq RRbx1KRIDm9d/DaR3Rel50w4+Cms+elNKOnWCIwgkLnS+3WIBi/XAhgxL5/p+KVzy9gczqGm18q eeIL5BPPy2Qc9iOgquDnC7R3O/nXPG8kgHeISmRju/Y7glmsl1LpHGPpGU+D/sNliJKa0 X-Gm-Gg: AYBFou0r7TUWzRTWycuBUvOfkQKXFYv2wonsQmGDu4fK3+MghJCjfD8Zv/pFf9ERg+x KPoGI1v1h7YG9hcfTYnHhb5IW5eZWji5NAOJbovMzMMmAJ5trGCspM8aLO1UE3HyxuSzS0F9Pvj vgLloaRWM+w9IBsM3J/jQkFSiqLexxtYKPJasODCshAz5UGU2Q9Dhtq5XnviKggGTpGauUoH0HV rzmZ+7pZnRJ2RHTXUaynhvhaU3YkB5jFNKnATJsTUoqDQEBmYnoTc+iPKA5aSoVD70SAJ1eVo65 t87FlH9w8hucxXtSp5XGvaWlALtPv+bS1yoL3NZfXnaW0S62vUKFzGUlmAW+h1NL4awrTK9BA3S BAzJSQBynlPPhIPUXOzQz/549d3yPYdVURPlx5iJ6 X-Received: by 2002:a05:620a:2a09:b0:93e:942f:b8a6 with SMTP id af79cd13be357-93f6f9b7400mr508856785a.59.1792772341203; Fri, 23 Oct 2026 09:19:01 -0700 (PDT) X-Received: by 2002:a05:620a:2a09:b0:93e:942f:b8a6 with SMTP id af79cd13be357-93f6f9b7400mr508852785a.59.1792772340616; Fri, 23 Oct 2026 09:19:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 45/83] target/rx: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:53 +0200 Message-ID: <20261023161332.60153-46-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb88f6 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=7bFQwIbWrMmj_3m7X6gA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXysrFFzkVKrko qp7X9PD81IX8nVDLWhxN5RWfiLstYyOG+g0Zik6EsQXU6ABlzTctI5j14R6elLl3MSXnkBdFOnZ viWkFvjh+tZLczn6/cRt8fNx4nqZeL4= X-Proofpoint-GUID: eUP06P8qHAc_x8DaUKGwtpfOl__66LjR X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXy5L8JWkk/L2e hXtBmLfx/ilcg6U9kMTAocF5RslPrsk1EN22TxnXczePd2l/0n6r9ZYiIZXzpFfkKVGXOdAnFbY GIQ2Lh40smilS1ro11+5yYDMCaE/p8MNTqk6bCA9s0Np9qqANOxjuElVdQlp02xLLGakSNaxO9J 0wx51wVOeVcVPPSyhv68iNQrdtkVhJ0llZjoYrJSIwR498a1oNMjtolBTV7ZuTHx2FYOlzCKS2q kQyjQ0YHJelxR8cyGoD2oneFq0xy1B1Q+uTRFrEPzcVaPwjujWcVnB/4nq2LxGE/LbHoj3YTX69 yYhS94CfbHS3MqQESXiXaZoXRwST8KmQP3RhQe3o32ZKY0UUfoDeCuQmi/MeTaeguYhM1e9QwIw hFBaB9wEFhEHmvPAcWsHD1EybPPKu9bFgEiThNQLYmRFq2MZYUUbhE2m1rQf5rBLo81AC5z5yUQ xFvorvh3hUr+pD8A2Xw== X-Proofpoint-ORIG-GUID: eUP06P8qHAc_x8DaUKGwtpfOl__66LjR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772371612158500 Factor rx_exception_name() out of rx_cpu_do_interrupt() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve RX exception codes to names. With '-d int', unlisted codes are now logged as "unknown" instead of "unknown exception". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-27-philmd@oss.qualcomm.com> --- target/rx/cpu.h | 1 + target/rx/cpu.c | 1 + target/rx/helper.c | 53 ++++++++++++++++++++++++++++------------------ 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 0d9f4898a26..06208380621 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -147,6 +147,7 @@ struct RXCPUClass { #define CPU_RESOLVING_TYPE TYPE_RX_CPU =20 const char *rx_crname(uint8_t cr); +const char *rx_exception_name(int excp); void rx_cpu_do_interrupt(CPUState *cpu); bool rx_cpu_exec_interrupt(CPUState *cpu, int int_req); hwaddr rx_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 69946928995..44ec3c3d62f 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -244,6 +244,7 @@ static void rx_cpu_class_init(ObjectClass *klass, const= void *data) &rcc->parent_phases); =20 cc->class_by_name =3D rx_cpu_class_by_name; + cc->exception_name =3D rx_exception_name; cc->dump_state =3D rx_cpu_dump_state; cc->set_pc =3D rx_cpu_set_pc; cc->get_pc =3D rx_cpu_get_pc; diff --git a/target/rx/helper.c b/target/rx/helper.c index bc76dd28ab3..ed9cadc0bd4 100644 --- a/target/rx/helper.c +++ b/target/rx/helper.c @@ -24,6 +24,37 @@ #include "hw/core/irq.h" #include "qemu/plugin.h" =20 +const char *rx_exception_name(int excp) +{ + const char *name; + + switch (excp) { + case RX_EXCP_PRIVILEGE_VIOLATION: + name =3D "privilege violation"; + break; + case RX_EXCP_ACCESS: + name =3D "access exception"; + break; + case RX_EXCP_ILLEGAL_INSTRUCTION: + name =3D "illegal instruction"; + break; + case RX_EXCP_FPU: + name =3D "fpu exception"; + break; + case RX_EXCP_NMI: + name =3D "non-maskable interrupt"; + break; + case RX_EXCP_TRAP_BASE ... RX_EXCP_TRAP_BASE + RX_EXCP_TRAP_COUNT - 1: + name =3D "unconditional trap"; + break; + default: + name =3D "unknown"; + break; + } + + return name; +} + void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int rte) { if (env->psw_pm =3D=3D 0) { @@ -79,7 +110,6 @@ void rx_cpu_do_interrupt(CPUState *cs) qemu_log_mask(CPU_LOG_INT, "interrupt 0x%02x raised\n", env->ack_i= rq); } else { uint32_t vec =3D cs->exception_index; - const char *expname =3D "unknown exception"; =20 env->isp -=3D 4; cpu_stl_le_data(env, env->isp, save_psw); @@ -100,27 +130,8 @@ void rx_cpu_do_interrupt(CPUState *cs) qemu_plugin_vcpu_exception_cb(cs, last_pc); } =20 - switch (vec) { - case RX_EXCP_PRIVILEGE_VIOLATION: - expname =3D "privilege violation"; - break; - case RX_EXCP_ACCESS: - expname =3D "access exception"; - break; - case RX_EXCP_ILLEGAL_INSTRUCTION: - expname =3D "illegal instruction"; - break; - case RX_EXCP_FPU: - expname =3D "fpu exception"; - break; - case RX_EXCP_NMI: - expname =3D "non-maskable interrupt"; - break; - case RX_EXCP_TRAP_BASE ... RX_EXCP_TRAP_BASE + RX_EXCP_TRAP_COUNT = - 1: - expname =3D "unconditional trap"; - } qemu_log_mask(CPU_LOG_INT, "exception 0x%02x [%s] raised\n", - (vec & 0xff), expname); + (vec & 0xff), rx_exception_name(vec)); } env->regs[0] =3D env->isp; } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772382; cv=none; d=zohomail.com; s=zohoarc; b=MZ0FNfwom/XW83RpSkympPVmJMGb7QXrnBTVA/a42PCa2BywQ0WO5QQO0gTT6HWS+46rXRT+zthLdvfU7FslfMj3j5Fx+dZDkMzY7LS5qhLSepyzlBfeOCcXQg4N51cQgic0Bo9ac3vvjNxtu3TAjJk4+BMWukRSkidNBnHl2I4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772382; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Gn9MiOR2eaQ37vMb0O5MnVQFkreDGb4IcS1IszPzllk=; b=MbUSk30VmOYZGkrXbskNuWIQyY5fuSQjRzUR6CpuMquuB/P9UqCyxJCYICKWa3g4QGzGTh6VAhhZ3LHgx6hnONnRRPQAKFLAXbYJeCTDqt1Zj01x4ysj6g7EOsxDUbeq5iUYnu9UgfvIr8r24MrE5lSK6Z8Aa9W6onu9iuS7S40= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772382580121.26129529204445; Fri, 23 Oct 2026 09:19:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHzM-0007Lv-V4; Fri, 23 Oct 2026 12:19:30 -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 1xKHz6-00072t-Jz for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:16 -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 1xKHz4-0002eN-Pe for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:12 -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 69NE5vmx4063370 for ; Fri, 23 Oct 2026 16:19:09 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrch0h-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:09 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-936aa34873bso204146185a.3 for ; Fri, 23 Oct 2026 09:19:09 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312fb9b90sm10794415e9.4.2026.10.23.09.19.06 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Gn9MiOR2eaQ37vMb0O5MnVQFkreDGb4IcS1IszPzllk=; b=e22G30U6n0yRSZmY Tl0sh8SoGMUHNKtck8LHoqtUGOqgHJG3iGxMA0q51rHcLvq8OiL2eJzUr8pJHORe zVbnZh+L8rxd9lNpo5XgfGgJYRHuQao05EenjLsmK/mwjLUCZ4+CJfxo4ukhVLvm 2KqtobMPCF/JgKnae9qpGIsJT1qXsSEb8SuWE/Brm6BYAmcnS0E8T/Qiu98wlqSx ut5vGfuyjNDV24CjEqkvyf3ursU4h4qjfnCaKt+YjniTR/EK9H7Gwax2l6+NvMPm KJixq9tdmar2Jc4A5/TfkzkBaJ5dcz9ym3FW5yCZVePRKF6jMUtPypOHXv4daNtt +GmLcw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772348; x=1793377148; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Gn9MiOR2eaQ37vMb0O5MnVQFkreDGb4IcS1IszPzllk=; b=ck5pExKsTo2yX8wNREVj5PSvzSLMq1EjJc3gDMQN3xOKnFgHH0O9XzgVmqx8v2OxtB BwlTp/97iUxHmjanFWZnrDYsAAKZsl/S9wrp6yeQVmRSaGLJhuj2tat4w7+NcRExqzh6 rHMXQeiGEyflfL2w6MXiS7GRgtqvJGnujRopAjtqs0pa3FsXGzK9lL+k7mrtEtmjJ4Sy oeIG+NhcDiIfCTvZ1OkGRmSMdZ5CqWO6svbfK5STFFjw6oj+CxrdX8D7fB8OHCki84Js z1/uVCiQkZFi6ZJDvQPdZ8IeTYi6b5g/5zIRPRzG+fa7yf+IjsLs2Upqv9ea+VHYbawW 1ukA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772348; x=1793377148; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Gn9MiOR2eaQ37vMb0O5MnVQFkreDGb4IcS1IszPzllk=; b=mYwo3Daw8EwA/r99nRjyKHT7AWa0Tmqrb7jKf59OFmBMduV4OM6reBC3DK5X5RYlNT 7+VgjDrTc3TjHf8smig3iv8nSZKhT5hbDIN5Ne7rVbV//xgSJZruPfYGxKMLNAhLQ3tB EPZySPEbyjPyl/LJEX3GPyF3daiC7eRkYYI20WZQWUfMwoWMbbK+ZN7zwRgh5FIWbulz j32Pcj2pNJ5gbVXL5VCV8m9PEn7HZM3JGdlXonqcjonVAOpKiaphlmS97lvhjt192U4O Dt9Qt23YrV/sl5yfFFy4bMnJoLHY7JkZWUIDf9fFn/iIoNRq7eIajjdhwq6V1qYO/iaf PDNQ== X-Gm-Message-State: AFq9FYIcxcYmW+o8L54Xs+xHWbsSDTbGp/AkPDwTlz66Qf9ueD+ldx3a lG1tMMrhaRfVa2hvKtNNPk4Bl7ztnhkBSdkjmIy++YHSC2FBkpt0UpXMg7o4TU9QSwiy5L5bkzt nZ1IShGTZsbQ5XxNmEifjetQvmh1l/NDAcLFj4HevMSIBOP5rH2k9IhUphH+yzuLcsM6S X-Gm-Gg: AYBFou3YCdlUXVJSzIRghFYk8FtTUoNanTeSZN0FDYHqMNU0lfoFuySDTtgR8h6sJTz jEdO9flSgaAuu7eYZLNnHp7o8UE8serCZZwAQKfbT76yyhUMJp9hm8nTHV2PcgOkYCNNaQFKe6o 3PcfhckhYAs4tNxTLhNbA3nEjJvWKLawgAo3LSDTr/dMnaZI0qsu0N/4PCU2Eyqe3Aph1Iecsg4 Kjufo8MnZz34oEscQot+7s0/UXLjWbC9ZLaTfbQKvXA+dHWZ3MnW5vuaW/6YcKgCoZeDnIKjvUZ YQS3KMJHDwkOlt4lGrqwCOgDmiI4tWAaYrJ5Fx71I0O1XyfBSiudNGTFvsfVYlMKu8hZy5NorbF 3QcleMwjEe/c/U4NcFJmbTth5z+xe8RNQl/PwExbh X-Received: by 2002:a05:620a:8389:b0:93c:c73b:39ed with SMTP id af79cd13be357-93f6f7c4facmr447639485a.39.1792772348231; Fri, 23 Oct 2026 09:19:08 -0700 (PDT) X-Received: by 2002:a05:620a:8389:b0:93c:c73b:39ed with SMTP id af79cd13be357-93f6f7c4facmr447633285a.39.1792772347581; Fri, 23 Oct 2026 09:19:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 46/83] target/s390x: Implement and register CPUClass::exception_name() Date: Fri, 23 Oct 2026 18:12:54 +0200 Message-ID: <20261023161332.60153-47-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: xURG-Z-LG3Guw4SdTbLKl8fD7hy7jcIo X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX+tUoeaZ6OkIy bF75OBGx8scmoggRTO1UbxQriqLlx2ZznxSMoPCP25MfQTZQ1Mi8tU5XrlRk9Ok/FrubYLWKs1O /JxfACI/zHTG1T7ANCnz7Xci2HzIcDI= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb88fd cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=u-qA4s_dmyebC3KKCgsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXwSZShbKEu1u7 y7iEIC9gGZl6QElJv1Pm6MiE19zd5znxjmE2iDG/AY/GcqffSjFWe+tQP4JR/VqAfDcwCZDTCYd jNL1Qq8eTuNr43rW1yJWqKfPyh2icGkkzoMtfhubmiAN9iWGc+3TjYTyMiABVlBhyFL9QETgBzY +cY5qO8t3oo6+8Dpee/DPBh/aYFR8fXz0SOCeY+eyHwCIa7wzZECGjqmqaJTcd00sbG3CbETl4l u0q5njbtOv4fMhcI8fmiL678evzJ5kFnDI+QWyZxm8CWe78iY8TmrmW23XHAj4rgQFlbWcdKaw7 mYZ2EnGH0WrsCKckV9ORplPkRmbYaTPvyGGhy5/ghJ99k/rCdcyutf8AZFDPhfPbQ70C0LU5LHI IfMid71kEar8Ok6IzklAVXxORQkC0xtcRj6CEQOrrDGsSroOGY/+l3Kwk9cegGYB3w0xafuqxW9 vRdeW2+4y97+o0HKAlQ== X-Proofpoint-ORIG-GUID: xURG-Z-LG3Guw4SdTbLKl8fD7hy7jcIo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772383880158500 Implement s390x_exception_name() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve s390x exception codes to names. Use the new helper in s390_cpu_do_interrupt() and helper_exception(). With '-d int', s390_cpu_do_interrupt() now logs the exception name in parentheses after its number. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-28-philmd@oss.qualcomm.com> --- target/s390x/cpu.h | 2 ++ target/s390x/cpu.c | 1 + target/s390x/interrupt.c | 16 ++++++++++++++++ target/s390x/tcg/excp_helper.c | 6 ++++-- target/s390x/tcg/misc_helper.c | 3 ++- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index ef73b15218e..37b6e541312 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -437,6 +437,8 @@ QEMU_BUILD_BUG_ON(FLAG_MASK_PER_IFETCH_NULLIFY !=3D #define EXCP_IO 7 /* I/O interrupt */ #define EXCP_MCHK 8 /* machine check */ =20 +const char *s390x_exception_name(int excp); + #define INTERRUPT_EXT_CPU_TIMER (1 << 3) #define INTERRUPT_EXT_CLOCK_COMPARATOR (1 << 4) #define INTERRUPT_EXTERNAL_CALL (1 << 5) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index e7f81fabff6..d1250945d48 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -407,6 +407,7 @@ static void s390_cpu_class_init(ObjectClass *oc, const = void *data) &scc->parent_phases); =20 cc->class_by_name =3D s390_cpu_class_by_name; + cc->exception_name =3D s390x_exception_name; cc->list_cpus =3D s390_cpu_list; cc->dump_state =3D s390_cpu_dump_state; cc->query_cpu_fast =3D s390_query_cpu_fast; diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c index d7e3fd45e4b..28174522944 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -8,6 +8,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/cutils.h" #include "cpu.h" #include "kvm/kvm_s390x.h" #include "s390x-internal.h" @@ -19,6 +20,21 @@ #include "hw/s390x/s390_flic.h" #endif =20 +const char *s390x_exception_name(int excp) +{ + static const char * const excp_names[] =3D { + [EXCP_EXT] =3D "external interrupt", + [EXCP_SVC] =3D "supervisor call", + [EXCP_PGM] =3D "program interruption", + [EXCP_RESTART] =3D "restart interrupt", + [EXCP_STOP] =3D "stop interrupt", + [EXCP_IO] =3D "I/O interrupt", + [EXCP_MCHK] =3D "machine check", + }; + + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; +} + /* Ensure to exit the TB after this call! */ void trigger_pgm_exception(CPUS390XState *env, uint32_t code) { diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index d952bb20cf1..83fe65e1f8c 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -508,8 +508,10 @@ void s390_cpu_do_interrupt(CPUState *cs) bool stopped =3D false; uint64_t last_pc =3D cpu->env.psw.addr; =20 - qemu_log_mask(CPU_LOG_INT, "%s: %d at psw=3D%" PRIx64 ":%" PRIx64 "\n", - __func__, cs->exception_index, env->psw.mask, env->psw.a= ddr); + qemu_log_mask(CPU_LOG_INT, "%s: %d (%s) at psw=3D%" PRIx64 ":%" PRIx64= "\n", + __func__, cs->exception_index, + s390x_exception_name(cs->exception_index), + env->psw.mask, env->psw.addr); =20 try_deliver: /* handle machine checks */ diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index f1c8563af00..a01c5d894e7 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -61,7 +61,8 @@ void HELPER(exception)(CPUS390XState *env, uint32_t excp) { CPUState *cs =3D env_cpu(env); =20 - HELPER_LOG("%s: exception %d\n", __func__, excp); + HELPER_LOG("%s: exception %d (%s)\n", __func__, excp, + s390x_exception_name(excp)); cs->exception_index =3D excp; cpu_loop_exit(cs); } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772434; cv=none; d=zohomail.com; s=zohoarc; b=did6Kjk3hWq7gRIPhgh4gUiNv86DvwiHE7lt8Vl0mk63PsUDRnXhpJHOVrCdQTxU/QsBq3aVr9lz3w/HGgAvdTZYKB217Wv/GpnFZYj68zZ3kvJuyta85Ztmfj+xwauO29T/bPj9Yi78Ffj2JHWwN4pVybaoQNHhpDvUkjKqCvs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772434; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=BRlXLOLY3XVBx2yklx8lcXKZ4sgJIPqCDWLCLX6K77Y=; b=TgHzknQ2sPTnSi2LBmhefaiZJ752dS/VenbYQoj4P2VYcPkgcguhkLBt2a0d8ept1SH9VITt5E/XIVtWm+f/WXyqIgjhJvbkufCWyZmaD5SMQS5PD2Lrl04Lhr3Eg5C41hUCa1RK0DL1Wekl6kGSbMbbH2N2urq9qf/E2gulwCI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772434965833.5245577840018; Fri, 23 Oct 2026 09:20:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHzm-0007oc-H1; Fri, 23 Oct 2026 12:19:56 -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 1xKHzG-0007CU-LT for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:25 -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 1xKHzE-0002fA-8M for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:22 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6r371492226 for ; Fri, 23 Oct 2026 16:19:16 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauygu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:16 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-92e82060977so215362085a.1 for ; Fri, 23 Oct 2026 09:19:16 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3ee699sm740808f8f.10.2026.10.23.09.19.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= BRlXLOLY3XVBx2yklx8lcXKZ4sgJIPqCDWLCLX6K77Y=; b=hY79Tr3r23Fpbe+o nSYXYOHBptxgQvX+2dLrTt7AtKXmgo6Uecbs3MrIQmhAZAl90/Qfs7PnJMbQC/Gc KUo54uwnwi/YNtkfVRs3ClptMg82OHI4liL97z8DbBun7Eu+sJ7EUF7MPBvjBrOq /xvSwmOEcDYDvshyFBvSnmRA19bMmqB6YSxbBBN1Sf8gsD7NbdRsklrM6lMcZBBb hcV7vyctHGXCWvRg1xMgp2HbKlP68Y6LugfgZIZ9nVHpL7zLlDNCZ5R7t90jph6A QFdXwZ4ANlx/2uIYxdk3k7CMq/9RVeIwscaVUbZKKBvAjuznSU3WP78QSQA6c0+M 9QRGnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772356; x=1793377156; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=BRlXLOLY3XVBx2yklx8lcXKZ4sgJIPqCDWLCLX6K77Y=; b=QQMPHquHuz+wu/sW8NFXd1bYlUBwWLsFIH58PrvCooK08FzXzrtJT/OaRn/NFSGJhN Pmj1qmWMo5f28t1uH249dxRrhC02exg6jSqZfBUixOvM5MGQxErIlPFkhFG+CZIzYoVK olLchH53K9KzMyuKpDtjD+2Wb8HYjQf5KjOEcBBAaOPZ+IcRi6J1qfKcN9tiaBWdr5UV TPFy2OaXG6T4fNRAbxEPBe/LzHmtGzZtDZHM3nSQx/LgNlRDXbJWlkC8BJInzRPqDDGL SqRKwZzlIUihkSua0um07CJ9RtX2fG8QkNVBH4lIFUeWzpSWRohCaiMvVcpNGJC7sn1o 4VbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772356; x=1793377156; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=BRlXLOLY3XVBx2yklx8lcXKZ4sgJIPqCDWLCLX6K77Y=; b=enQqvfihmI56Z1jNLgKm5v4EnulZAhJIATbChBjPlqMcKlPpVK2Abx4FN0G1/mQlJE G7Hvf+hno8n2z9lq15mcCKoWflcsPpHeytotkEnwbaSTy8BsFWQtsFAjJVPSQSAPHJML fbDYpW+4tlwvoRj0lej+TXG/oGkX6NKpp6szVeO6hiP+qAz7O9pUz1+P3zVfs+18HzCo K3cGHKiovHLcvfs1MpiNFcApqZt1AT90lnXYF0uAVPHRrNfzH/9j3QfUOgmdpesrQLtq JuJqhU4gf6HIUuH57iAmm8BOnJCTN9yloEJLoRckhKGFvhd4rj3uyObQeObbegQpyZYB 43ag== X-Gm-Message-State: AFq9FYJM6PYPbMQt48j/hh//mjB+tiqblYwbsWidKt6zUu7HGm0C3QgU gk8p1f0xJeHr7rtpgJuuZ4rOEfUsvpPtta/R8sBDnnaMmh3d68hythmv7rwiklNGjIhrKZF118c yW6uJRU5NFqygPeI+/sRA8A9MS4HoGmQtf7WHaaxKr+rdOfn5C1p7RncZ3ly2QFgYZHcd X-Gm-Gg: AYBFou17z0qfiFT+ohoTJwILBIz1ke7AfxP0GuqQRR8EPSMsCDTVVuoZWSUsGIzKfho LUMz1lYIx9wilxfuLpH6jZ0FaaRyAt6k7e4lHOOmfG+XevDk9k35rdm1eX5N4v3krM3V+kP3nHd LHVoY9O9jwgNrGRpgWLctKZBoJqnf1HXkF7IZrnMnNgyW9roOs3HYuKAjeL/cfGK44fbPvVmRuw al8DB+0QChEEA7vuOwYclO0pi7UtunexyQHC1KlCH+EG3THfMsXKKDzc+8y1K1q+ANAD2wftBxC axSKkAYf7Go7RvG+lxhDh/9AwOpdq7+yUcET6Swamhr+DQO4N2C/TtA4XcKHYWBy7irm1IRwsgi Sear+E477nLNmfGVJM80VndWpQrsWyXtqBk5Anpdj X-Received: by 2002:a05:620a:4104:b0:93f:5304:422f with SMTP id af79cd13be357-93f626da712mr970721685a.9.1792772355492; Fri, 23 Oct 2026 09:19:15 -0700 (PDT) X-Received: by 2002:a05:620a:4104:b0:93f:5304:422f with SMTP id af79cd13be357-93f626da712mr970715885a.9.1792772354797; Fri, 23 Oct 2026 09:19:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 47/83] target/sh4: Define exception vector constants Date: Fri, 23 Oct 2026 18:12:55 +0200 Message-ID: <20261023161332.60153-48-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb8904 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=exSUSkewqcAxhAk9TGUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfXy60Jz/fbDxxe wr1oCK4gqixJO1c651boOJsrvWeT30K0EZJK5sYnUbYO3l0JXTOzzDH25heBRBEHjhcFeV+bodr YA5CAbVpOVLyHkf7x74jo4BbtkLk124= X-Proofpoint-GUID: S9WLePeySQDEk7y7X-yfrqEHDPz_mQ6h X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX1GfV6NQhvetB WQldGXsHYlORDyzIVLjZRRppLc9l3MlLCMZeJ2X1Esrs536h8Th2rTmq29Nj6MgLB52pGScN1iv AcN6UuMN/SeWoSZom2Og8RN+ey/QlZoYC52tPhR26iCES8ssmQtM4qRNbB2RPqpwtpj6x8JaSIX rZamJor1suQEnyusLPp5Cj+VaaT37ociS65Astvqj6pZB+txyhdjn04bWxN2Jc4+RYukHmOkKYK Q+m8uQhT0JTqkjtJGZAmU/Z0HB0yuAyrHJyqnZq5sBv9iKclM8vB814dF3ozjsaJvGr/Ct2+EK9 t2zHWGIzw3Y6yyIE29I7fzYOhle8qrlc+W4l160wDrQMcNVGuSBKywedyx17RtsOkug97LLDZcJ RA5FF+V2DQbIjekzmlo6z1GBwqTjueztEgGy8YfpGUozzdU+FDZ/BJniG7CULJUbO2klWbGifmJ 31Ws3ZmjUIP7P+uCNnA== X-Proofpoint-ORIG-GUID: S9WLePeySQDEk7y7X-yfrqEHDPz_mQ6h X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772437083158500 From: Yonggang Luo Name SH4 exception vectors and use the definitions throughout exception handling and exception raising. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-29-philmd@oss.qualcomm.com> --- target/sh4/cpu.h | 21 +++++++++++++++ target/sh4/helper.c | 60 +++++++++++++++++++++--------------------- target/sh4/op_helper.c | 16 +++++------ 3 files changed, 59 insertions(+), 38 deletions(-) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 6984bb462fb..a1e9049b7be 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -135,6 +135,27 @@ typedef struct memory_content { struct memory_content *next; } memory_content; =20 +/* Guest trap numbers. */ +enum { + SH4_EXCP_RESET =3D 0x000, + SH4_EXCP_MANUAL_RESET =3D 0x020, + SH4_EXCP_TLB_MISS =3D 0x040, + SH4_EXCP_DTLB_MISS_WRITE =3D 0x060, + SH4_EXCP_INITIAL_PAGE_WRITE =3D 0x080, + SH4_EXCP_TLB_VIOLATION =3D 0x0a0, + SH4_EXCP_DTLB_VIOLATION_WRITE =3D 0x0c0, + SH4_EXCP_ADDR_ERROR =3D 0x0e0, + SH4_EXCP_DATA_WRITE =3D 0x100, + SH4_EXCP_FPU =3D 0x120, + SH4_EXCP_TLB_MULTIPLE =3D 0x140, + SH4_EXCP_TRAPA =3D 0x160, + SH4_EXCP_ILLEGAL_INSTRUCTION =3D 0x180, + SH4_EXCP_SLOT_ILLEGAL_INSTRUCTION =3D 0x1a0, + SH4_EXCP_USER_BREAK =3D 0x1e0, + SH4_EXCP_FPU_DISABLE =3D 0x800, + SH4_EXCP_SLOT_FPU_DISABLE =3D 0x820, +}; + typedef struct CPUArchState { uint32_t flags; /* general execution flags */ uint32_t gregs[24]; /* general registers */ diff --git a/target/sh4/helper.c b/target/sh4/helper.c index b6b057f104b..0fbd613f333 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -70,7 +70,7 @@ void superh_cpu_do_interrupt(CPUState *cs) do_irq =3D do_irq && (cs->exception_index =3D=3D -1); =20 if (env->sr & (1u << SR_BL)) { - if (do_exp && cs->exception_index !=3D 0x1e0) { + if (do_exp && cs->exception_index !=3D SH4_EXCP_USER_BREAK) { /* In theory a masked exception generates a reset exception, which in turn jumps to the reset vector. However this only works when using a bootloader. When using a kernel and an @@ -97,43 +97,43 @@ void superh_cpu_do_interrupt(CPUState *cs) if (qemu_loglevel_mask(CPU_LOG_INT)) { const char *expname; switch (cs->exception_index) { - case 0x0e0: + case SH4_EXCP_ADDR_ERROR: expname =3D "addr_error"; break; - case 0x040: + case SH4_EXCP_TLB_MISS: expname =3D "tlb_miss"; break; - case 0x0a0: + case SH4_EXCP_TLB_VIOLATION: expname =3D "tlb_violation"; break; - case 0x180: + case SH4_EXCP_ILLEGAL_INSTRUCTION: expname =3D "illegal_instruction"; break; - case 0x1a0: + case SH4_EXCP_SLOT_ILLEGAL_INSTRUCTION: expname =3D "slot_illegal_instruction"; break; - case 0x800: + case SH4_EXCP_FPU_DISABLE: expname =3D "fpu_disable"; break; - case 0x820: + case SH4_EXCP_SLOT_FPU_DISABLE: expname =3D "slot_fpu"; break; - case 0x100: + case SH4_EXCP_DATA_WRITE: expname =3D "data_write"; break; - case 0x060: + case SH4_EXCP_DTLB_MISS_WRITE: expname =3D "dtlb_miss_write"; break; - case 0x0c0: + case SH4_EXCP_DTLB_VIOLATION_WRITE: expname =3D "dtlb_violation_write"; break; - case 0x120: + case SH4_EXCP_FPU: expname =3D "fpu_exception"; break; - case 0x080: + case SH4_EXCP_INITIAL_PAGE_WRITE: expname =3D "initial_page_write"; break; - case 0x160: + case SH4_EXCP_TRAPA: expname =3D "trapa"; break; default: @@ -161,18 +161,18 @@ void superh_cpu_do_interrupt(CPUState *cs) if (do_exp) { env->expevt =3D cs->exception_index; switch (cs->exception_index) { - case 0x000: - case 0x020: - case 0x140: + case SH4_EXCP_RESET: + case SH4_EXCP_MANUAL_RESET: + case SH4_EXCP_TLB_MULTIPLE: env->sr &=3D ~(1u << SR_FD); env->sr |=3D 0xf << 4; /* IMASK */ env->pc =3D 0xa0000000; break; - case 0x040: - case 0x060: + case SH4_EXCP_TLB_MISS: + case SH4_EXCP_DTLB_MISS_WRITE: env->pc =3D env->vbr + 0x400; break; - case 0x160: + case SH4_EXCP_TRAPA: env->spc +=3D 2; /* special case for TRAPA */ /* fall through */ default: @@ -632,7 +632,7 @@ void cpu_sh4_write_mmaped_utlb_addr(CPUSH4State *s, hwa= ddr addr, CPUState *cs =3D env_cpu(s); =20 /* Multiple TLB Exception */ - cs->exception_index =3D 0x140; + cs->exception_index =3D SH4_EXCP_TLB_MULTIPLE; s->tea =3D addr; break; } @@ -828,33 +828,33 @@ bool superh_cpu_tlb_fill(CPUState *cs, vaddr address,= int size, switch (ret) { case MMU_ITLB_MISS: case MMU_DTLB_MISS_READ: - cs->exception_index =3D 0x040; + cs->exception_index =3D SH4_EXCP_TLB_MISS; break; case MMU_DTLB_MULTIPLE: case MMU_ITLB_MULTIPLE: - cs->exception_index =3D 0x140; + cs->exception_index =3D SH4_EXCP_TLB_MULTIPLE; break; case MMU_ITLB_VIOLATION: - cs->exception_index =3D 0x0a0; + cs->exception_index =3D SH4_EXCP_TLB_VIOLATION; break; case MMU_DTLB_MISS_WRITE: - cs->exception_index =3D 0x060; + cs->exception_index =3D SH4_EXCP_DTLB_MISS_WRITE; break; case MMU_DTLB_INITIAL_WRITE: - cs->exception_index =3D 0x080; + cs->exception_index =3D SH4_EXCP_INITIAL_PAGE_WRITE; break; case MMU_DTLB_VIOLATION_READ: - cs->exception_index =3D 0x0a0; + cs->exception_index =3D SH4_EXCP_TLB_VIOLATION; break; case MMU_DTLB_VIOLATION_WRITE: - cs->exception_index =3D 0x0c0; + cs->exception_index =3D SH4_EXCP_DTLB_VIOLATION_WRITE; break; case MMU_IADDR_ERROR: case MMU_DADDR_ERROR_READ: - cs->exception_index =3D 0x0e0; + cs->exception_index =3D SH4_EXCP_ADDR_ERROR; break; case MMU_DADDR_ERROR_WRITE: - cs->exception_index =3D 0x100; + cs->exception_index =3D SH4_EXCP_DATA_WRITE; break; default: cpu_abort(cs, "Unhandled MMU fault"); diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index 777380f8e40..8beac9ca034 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -33,10 +33,10 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr= addr, switch (access_type) { case MMU_INST_FETCH: case MMU_DATA_LOAD: - cs->exception_index =3D 0x0e0; + cs->exception_index =3D SH4_EXCP_ADDR_ERROR; break; case MMU_DATA_STORE: - cs->exception_index =3D 0x100; + cs->exception_index =3D SH4_EXCP_DATA_WRITE; break; default: g_assert_not_reached(); @@ -67,22 +67,22 @@ void raise_exception(CPUSH4State *env, int index, =20 void helper_raise_illegal_instruction(CPUSH4State *env) { - raise_exception(env, 0x180, 0); + raise_exception(env, SH4_EXCP_ILLEGAL_INSTRUCTION, 0); } =20 void helper_raise_slot_illegal_instruction(CPUSH4State *env) { - raise_exception(env, 0x1a0, 0); + raise_exception(env, SH4_EXCP_SLOT_ILLEGAL_INSTRUCTION, 0); } =20 void helper_raise_fpu_disable(CPUSH4State *env) { - raise_exception(env, 0x800, 0); + raise_exception(env, SH4_EXCP_FPU_DISABLE, 0); } =20 void helper_raise_slot_fpu_disable(CPUSH4State *env) { - raise_exception(env, 0x820, 0); + raise_exception(env, SH4_EXCP_SLOT_FPU_DISABLE, 0); } =20 void helper_sleep(CPUSH4State *env) @@ -97,7 +97,7 @@ void helper_sleep(CPUSH4State *env) void helper_trapa(CPUSH4State *env, uint32_t tra) { env->tra =3D tra << 2; - raise_exception(env, 0x160, 0); + raise_exception(env, SH4_EXCP_TRAPA, 0); } =20 void helper_exclusive(CPUSH4State *env) @@ -255,7 +255,7 @@ static void update_fpscr(CPUSH4State *env, uintptr_t re= taddr) cause =3D (env->fpscr & FPSCR_CAUSE_MASK) >> FPSCR_CAUSE_SHIFT; enable =3D (env->fpscr & FPSCR_ENABLE_MASK) >> FPSCR_ENABLE_SHIFT; if (cause & enable) { - raise_exception(env, 0x120, retaddr); + raise_exception(env, SH4_EXCP_FPU, retaddr); } } } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772435; cv=none; d=zohomail.com; s=zohoarc; b=OGwWfnhttEFlJlWlxd9J34g/zSmsL8YYkx2k6z4r7TQKxq7qkEoJpLSxIDWMSwFtDI2GBfhXZuvVkBBbBQCIDIc2W6b3h7LoLGouVlfkn3CcO4L1O0snsNNegjIYiHViQCU1b8gs5i5ZWUdNr3zXucn9KnAVY+xKm+3Wr+gQKoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772435; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Q+Jn4P90k5BkoWw7BkBHvfklqyTI+AfT7svvmOsAV4E=; b=gBZOPpIcZHlDxhyrSJk/pdXpCd0AlRocpxtuOeiwRkmZfhvi2v07OPdJ86sKS/Bu5ZY8Lqa8q94Wa1nmvPjNC8065gd1FtrUYCRdam86nf0bAH0Kcx/WzRN4CSiQzP4croHrboWdKeBt0aF5BTz0HITbh2YOz8r3QAgZ9OAwx1k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772435950592.3977050526609; Fri, 23 Oct 2026 09:20:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKHzf-0007hw-AR; Fri, 23 Oct 2026 12:19:50 -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 1xKHzK-0007Lb-BD for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:28 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHzI-0002fQ-CY for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:26 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6NKR3000254 for ; Fri, 23 Oct 2026 16:19:23 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7cn0w6g-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:23 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93dd3c3badbso266069785a.2 for ; Fri, 23 Oct 2026 09:19:23 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d37c677sm779257f8f.3.2026.10.23.09.19.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Q+Jn4P90k5BkoWw7BkBHvfklqyTI+AfT7svvmOsAV4E=; b=liSizy1u9vOsLh0+ 0uPUIeDlh7oMcaaOSQu/wp5BYzcYkAHGrWwj9xbNkxsxaBAhPsNZe/XwHMTwBrjX gPN+9zCvOI4WpYnCMlI79+vqpZSImO4Vuyxm8Z+z6jyzd2hVpKqRmfNmcwsR6zI3 klRyEwCJ4TZNJbKo2FFUoH8sH1ls++J6Gg0m1ed9jHFMxjBe4UGTXBnUTv8o9NEz YnGZ0wRQwKqOpyt1uEUtu4Ejhm5Ro4q9m5SFVdbwV5ubVh80wmQMQ/HzQ+fXVDWD TlXcTdjd+eXhKFsUBUvVFDIIqAJSqYfxAD6Eq2OmnMTEDBax62x6fBszzPio0r0t /w3Vog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772363; x=1793377163; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Q+Jn4P90k5BkoWw7BkBHvfklqyTI+AfT7svvmOsAV4E=; b=A/CN1n03Gauk0rHHYkjw9qTYzvQod4vI4MLnC0obOGzlYVb7z6EHphdl93yFcBDR0n 8BsHSlP+i79dl/jjfT6778mZkrymzNEBa7R/Wi2JDcSGRLO38djsmUJkEV90mK5HRxei gZ3o/CytbdE4ldl1BLUhygVGBHHKa1rh7qbr9Xd2LmUEbFM+VO2WySqeuV0rLsp4CpSW lqCJQz8Uk/DEAoSmgGmuR9DoRc1H2yt6ouV9s7IjGyT1R3vg0B9zGNQl2Qp+EGUOuCl4 k8TgY5QdVFGGVP/6zDGaLAfBYRsKUZFchL3xy1/PUH9pQ8FpYSturGsEDLwP4zlgkGLY n6mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772363; x=1793377163; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Q+Jn4P90k5BkoWw7BkBHvfklqyTI+AfT7svvmOsAV4E=; b=sAdumbItmBRXWbZ8Mk2hV3DrFseKd3bW3henc91ntzBSSbuXyqmc2oKE/1fpbr/9tH n4SYY/oHI41gAWVM7oZiIaXn7yXvhG7rzVgwSXlrd9lX1MvwE8jb6M4OBXZrVyYyReCR Hp9zEgrz7003r30qRnt8gWE/8ggTAgWCd86weAxdcvZVqeTXy7kKPnZ76KOmTFfJdfHU fUCIBJaykUDodVztZ2sker0FiIWUyTQhMIJG7TYv8w8o5bwtdsfbYZKvywolLfnUlLOU OU5Di2aTE41zAelkVZ6yil1HtWFT/KGGqoMRCGnI6DNfqyHRy8vK8ZxorveZenBrao1E bDrA== X-Gm-Message-State: AFq9FYL/wkkScCV3Pgir6D3zt0ZZOLuz8toQijZaScvkofOpGvj7kDeP GmAiPjtsECJQAkMGvU1LHvZWjP2H1c3ecu840TFEQ7xvJYBhygR4/+lRvuFBOyPs5CAy3Eu+YoU 7TUrHXIAL24lZ+4M+ziDR/CWnoqXxBDeyU31SngSIy+E9KX513dhZ94hBorShnONfffEN X-Gm-Gg: AYBFou2z8m8sEt7CMGg6lN5Jv+kzfX7GMbOX6nHvmMm9YzbzRlBScxpoZP49TdY2vAE PXwE1+Kz5bV5D4I/XssksOHcc+L1DVP7Q4a69U/tN2su8mvZanDFGvoeub7nvgCTONbroUjT2vJ la2kVUGZ8z4gxB1PU7wJoxJc5JH+NPNDCm2nPMzEhwA8EBoioOLKQvZjeQNYg9yC5293clYCQVY CMhWBaECfyuF4HrhB/Si7UZIPMusDDqBtCqgWK46vrCjwiYfDiD7n/Jvy2Jqh+IwX6z+tHXIv4D vSFo6cbswRN/8K9IntpXHuih0RCbL9oRayfZW6qUixfDvh3gvF+sX+MXby0+8IVP7Re4uZsl9WH CZ3JWkMO/ewCOv33bYC0iO2Pf5BLtw9l3H1vm19BH X-Received: by 2002:a05:620a:4725:b0:93f:2b23:4824 with SMTP id af79cd13be357-93f6f7c4217mr506823285a.34.1792772362471; Fri, 23 Oct 2026 09:19:22 -0700 (PDT) X-Received: by 2002:a05:620a:4725:b0:93f:2b23:4824 with SMTP id af79cd13be357-93f6f7c4217mr506818985a.34.1792772361859; Fri, 23 Oct 2026 09:19:21 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 48/83] target/sh4: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:56 +0200 Message-ID: <20261023161332.60153-49-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX2woSqQ0PcEZM aV3iqGd6xq6LE8cUVAhHEVWmHOcFIzd7ZeoRfPgsY+iI52DHAm0qbxhOcb0Xl/RjDPYBdECA5th 3LrHDV5X4tL38Yxdt8A2OiwXZMwd+KulhEBa4GaCju4SYo+G1/LkWFsWDBTMMkrLaJlGw202Cid 63Yxp50/mTYr/okOOuK1eKWqo/ER+79rGBiL8crw9AjpH64vkmPUAe0XL9R5PZBCYIjyjxgILKq Bs7MySPnNubH+Iw8aG5QhigIo5qMLo5xPGGtFQ+8k6cSntMrfga8jJWNbeknE0O63U2mQyAjoFj 777+I5dwT43FJW5zE14vmn24/+F/sRf0EsqLe+OCQdbzUHgRZmR9YKiWRmplEN4CodL7lokm4Au Kjh7jnw7hhEx18A8yLbctk5k9ZOfBXvGp1M8BzSfMGIRbrdERo//u1RlNX3UtWQ0qP05UBJha9M xK4o/vIUDNW1vM1vM4w== X-Proofpoint-GUID: yz0KHonJ-f0o9RGZAmiP98s8EoYSqb8J X-Authority-Analysis: v=2.4 cv=a9mlZkSF c=1 sm=1 tr=0 ts=6adb890b cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=1bLhyRm5UWLPkFMrcSkA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-ORIG-GUID: yz0KHonJ-f0o9RGZAmiP98s8EoYSqb8J X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX0lOM1i8EYawy 8pQyzICR5w/JdbXYd3OwZtMOBdwji9ZTDDEOUcjy0KcBcOPgSQqbh3JCWfge9F7Az/w/YFxbrmF hJZcwqCnKQ1aflY8ieyS7sl91JouDDo= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772437099158500 Factor sh4_exception_name() out of superh_cpu_do_interrupt() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve SH-4 exception codes to names. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-30-philmd@oss.qualcomm.com> --- target/sh4/cpu.h | 1 + target/sh4/cpu.c | 1 + target/sh4/helper.c | 101 +++++++++++++++++++++++--------------------- 3 files changed, 56 insertions(+), 47 deletions(-) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index a1e9049b7be..94f2f1278b9 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -258,6 +258,7 @@ struct SuperHCPUClass { uint32_t cvr; }; =20 +const char *sh4_exception_name(int excp); void superh_cpu_dump_state(CPUState *cpu, FILE *f, int flags); int superh_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int superh_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 55c73a1da35..17731935779 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -333,6 +333,7 @@ static void superh_cpu_class_init(ObjectClass *oc, cons= t void *data) &scc->parent_phases); =20 cc->class_by_name =3D superh_cpu_class_by_name; + cc->exception_name =3D sh4_exception_name; cc->dump_state =3D superh_cpu_dump_state; cc->set_pc =3D superh_cpu_set_pc; cc->get_pc =3D superh_cpu_get_pc; diff --git a/target/sh4/helper.c b/target/sh4/helper.c index 0fbd613f333..5856bab6983 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -47,6 +47,58 @@ #define MMU_DADDR_ERROR_READ (-12) #define MMU_DADDR_ERROR_WRITE (-13) =20 +const char *sh4_exception_name(int excp) +{ + const char *name; + + switch (excp) { + case SH4_EXCP_ADDR_ERROR: + name =3D "addr_error"; + break; + case SH4_EXCP_TLB_MISS: + name =3D "tlb_miss"; + break; + case SH4_EXCP_TLB_VIOLATION: + name =3D "tlb_violation"; + break; + case SH4_EXCP_ILLEGAL_INSTRUCTION: + name =3D "illegal_instruction"; + break; + case SH4_EXCP_SLOT_ILLEGAL_INSTRUCTION: + name =3D "slot_illegal_instruction"; + break; + case SH4_EXCP_FPU_DISABLE: + name =3D "fpu_disable"; + break; + case SH4_EXCP_SLOT_FPU_DISABLE: + name =3D "slot_fpu"; + break; + case SH4_EXCP_DATA_WRITE: + name =3D "data_write"; + break; + case SH4_EXCP_DTLB_MISS_WRITE: + name =3D "dtlb_miss_write"; + break; + case SH4_EXCP_DTLB_VIOLATION_WRITE: + name =3D "dtlb_violation_write"; + break; + case SH4_EXCP_FPU: + name =3D "fpu_exception"; + break; + case SH4_EXCP_INITIAL_PAGE_WRITE: + name =3D "initial_page_write"; + break; + case SH4_EXCP_TRAPA: + name =3D "trapa"; + break; + default: + name =3D "???"; + break; + } + + return name; +} + #if defined(CONFIG_USER_ONLY) =20 int cpu_sh4_is_cached(CPUSH4State *env, uint32_t addr) @@ -95,53 +147,8 @@ void superh_cpu_do_interrupt(CPUState *cs) } =20 if (qemu_loglevel_mask(CPU_LOG_INT)) { - const char *expname; - switch (cs->exception_index) { - case SH4_EXCP_ADDR_ERROR: - expname =3D "addr_error"; - break; - case SH4_EXCP_TLB_MISS: - expname =3D "tlb_miss"; - break; - case SH4_EXCP_TLB_VIOLATION: - expname =3D "tlb_violation"; - break; - case SH4_EXCP_ILLEGAL_INSTRUCTION: - expname =3D "illegal_instruction"; - break; - case SH4_EXCP_SLOT_ILLEGAL_INSTRUCTION: - expname =3D "slot_illegal_instruction"; - break; - case SH4_EXCP_FPU_DISABLE: - expname =3D "fpu_disable"; - break; - case SH4_EXCP_SLOT_FPU_DISABLE: - expname =3D "slot_fpu"; - break; - case SH4_EXCP_DATA_WRITE: - expname =3D "data_write"; - break; - case SH4_EXCP_DTLB_MISS_WRITE: - expname =3D "dtlb_miss_write"; - break; - case SH4_EXCP_DTLB_VIOLATION_WRITE: - expname =3D "dtlb_violation_write"; - break; - case SH4_EXCP_FPU: - expname =3D "fpu_exception"; - break; - case SH4_EXCP_INITIAL_PAGE_WRITE: - expname =3D "initial_page_write"; - break; - case SH4_EXCP_TRAPA: - expname =3D "trapa"; - break; - default: - expname =3D do_irq ? "interrupt" : "???"; - break; - } - qemu_log("exception 0x%03x [%s] raised\n", - irq_vector, expname); + qemu_log("exception 0x%03x [%s] raised\n", irq_vector, + do_irq ? "interrupt" : sh4_exception_name(cs->exception_i= ndex)); log_cpu_state(cs, 0); } =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772436; cv=none; d=zohomail.com; s=zohoarc; b=M4lZysoKrQLyuyC1iQs+L66mDcvxVcolZrQpzjWwpEzuWUOHiVKhk6slR+p7n3QdGgYWa8ADqfCJH3B1lhbYGrN5z+8OsDHW/EkbN6Rk1hRkrN491vP5uQfqUezpb9NDShale5eyRIpTowwuJL2YGYzVaEfqujFxNlN4gu6hj3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772436; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=nlXX0rf5CQ1pxteRHWpFuXwp2h8i7GjWHY2M8nDV7Kc=; b=JnR8CIynX29+fjzpw+Soje4A+E7kCQ4UZIWHgPNH02lmJrK89Om8XimdjvlywXQpzgGAMWwSBrPvNuqLS7KCZgN50lIMOVDKM84Zx0utkLOpbtMSqDBamFbQihtyNvSm0b9RPrOiK2/icV4XdeQvHKXL4alqnDvdnoQ1YfoTS8M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772436913514.6128275118855; Fri, 23 Oct 2026 09:20:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI00-00084S-Ab; Fri, 23 Oct 2026 12:20:08 -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 1xKHzW-0007Rz-CQ for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:39 -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 1xKHzS-0002ff-D2 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:36 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6Dno2462566 for ; Fri, 23 Oct 2026 16:19:31 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmtvjff-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:30 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93909014c85so209681585a.0 for ; Fri, 23 Oct 2026 09:19:30 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3ee71dsm1037768f8f.16.2026.10.23.09.19.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= nlXX0rf5CQ1pxteRHWpFuXwp2h8i7GjWHY2M8nDV7Kc=; b=pt7efJTZ/jG3vbL2 X1cnLmaOXTBjoZjVujjMIpspq5fr+L9XRY9GJEupTRd1+d4KZVSzSZKIFHoNcDBW NCGWaC6meTlv53fr/abP6T9stK/1wO4VF0kMf2kzoOKC+/kIc7nW7M9oRDUTbv5M c0l4llPvNaF8Q1AioFKuXG513XzbV9g1XWSMU7YOZ0pr7+KrGzEnhKF34vCYWTUe Si6qEyTfj2bBX8ZdeCkM32sMeXWSiyGwrj5KGLzvaZTgBQGpXIPvIU0O9JVMSK2M 9XEYlCx2LqChpgjQ13ZfyTFcncET01/8GtZQL0eb/OkvoaGwNUWfKfpa/g9J+S8U BBYlYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772369; x=1793377169; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nlXX0rf5CQ1pxteRHWpFuXwp2h8i7GjWHY2M8nDV7Kc=; b=Z1j5PCNANu5yfSKIzhz9Z/yDzok4Zv/gLDyNQeZatL/KPUOzb8ew8eeBkz+OCuP2pS S4NhOe72DwkUQmzs9YtWw7e2zr27BH3T67D9zFfBl2m4nBp/6zgmzVXAQLt5TiKGRFKn gbzu+XOUl6vjwAlO/G5FW4mEoaOeEqqSjvwfux5jyRMIe3nGqA//A/QJTRDhTDIfC5UR MvMzUJha4IQV06TsY2uNblIKDLpGJuF3jt1AKFErLLSQ1s7NWWuPEET1XpPQfZpEVIkG HY5/WwKDl+tbSKaai0s4iY6rvQDnvNin5aqvGIXtjXMgisF2mrrFB/IEIp7pM61lAVV+ gJXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772369; x=1793377169; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nlXX0rf5CQ1pxteRHWpFuXwp2h8i7GjWHY2M8nDV7Kc=; b=UiCTjUlPBjH3QZRotNyRgOgfrBM6+TYyvOJuCv0dkmu39hXKXy3F1GXFU+MxvU9IIF 13wub4SHd74mWRwpwecUN8LkydKSRZpCR5jmUi7IdVvjx4724lHG0OiNfAC2B2I//zLL YJe47Yhr3vTSuMAS4X+reuwKJ/BX+TZeVo0Z4YnQGFdvNnNOw1S08BvfygKmUtqgJLiJ dxMRo/7odB/xb6dIQDRJj6hMMr9Z5yHXarSdrYrhtyLd7dJtsWZTngW8OAbflUaeXn/y 31Xb3vjSJdrOPEAkujw0oEmClKNqQiiuisd8AVox5HiKiPRGMl5UdfojRlQJf5dzDdfQ 6TAw== X-Gm-Message-State: AFq9FYJzNEZ1ESO9PvVkWPlUj8Q7TB0JJcn5qywwtVxQBPSJjg9EVAtJ 88MF6aQ9RA353IB+xpsl0QzYRRwEHlyK1HmCHJlVEXTHS6LN/tRTGDHR2gBqVyH+nCuAI1ZArhR ITlW5WeWz9XdtOQivnIVGi8sRRRVc5867UHtOQGmrQM7AwY1SlodoUe1hUBthTKLxxQKj X-Gm-Gg: AYBFou37DvC4CWCplAPetIAPvwyNdpsv2eyVwlaKlacMSpfNpxpBA9HHgmZ5GNvg60O FDf76Flhoo88zhw55tPnVOXwNd83U+O7ntK7jUuqdLHHIFMOI9b+Tz2n3pTELQVkjfgE7R3rq3O BfFJlQG3zzKGBIjkjaRLTZiXexrXp69JKTBXIqUl/v8B+NTWDpoXvX7pl4G6A8Ew7N4BXeiLxaA GFcIKp4lVcr4I5chhejNjdKAofsEN9XOI6nuGIAGrSHyRvL9zAKlAC2Hfc/ZUDOlNQhWyqUqvmU GkJxQXVZt51dkDTFSodvhHeh8OH6d7d1bn5tIsHT2SOSp0kCxp8UFNjQwb4VQ4aWWZBWcGmTtmd +hmzmZPASEtghn+u9Fc+hmAcWYRrD7VeQQuozo+LD X-Received: by 2002:a05:620a:370b:b0:93e:4e27:359b with SMTP id af79cd13be357-93f6f7880e0mr495657385a.24.1792772369469; Fri, 23 Oct 2026 09:19:29 -0700 (PDT) X-Received: by 2002:a05:620a:370b:b0:93e:4e27:359b with SMTP id af79cd13be357-93f6f7880e0mr495652185a.24.1792772368909; Fri, 23 Oct 2026 09:19:28 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 49/83] target/sh4: Use a static table in sh4_exception_name() Date: Fri, 23 Oct 2026 18:12:57 +0200 Message-ID: <20261023161332.60153-50-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=Gt3XaU1C c=1 sm=1 tr=0 ts=6adb8912 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=FjqC8H2jZU1ohCHi5yYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: 3S9TcjQEZgSUiNM5-NJYIC9uI-mlsTsT X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX1jmzgT1IQ5Dl Q8TFeSzdh98K88WDu6BEFN3tJRBb6n4NhTG1RGm1YDcACC2ax4J2cQ4IKQBRNmONMm5RAGyQhZa tpmnhF6M40OZog/EDet3VdlmuTuiTGIR1/EgAka5HxTYIUqqrccOvOiP62V5VO5lIcsiHzL+QyY 1FU9Q3yAmcMVfgBy28Qoo5dWn4jMTjoSSw9im023EtqXJNugOohbFkHqeqcrcbwfj+d0LHDgYW0 caQCDoYB2wS/CvpJ1tt2ycFiRomVO+pkutYuvTBbSgk9cyYmoTdz3AH6GWfh4t9qc8lhwVg31Cm toY56XgJucMw6hHOB5NVdXyYpRrB+dAinba0/1g68ZRnoCr4mupSv5zmMYjnDG0IomVOrm/z2b9 dVQAt1ZN8fEsih+o69fGLOCwm4qTgtL0EREGPWgKjd8OwJYG8WC0pvAL3vfv2WSeDGLvBV8SLVC O/FGpdJTfVt+gpGt8Vg== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MyBTYWx0ZWRfX2kaWsuv1C8kc Nt6xrKa+TDmcIYJa+BkwB0O1pEk2BWsvkyFffu5qy4bcZUpaRb8OstNi9UbKG/2P2bmn3eF0Ayg S/vbRcr933LKNPGm0ouSIoquk9U56B4= X-Proofpoint-ORIG-GUID: 3S9TcjQEZgSUiNM5-NJYIC9uI-mlsTsT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 adultscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230063 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772438929158500 Replace the switch statement with a static lookup table. With '-d int', unlisted exception codes are now logged as "unknown" instead of "???". Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-31-philmd@oss.qualcomm.com> --- target/sh4/helper.c | 66 ++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 46 deletions(-) diff --git a/target/sh4/helper.c b/target/sh4/helper.c index 5856bab6983..96465dd94fb 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/cutils.h" =20 #include "cpu.h" #include "exec/cputlb.h" @@ -49,54 +50,27 @@ =20 const char *sh4_exception_name(int excp) { - const char *name; + /* Exception codes (EXPEVT) are multiples of 0x20 */ + static const char * const excp_names[] =3D { + [SH4_EXCP_ADDR_ERROR >> 5] =3D "addr_error", + [SH4_EXCP_TLB_MISS >> 5] =3D "tlb_miss", + [SH4_EXCP_TLB_VIOLATION >> 5] =3D "tlb_violation", + [SH4_EXCP_ILLEGAL_INSTRUCTION >> 5] =3D "illegal_instruction", + [SH4_EXCP_SLOT_ILLEGAL_INSTRUCTION >> 5] =3D "slot_illegal_instruc= tion", + [SH4_EXCP_FPU_DISABLE >> 5] =3D "fpu_disable", + [SH4_EXCP_SLOT_FPU_DISABLE >> 5] =3D "slot_fpu", + [SH4_EXCP_DATA_WRITE >> 5] =3D "data_write", + [SH4_EXCP_DTLB_MISS_WRITE >> 5] =3D "dtlb_miss_write", + [SH4_EXCP_DTLB_VIOLATION_WRITE >> 5] =3D "dtlb_violation_write= ", + [SH4_EXCP_FPU >> 5] =3D "fpu_exception", + [SH4_EXCP_INITIAL_PAGE_WRITE >> 5] =3D "initial_page_write", + [SH4_EXCP_TRAPA >> 5] =3D "trapa", + }; =20 - switch (excp) { - case SH4_EXCP_ADDR_ERROR: - name =3D "addr_error"; - break; - case SH4_EXCP_TLB_MISS: - name =3D "tlb_miss"; - break; - case SH4_EXCP_TLB_VIOLATION: - name =3D "tlb_violation"; - break; - case SH4_EXCP_ILLEGAL_INSTRUCTION: - name =3D "illegal_instruction"; - break; - case SH4_EXCP_SLOT_ILLEGAL_INSTRUCTION: - name =3D "slot_illegal_instruction"; - break; - case SH4_EXCP_FPU_DISABLE: - name =3D "fpu_disable"; - break; - case SH4_EXCP_SLOT_FPU_DISABLE: - name =3D "slot_fpu"; - break; - case SH4_EXCP_DATA_WRITE: - name =3D "data_write"; - break; - case SH4_EXCP_DTLB_MISS_WRITE: - name =3D "dtlb_miss_write"; - break; - case SH4_EXCP_DTLB_VIOLATION_WRITE: - name =3D "dtlb_violation_write"; - break; - case SH4_EXCP_FPU: - name =3D "fpu_exception"; - break; - case SH4_EXCP_INITIAL_PAGE_WRITE: - name =3D "initial_page_write"; - break; - case SH4_EXCP_TRAPA: - name =3D "trapa"; - break; - default: - name =3D "???"; - break; + if (excp & 0x1f) { + return "unknown"; } - - return name; + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp >> 5) ?: "unknown"; } =20 #if defined(CONFIG_USER_ONLY) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772437; cv=none; d=zohomail.com; s=zohoarc; b=hGgYruoiconOYHI8t3N6pJ2b6P3ULH/2AKNY6RuVYxXKffu3WvYjGg6gLo9oQw1pzVYx2VqMTTf/4/4KCBjKremwnjrPQfay2HJm7LB3af/rGLlk3myQ0xFQ3VZ5DDDFeAUwuKIv0hZqqbqypgPz4gxrRlMarCT3rm06wALBoUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772437; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=FJH8SjTQ9r2KQNDV3qUcOIq83looHvvZ+ni/ZdkuOwU=; b=XVA2v2VSCl4xkPzckd3IMgkQpDAI2emNafLQPjSg1+M2Q2Y8cp2Qih/apDuYD0bnxGNDOmJH2BiPxeyjYqq+2dEo3GGYUzQT1LQ1TKCgsyKW0RfiihEj1+Ey3g0zNky36uxjpHhZdLkslUbFH5cP8zSSHM8Z4yPl7rc6DWwFQpI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772437942653.8252176837392; Fri, 23 Oct 2026 09:20:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI00-00084B-6a; Fri, 23 Oct 2026 12:20:08 -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 1xKHzY-0007Sk-AB for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:43 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHzW-0002g4-NJ for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:39 -0400 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG2uk73733893 for ; Fri, 23 Oct 2026 16:19:38 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgarug2fa-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:37 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f3969a2a7so177763885a.2 for ; Fri, 23 Oct 2026 09:19:37 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a318ca7647sm5725675e9.4.2026.10.23.09.19.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= FJH8SjTQ9r2KQNDV3qUcOIq83looHvvZ+ni/ZdkuOwU=; b=bPMhAzKB1zFn+JzN k67bUPqb1LtSd3uqnjz8fJ7RgCQCedebw1UeiLNupuRGTvkCE1JevraehdTbtCTk bI4KroOEUhXFwZsad4lYq8LUwUwl8leCwwLGqGgyuJVlY35oVAKVWTxdbcKP2Wrw 8BIdJV9dl9S+2k1dKWDG6e7Eh25M49rq6j+Dzk9LBmv9YIcEQ/S2oN5/j66Swwk+ zuwcMa3vScyJSgdoQJY0Ye8fmdwG1i7Dwl1e2IGBLzjY/YGpM4EhwZvXTp4D/hKM 6rFQpMBMzRk0BnW+AIVQEjYCvHL8ifCUdYBrrlx/euqY6Chxu8HyOpOGPWNGV3jJ WDL3/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772377; x=1793377177; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FJH8SjTQ9r2KQNDV3qUcOIq83looHvvZ+ni/ZdkuOwU=; b=dp0d88XJxgto1oaSmZn2231vWYrC0U/0bUsKV/7lzNy8auEVSUSBS2+p00VDrKC2V3 W5NAK1fTs0RjkdTm1ZCpvwCriNtURbkccPr1iEyng8Xkrqvu69jjtv+KWslYnXxSSvAQ uDeUwfEbwE7tY9rbiTem+idQ6Yp9gX0e0hipJgdQbJcgxb76TxcTSpHMlVbN3I74DHXk n4SFghza459an2nWDl5j8JjFBIWWpU8FW/958c7BEVIAdIGGMm+S3eE7PTnaoEb2FX4I 6JZDYnAI+VCajDUTJ2tlKp06rhGjy71CUgLc8YZ+4hNz0uM/qxzA763u+7FxyJm87wA0 W8Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772377; x=1793377177; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FJH8SjTQ9r2KQNDV3qUcOIq83looHvvZ+ni/ZdkuOwU=; b=1QUSrHB+XXFNssxn9FhPajkFukoDLzdpBS6TGJ0/Yf7vVtqBnX6GHLBsuo5GwqI31u c0eT0UCftPYqSogLkU0RgiVz57SHUWpsCVtCVezbiQXUvpdNICTRymasnPf0jDwNTDZb WQKjGW08OTXMstAbcnnYYAfRMsNUnp/aji+4L2EwWzpjfwaYjaSPxEVwhuXEexeBYD+f J/jgDdJih1bTZfAPhEPr8aIurrm3aE34QUjMSpy+GFMgKiGdsv0+bxwlakSLXrr9E97E iEz1ryc6Y5OrDDrWRs4L5/3owNMBL8QbuOIbVXysu9QTp8mzqlxBihW1JdbcTVKBBdHb QkGw== X-Gm-Message-State: AFq9FYKdYdgtAyPnxU9KHxMLl0D4YNi6lkfllByuYyqZUeC/vJiA1Lr7 tDT1b5HZb/x4pnW8h7iYkZP5iHTB2cj2yW2N77Wr5+71vyoaKjYT9PmK+5ueFh5o+ZkRggyB72X kwK2hUJQm6CUpzQUCS9tVYs3AcaBHVSqFCsyEwRhUqRi1OILgSF1denESu0G3gMVI72eu X-Gm-Gg: AYBFou27raB6Lf2nmEjCg/jBVSjzvU48Ua9v5l+H9yZCm/2o7HlYXcek8SBt1obXA3O pJntB0q5jVzsFPWavXwzhAH9KJvtIhjH64trXEvG51WDwvLpb+eKcICNwpW6sfW3V/u0goSEM2b Y+7HINep6sTWwRpOtPU1opW2w8XaUALbbZiunTPhEyUazQ/aCb7FkJHUKN5qqBAbRhM3cVugtZr vMjFmCizl3GyDT0QL2SNWAchw8mpdQ3C1aaKtpWune4JWllhnb8EN7rJcTZ1QapGZ/Tfm0nwBGl sS0Z5Ynk1NS+PlSV4IqeaZq+FuurYZxnmXEag/9q8SIDZZSdjWqmiXWHOleZ8CTppNhye4HSF6a peKG2+UQYlKGrwqNYXceHGANAIohJHiBiCutT5yzN X-Received: by 2002:a05:620a:4445:b0:93e:c12c:43f9 with SMTP id af79cd13be357-93f6f871ee4mr490110585a.70.1792772376896; Fri, 23 Oct 2026 09:19:36 -0700 (PDT) X-Received: by 2002:a05:620a:4445:b0:93e:c12c:43f9 with SMTP id af79cd13be357-93f6f871ee4mr490103885a.70.1792772376139; Fri, 23 Oct 2026 09:19:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 50/83] target/sparc: Remove always-defined DEBUG_PCALL Date: Fri, 23 Oct 2026 18:12:58 +0200 Message-ID: <20261023161332.60153-51-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX5CjRUjTrnpiX B11Zoxzo0BrZ5e/sFmOVemsk8v/iLT1DtqOMiBVUh16R3qVx1sR2ckDhW6kVckTHPiXzMNNvpu5 Xa3myPY2s6bURNeZ4M53eip/UrCb7LY= X-Proofpoint-GUID: W5alXgwpt7no0W3FVB-ZZ32zE0DDuo7O X-Authority-Analysis: v=2.4 cv=SK7Xx+vH c=1 sm=1 tr=0 ts=6adb8919 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=d8nHZlMCPPOsqsKe8PUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: W5alXgwpt7no0W3FVB-ZZ32zE0DDuo7O X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX18/C5QQ+oG0h bjCWa9EMV5cTYBMNnJdjRq3fwy3B6NM9ZuQkXPfTY/65X1/ItBIBweCv84dEi+8mD+b+FsT1Cpd k9AU79cahsQ4bBCb0RXzG5BcREq8zlz0lWUm9KLR31BDqiJ5EUkpyyIh/K0HtgCeDnCWexQst/E s+KrMf+aTSQFHDsWMhrHdPdrMc9dRgZUgVbB/iu1RY/ETrs4uI+vQTVJPqsfNqrpQursBqtYaxv padfo3R0ERRdLYtWC3LqKjrS2kXOGPdy+KFOapyNfv5v+fyN3RrvpG6GNCtJBAHCRV5rMqxn7LE L9XuHmdck/Cx9ovWbk0wv2mNC4L7Lnf4faq+KpU1iYQTzbEsL7jPowfhQQV0fdsvaBB8g8Oki6C YP8lwzAXUMaIPHfhhElyLWCJMNnbHz7ct4AN2hwyujDu03LBqfOlsjAvtIdq2vgGKLbAoftMzvY jfguugEWusNIthwb3PA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772438904158500 DEBUG_PCALL has been unconditionally defined for 14 years now (see commit b884fc5ecaa "target-sparc: Make CPU_LOG_INT useful by default"), so the #ifdef guards around the exception name table and the CPU_LOG_INT block are always taken. Remove the define and the now-redundant guards. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-32-philmd@oss.qualcomm.com> --- target/sparc/int64_helper.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/target/sparc/int64_helper.c b/target/sparc/int64_helper.c index 60ab0478fc6..10341e0c282 100644 --- a/target/sparc/int64_helper.c +++ b/target/sparc/int64_helper.c @@ -26,9 +26,6 @@ #include "trace.h" #include "qemu/plugin.h" =20 -#define DEBUG_PCALL - -#ifdef DEBUG_PCALL static const char * const excp_names[0x80] =3D { [TT_TFAULT] =3D "Instruction Access Fault", [TT_TMISS] =3D "Instruction Access MMU Miss", @@ -62,7 +59,6 @@ static const char * const excp_names[0x80] =3D { [TT_EXTINT | 0xe] =3D "External Interrupt 14", [TT_EXTINT | 0xf] =3D "External Interrupt 15", }; -#endif =20 #if !defined(CONFIG_USER_ONLY) void cpu_check_irqs(CPUSPARCState *env) @@ -138,7 +134,6 @@ void sparc_cpu_do_interrupt(CPUState *cs) int intno =3D cs->exception_index; trap_state *tsptr; =20 -#ifdef DEBUG_PCALL if (qemu_loglevel_mask(CPU_LOG_INT)) { static int count; const char *name; @@ -177,7 +172,6 @@ void sparc_cpu_do_interrupt(CPUState *cs) #endif count++; } -#endif #if !defined(CONFIG_USER_ONLY) if (env->tl >=3D env->maxtl) { cpu_abort(cs, "Trap 0x%04x while trap level (%d) >=3D MAXTL (%d)," --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772493; cv=none; d=zohomail.com; s=zohoarc; b=hjH0gwj22/8R8I4ZPvCO8/XN26Ke8KnAkQWITD+Fp3N9jr2hGoxHZ4P5+z0i44IPiWGsOmgQvpJBrVTkyrIxNmOgcn1q7NNahC5Ihd4LOeE+JmMHg3bNOC/Qm9leQm9/WjlQRMEpM4jnRwilNKJgLVTswrWmW0W4w4B+IdagJ0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772493; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=8EKtigz2LT1tqKm9TjWDplrVbAa5p1aqsSCZ6D/y0yA=; b=jsYd0c6O4rU9IidxuAlqseM/wmxu6PJQFhFwf4jl8oqtBnCiZZJhZ9MqHBPTs38f/DQ19BDkRMB/5S5kG0hH+lB9cuC9WRFw4t/nEJ7qucQC5I02u7LxTyWJw4GFNm232yqOj0raFVAkst9DEftq+2OX/3DCoduWXtY3i94XPB0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772493662303.5912148436763; Fri, 23 Oct 2026 09:21:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI0N-00008s-5a; Fri, 23 Oct 2026 12:20:31 -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 1xKHzf-0007jS-GF for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:50 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHzd-0002gc-8g for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:46 -0400 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG2ukA3733893 for ; Fri, 23 Oct 2026 16:19:44 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgarug2fu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:44 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93f3969a2a7so177780085a.2 for ; Fri, 23 Oct 2026 09:19:44 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a92a4444sm16394465e9.5.2026.10.23.09.19.42 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 8EKtigz2LT1tqKm9TjWDplrVbAa5p1aqsSCZ6D/y0yA=; b=FqLJJ0TeFWbY9GOw qgTRIc9LA4MGlNV5NjNeazRsmKGHUXVsRTMeexXmCiUASKCTVplZS6JuERJmoa8W mYebdTk1H4kkYFU2AmOU9kbkyI93qeDe/aktRytfE6ZjbQi61nj2beaiekfomrkV GaSxNNCoIiqyaNequ6ALFK/1McCNkyayAJR3EQ36I00SWTk/yFhbdJDsmeBqeSUJ 4uR5a5QLYIIUJn9CyutitcqdqIukpbD1Gl5MKZLEMwbPe0DOeEcUyZ6qYE0wBs0v 7L+1ykjuRUdLm6jiO1R8sORM3g2kZEmCh1I6612EXG+BYhmkF0N1gWhX3smOzSKA OWxWxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772384; x=1793377184; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8EKtigz2LT1tqKm9TjWDplrVbAa5p1aqsSCZ6D/y0yA=; b=FNnmUlPMIyZLFBBSssZca6khibXLnIvaBACMQjcCh1DXEAaN6WgRWeQeO06Ffrd6zs W6SPZ95omKLMZfkP31wutg4SRy/onU89lYbjPUY2aRNZRsxppRv8fD2TOa0bzoPpRpNs 445fOZSRzOU3LFJuSVoe2ZJu+zffjowRkeq4icNLckAy9vM8GDLmuPBlTPw7xZ6jfSXA 8aOD5JXF5trKVfnUegkzUxjVTgXC5+HR+Gtn/mOo4OjzG7iQugej72vQuYWqAiTnmBw+ CNk05T5yNPRzdB3v1RyDhLWQ2adt826lgVvpGX72BDZ2o67cJgWOiUeLhPgiAxoYTB8Z R0qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772384; x=1793377184; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8EKtigz2LT1tqKm9TjWDplrVbAa5p1aqsSCZ6D/y0yA=; b=CRzCeSUdP8ZLkE00ppPRv4Ahw9GIpN97WS0gybkIYaMX8g6TtMPKzLJVe0IDRJniu6 WEUQqwcFlQ6OwiQ70QHkcHy54UxTRVlw1gGGil84oJesxbDDiaGYk+NFV33UduSRqVyS uWcCEfP1AMBUBH1aauRsiAj3XikCGiYuoBtS6G3d5wDWqDAlqZh0szjzBP3HGLdJ07n1 LyOwvsmzWw5gthrkZKownfPvCFRjCgYnUnbkwqAg9ps2Tu/KbaGxuhwv6Tv0FHvC1u/u 8KNGamS3P4n3stLh9rLeFFmDLf7P/zVB1Wp1kcF/o+U0H80Tu3swJOkVYYCxbMYKTAeW R0JA== X-Gm-Message-State: AFq9FYK/bbI19e6oSzZzW93YyxlAreyKQz7wLZBe21kXznQL05cHbg0A u3sL7aAPiQaydPddDO4bwkJJnZHsa24te9E7jl6JbAUBPr9CLmo9NmVC+o69iNoJny82FcgdmYi guzS1R/Xg8wNp1YX6X6dViQ4NIoJJiBvYbGhqGAOLT5yACUodB+LNR3M2CAB9e6XR77o2 X-Gm-Gg: AYBFou1EZasuVzWrh70TMOSvgMKNaStndx0uc1JkdeJiexXBCjBK5nWniYCVOwOYxUy r0FDKHRlOfJ6SnnrPI4kZCK4t/3GfM9O4LUlq8AatJ8FXaxUqwcFtK8vCCZ/ZqIwhmh7NkbB3S0 3v2JRIooec5OWChlStE/7mgEwGyhziighQJMYeBbT4qqJBEh+ejew+RDHgDnnF/G0X5Fi1DeCWb 7HZEx8JwSxtW5LTZ11wTZwxXpxUKZYwPXfQfWfcMcwvIayBITcU/UDc0P2t2ma/Y6lWLXKBddlq 88+xAmXgOQNQGt4+wXGqSLwR2ldVR+nJn+H/W3+4Rcp31Y9fMtC+WdO0i2jA8v/QY+P3unNAvCn IYoR4xjTZyesyUpnPcqywnl7Xjgz8ZYNItM65jZLx X-Received: by 2002:a05:620a:470a:b0:93f:2d10:ea49 with SMTP id af79cd13be357-93f6f8151d0mr498381985a.45.1792772383660; Fri, 23 Oct 2026 09:19:43 -0700 (PDT) X-Received: by 2002:a05:620a:470a:b0:93f:2d10:ea49 with SMTP id af79cd13be357-93f6f8151d0mr498377285a.45.1792772383121; Fri, 23 Oct 2026 09:19:43 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 51/83] target/sparc: Register CPUClass::exception_name() handler Date: Fri, 23 Oct 2026 18:12:59 +0200 Message-ID: <20261023161332.60153-52-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX7Oh1nYDrWI0U 58aUQBkxIu+GssXbldDbC21V6C2OyQURYzYlUVtFpiBUMzr6oIWqSZqN84ftQblIMe+TZcvnudz L3X75GzLmmgE1DDrRYENt+HIwFFzxWk= X-Proofpoint-GUID: zeLVG3Lvg6wvtuz3YFWta-Gh9GBFqXZi X-Authority-Analysis: v=2.4 cv=SK7Xx+vH c=1 sm=1 tr=0 ts=6adb8920 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=kEJbCHFcLIL5wbn19PYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-ORIG-GUID: zeLVG3Lvg6wvtuz3YFWta-Gh9GBFqXZi X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2MiBTYWx0ZWRfX5lH10tW0P/p/ GXjiyXcAojGuipGwVYwRMhc/mY4feEGfI/ZU9RUPgK+woUUKjvJPszRX4K5PgMyBg7IvJAc/W8V B9NcixHdwVavl+al/vneXUNFpXkxjhNOZPIYSNv+uV6iE/1ut55BAuYSIlHSaXOk3OXtqbO2ac8 dFmbA5Li3aNLZqHga7zhQMATcvzDuemQbjp0stOOdI2cg5ZfHIsxbC46sXGs8wHdmfh1C6p+KUk bk3AoZf5lMAKx2dJpfdF9qksqVpokVd/mM78vF69rMLZN3fxGw5ZR4B8wA4R+ZtyKzyCYW8KyVF S9Bl3pFvluY5V+9ZS4xjP6G+gSOzRDXDEGdxhxKJhqpxF7YKbLgdr7Gz9MhcmmnIhy9y00T9AG7 qNbqOoHpnhD5OPg/Sfq5ewxtq/TPCesc84cNt8FAyT3D/xdtg1XvGcbC9m6m40VK7lCULRabe81 Zr7bFIO37Eg9zTzXMNg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230062 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772494104158500 For each SPARC / SPARC64 target: factor sparc_exception_name() out of sparc_cpu_do_interrupt() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve SPARC exception codes to names. With '-d int', unlisted codes are now logged as "unknown" instead of "Unknown". On SPARC, the "Error state" abort message now names trap instructions (0x80-0xff) instead of calling them "Unknown". On SPARC64, trap 0x1ff is now named "Hyperprivileged Trap Instruction"; it was "Unknown" because of an off-by-one in the former range check. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-33-philmd@oss.qualcomm.com> --- target/sparc/cpu.h | 1 + target/sparc/cpu.c | 1 + target/sparc/int32_helper.c | 22 ++++++++-------------- target/sparc/int64_helper.c | 36 ++++++++++++++++++------------------ 4 files changed, 28 insertions(+), 32 deletions(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 31a16c2af03..3c1ba223eb2 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -583,6 +583,7 @@ extern const VMStateDescription vmstate_sparc_cpu; hwaddr sparc_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); #endif =20 +const char *sparc_exception_name(int excp); void sparc_cpu_do_interrupt(CPUState *cpu); int sparc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 1529f9570da..3c71f60bb4f 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1097,6 +1097,7 @@ static void sparc_cpu_class_init(ObjectClass *oc, con= st void *data) &scc->parent_phases); =20 cc->class_by_name =3D sparc_cpu_class_by_name; + cc->exception_name =3D sparc_exception_name; cc->list_cpus =3D sparc_cpu_list, cc->parse_features =3D sparc_cpu_parse_features; cc->dump_state =3D sparc_cpu_dump_state; diff --git a/target/sparc/int32_helper.c b/target/sparc/int32_helper.c index d6bb3fa1e54..03ed5dffc9d 100644 --- a/target/sparc/int32_helper.c +++ b/target/sparc/int32_helper.c @@ -19,6 +19,7 @@ =20 #include "qemu/osdep.h" #include "qemu/main-loop.h" +#include "qemu/cutils.h" #include "cpu.h" #include "trace.h" #include "accel/tcg/cpu-ldst.h" @@ -58,12 +59,12 @@ static const char * const excp_names[0x80] =3D { [TT_NCP_INSN] =3D "Coprocessor Disabled", }; =20 -static const char *excp_name_str(int32_t exception_index) +const char *sparc_exception_name(int excp) { - if (exception_index < 0 || exception_index >=3D ARRAY_SIZE(excp_names)= ) { - return "Unknown"; + if (excp >=3D 0x80 && excp < 0x100) { + return "Trap Instruction"; } - return excp_names[exception_index]; + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; } =20 #if !defined(CONFIG_USER_ONLY) @@ -107,15 +108,7 @@ void sparc_cpu_do_interrupt(CPUState *cs) =20 if (qemu_loglevel_mask(CPU_LOG_INT)) { static int count; - const char *name; - - if (intno < 0 || intno >=3D 0x100) { - name =3D "Unknown"; - } else if (intno >=3D 0x80) { - name =3D "Trap Instruction"; - } else { - name =3D excp_name_str(intno); - } + const char *name =3D sparc_exception_name(intno); =20 qemu_log("%6d: %s (v=3D%02x)\n", count, name, intno); log_cpu_state(cs, 0); @@ -129,7 +122,8 @@ void sparc_cpu_do_interrupt(CPUState *cs) } else { cpu_abort(cs, "Trap 0x%02x (%s) while interrupts disabled, " "Error state", - cs->exception_index, excp_name_str(cs->exception_ind= ex)); + cs->exception_index, + sparc_exception_name(cs->exception_index)); } return; } diff --git a/target/sparc/int64_helper.c b/target/sparc/int64_helper.c index 10341e0c282..849b1a436b2 100644 --- a/target/sparc/int64_helper.c +++ b/target/sparc/int64_helper.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/cutils.h" #include "qemu/main-loop.h" #include "cpu.h" #include "exec/cpu-common.h" @@ -60,6 +61,22 @@ static const char * const excp_names[0x80] =3D { [TT_EXTINT | 0xf] =3D "External Interrupt 15", }; =20 +const char *sparc_exception_name(int excp) +{ + if (excp < 0 || excp >=3D 0x200) { + return "unknown"; + } else if (excp >=3D 0x180) { + return "Hyperprivileged Trap Instruction"; + } else if (excp >=3D 0x100) { + return "Trap Instruction"; + } else if (excp >=3D 0xc0) { + return "Window Fill"; + } else if (excp >=3D 0x80) { + return "Window Spill"; + } + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; +} + #if !defined(CONFIG_USER_ONLY) void cpu_check_irqs(CPUSPARCState *env) { @@ -136,24 +153,7 @@ void sparc_cpu_do_interrupt(CPUState *cs) =20 if (qemu_loglevel_mask(CPU_LOG_INT)) { static int count; - const char *name; - - if (intno < 0 || intno >=3D 0x1ff) { - name =3D "Unknown"; - } else if (intno >=3D 0x180) { - name =3D "Hyperprivileged Trap Instruction"; - } else if (intno >=3D 0x100) { - name =3D "Trap Instruction"; - } else if (intno >=3D 0xc0) { - name =3D "Window Fill"; - } else if (intno >=3D 0x80) { - name =3D "Window Spill"; - } else { - name =3D excp_names[intno]; - if (!name) { - name =3D "Unknown"; - } - } + const char *name =3D sparc_exception_name(intno); =20 qemu_log("%6d: %s (v=3D%04x)\n", count, name, intno); log_cpu_state(cs, 0); --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772510; cv=none; d=zohomail.com; s=zohoarc; b=NvJpPkOqeE2e6XVCoSuXn3laGM4E+nrrP5cKbEQvlOTWHCDsOV1pHaEepGTqLlcHBwy25f4qCpNsdiK/IHBt46tSKpzuDvLpS+YO0V7urbqp+3oGT/8nSoT1Y3RLWceqFaVnamhs1w8bix1DhY9ZJxZWW2AijafHXdKJOzz+Jk4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772510; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=jd+4pzJ7im+0aRatKtS9GZJPrz/2LMxwKX/dw0iF9dg=; b=YkcxarTmw1iZCm/AEOgMZrUQRdOoe2ZQSNy3OcmVCdcV/7nSQOAsz6Iwb//jHKTIR8yYXmX4NAQ8v3wWAvzbfe8XP6UA8KvH8fC4R0C1Eo3q2M1ClETdGsNhUWcXzPwZcUf9EikXUY6zpFRQ+FtaWQaCqH3Yr481G5P450uyYU4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179277251007686.01965259293229; Fri, 23 Oct 2026 09:21:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI0i-0001Mn-Dr; Fri, 23 Oct 2026 12:20:53 -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 1xKHzp-0007ux-HI for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:00 -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 1xKHzn-0002hK-9A for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:19:57 -0400 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5xk32109280 for ; Fri, 23 Oct 2026 16:19:52 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqms4gs3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:52 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93cb6391e89so230439685a.1 for ; Fri, 23 Oct 2026 09:19:51 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a9062ce5sm18440385e9.1.2026.10.23.09.19.49 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= jd+4pzJ7im+0aRatKtS9GZJPrz/2LMxwKX/dw0iF9dg=; b=h1r0nYxiSdUhSbJo +Lv3eTHrL8nyUjvKyaldzRwTFjQQOgSihOGzM5NquT6oUoTsvPIUeto2x/Ij7tjp kY5/9PdBuaZkTngNyoimXqNOsu+AdI5Sb7AvfDwgiud16i8ppH9KWtCF52hg4nUL 1QmAufxOGhQ1Bj8SZ7kdGY5pan3fNLk0ss3XV3Oy44S71+Zm1UAz24aOUbsj8scD M0CL6srZNgcRxV7//ui/LRzcZdMqAsWhTIXiWct87z4wXky9iH60lqFvHB07nlXE /vWZLPnst7wjzuHNLhIMElYtXCOj+RPtBCGDVzgUxFFqtydK65pzazUnNmm0GcT5 8oPRAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772391; x=1793377191; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=jd+4pzJ7im+0aRatKtS9GZJPrz/2LMxwKX/dw0iF9dg=; b=LOI83ABCgha683b38IxD+N81G/pmivcsPyS6FP9dZ2BfP34N+9mqPtTSD60Mss6y4P 86FQBKPCkhFVZxAx22VKSY+s6ToqsNnMs+uc6FEXxpo1Fkzzv1tsWSo0/ws7BpRXYMxv yzAWS1t82+OwCFJOI3NNV5XM6Y8HBpUX8uiaXOeM8U/NknrMn1M6/1wL/PmO5kZY3R8Z olJSt856zK6wLYiKeroTRTgCeuYEMGvZz3XHRrEt7N+ENN7JaRihDIIAc3B89jkyzFLI u1pSeXUzDgsu/PvGIWxb12SUBwnlEMOXattbmHwscZ29FLpV+gTFc6M3hyhYHCLn4RBU KvnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772391; x=1793377191; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=jd+4pzJ7im+0aRatKtS9GZJPrz/2LMxwKX/dw0iF9dg=; b=TAZzBMOvlOoBYSZw/8OetIbl45WBYyYyoSNgwuBBzGUnlx+DOT7v4ZmHz70TgtqKMj TirY/fQr2T9rptRPoL+UuUk7p/uqSquvpUrFV3vPDFbQuiimDYsmCwsIgNVMne+V4Ia7 FuHjLJjbWAXOSf+yp3jn+v4Nb/6DY1hFU/O1cXKSpsDjWGGLORpejclQc6HDWLMf4N+U Y1H0t4YnLxN0QRNebw8yeoyOgr3vq7ac5YcTPj9aufv2/yD5nHZuvJNyB3WZMnJW+ppR 1sSAjIZUpEO+1yOxrHUBnEMnZg3CX/3D+S6hPiKmLviplHiPfq2LYPC947kAHzUsthpL +yzA== X-Gm-Message-State: AFq9FYKRxWOi/IJZlK2g0eAT4zbHHyo3hjCMEYtHcgO5h3AOvj9Wwahs LZKs39BLtK4RejYYxBu8XVUsR3gnf+WaFxdvS3skrSPs1NhQ2UyDP870PcQVVAXFi4rycQqg8wV bWNs5vCfpUc8UgsiO2DUofHjxhTQoIofGilvJRrIUHPOXhsru0iDxj4/3RBaunSX+HVQw X-Gm-Gg: AYBFou32G1JeTBQVMZKs7pI4ZPHrmdwrSNuJ0L4hWpaSlcjKFMb+hlBVQFY/WfWpt5D wqTPKBruOX1uxMt83GyeIRvQvZwZDssRNo6ak4e7pMqoMcGzfLmJe52zkrQEN20k9N/X0vmUJ9+ 26RZVzhZAWadjZJey+us2MEfYceUrqoP+8UQ9bU32b2l8W5WuzEESeyBYtSav4FEbk0LMe7dgL5 VcK8giasrImxAKyIFrbw4koDYGvkdCameQsg+X+PPoLPhvnDWcLzQ+mQ+lXMXPE9nXnhtDoaq2h 1jJP/6hEdU/Y5CLwscSjhMjcVENkXZeZmtrgB8J/vN7ztX5ZNTyo0vmx4dFDk3v9i8rqik5xgPk lg0FkoKS5O/3W5OHcB2DbA4fczos6MLMnBpLuRTa0 X-Received: by 2002:a05:620a:6008:b0:93e:9934:d179 with SMTP id af79cd13be357-93f6f8399f2mr484729585a.56.1792772390717; Fri, 23 Oct 2026 09:19:50 -0700 (PDT) X-Received: by 2002:a05:620a:6008:b0:93e:9934:d179 with SMTP id af79cd13be357-93f6f8399f2mr484725885a.56.1792772390203; Fri, 23 Oct 2026 09:19:50 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 52/83] target/xtensa: Implement and register CPUClass::exception_name() Date: Fri, 23 Oct 2026 18:13:00 +0200 Message-ID: <20261023161332.60153-53-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX7QHScnnUzlHO qFvnj74TM9CIrXpT/3nZT5CYE698qRbQoJEqc2TmEAR4/2G8M5efX8Y73IPzQeZP3jisQoYFKxU bg8V712aQOb+aYlBoyNo8fNcZ/WjjaARhpGgkd58GzkrCEhtF+atT0v3WQWBhiAXDUPFDLtgya0 zPvlx+M6MF9TqfWtBfN628D7c4XLsCys6At8gG3Bq6xfIyitmiZdkAztvCruZWeE/zMCvxj6hwc cCnsbNkSXu8wENdeIsJOq3wcTxWw/P3sQuWI6JSNbc4dmcuET/9qAMFhVofpUi1DbX+B5fgCclQ LtWmmWCtP7ZFnCDaLTdjI8cm9jnTU3ljyJUFbM8f0QkrmPf0+7OVJm2AfWcGZkd8Gn+zN/Rrj8R psruwGci5hr15GkDPWpzk6A6+urNyuWrkYKSSYFhCSl0mOl+YDHZg+N3GFMV/B+9Jv1AFYTE400 dPQ2fznwzgKxFkHziWQ== X-Proofpoint-GUID: _1OhWvvqtvRbJsfHSFFuQbkusR5-czET X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX8bUE9VPSAk2R uiSBL3DzbwZ7WL7Rt4epVQksAh3JhoorZRIzuEJkfv2UbNpw8OBzFn2udpEfZ6Z/pjGpewV0xIE ayVpbegSHG2agx/NhDMW4IbaRrK3Zb0= X-Authority-Analysis: v=2.4 cv=UdbE26SN c=1 sm=1 tr=0 ts=6adb8928 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=-R6i_BgWeFa1qxdD66wA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: _1OhWvvqtvRbJsfHSFFuQbkusR5-czET X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772510320158500 Implement xtensa_exception_name() and register it as the CPUClass::exception_name() handler, so the common exception logging can resolve Xtensa exception codes to names. Use the new helper in xtensa_cpu_do_interrupt(). With '-d int', xtensa_cpu_do_interrupt() now logs the exception name after its number. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20261022215115.19680-34-philmd@oss.qualcomm.com> --- target/xtensa/cpu.h | 2 ++ target/xtensa/cpu.c | 24 ++++++++++++++++++++++++ target/xtensa/exc_helper.c | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index 49d6ad9083d..3440c27862b 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -262,6 +262,8 @@ enum { EXC_MAX }; =20 +const char *xtensa_exception_name(int excp); + enum { ILLEGAL_INSTRUCTION_CAUSE =3D 0, SYSCALL_CAUSE, diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 99c8bd4b5fb..c193396928f 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -29,6 +29,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/cutils.h" #include "qapi/error.h" #include "exec/cpu-defs.h" #include "cpu.h" @@ -239,6 +240,28 @@ static void xtensa_cpu_disas_set_info(const CPUState *= cs, : BFD_ENDIAN_LITTLE; } =20 +const char *xtensa_exception_name(int excp) +{ + static const char * const excp_names[] =3D { + [EXC_RESET0] =3D "reset", + [EXC_RESET1] =3D "reset", + [EXC_MEMORY_ERROR] =3D "memory error", + [EXC_WINDOW_OVERFLOW4] =3D "window overflow", + [EXC_WINDOW_UNDERFLOW4] =3D "window underflow", + [EXC_WINDOW_OVERFLOW8] =3D "window overflow", + [EXC_WINDOW_UNDERFLOW8] =3D "window underflow", + [EXC_WINDOW_OVERFLOW12] =3D "window overflow", + [EXC_WINDOW_UNDERFLOW12] =3D "window underflow", + [EXC_IRQ] =3D "interrupt", + [EXC_KERNEL] =3D "kernel", + [EXC_USER] =3D "user", + [EXC_DOUBLE] =3D "double", + [EXC_DEBUG] =3D "debug", + }; + + return STR_ARRAY_ELEM_OR_NULL(excp_names, excp) ?: "unknown"; +} + static void xtensa_cpu_realizefn(DeviceState *dev, Error **errp) { CPUState *cs =3D CPU(dev); @@ -347,6 +370,7 @@ static void xtensa_cpu_class_init(ObjectClass *oc, cons= t void *data) &xcc->parent_phases); =20 cc->class_by_name =3D xtensa_cpu_class_by_name; + cc->exception_name =3D xtensa_exception_name; cc->dump_state =3D xtensa_cpu_dump_state; cc->set_pc =3D xtensa_cpu_set_pc; cc->get_pc =3D xtensa_cpu_get_pc; diff --git a/target/xtensa/exc_helper.c b/target/xtensa/exc_helper.c index 7cb67d179a8..ff71e5d6462 100644 --- a/target/xtensa/exc_helper.c +++ b/target/xtensa/exc_helper.c @@ -236,9 +236,10 @@ void xtensa_cpu_do_interrupt(CPUState *cs) case EXC_USER: case EXC_DOUBLE: case EXC_DEBUG: - qemu_log_mask(CPU_LOG_INT, "%s(%d) " + qemu_log_mask(CPU_LOG_INT, "%s(%d:%s) " "pc =3D %08x, a0 =3D %08x, ps =3D %08x, ccount =3D %= 08x\n", __func__, cs->exception_index, + xtensa_exception_name(cs->exception_index), env->pc, env->regs[0], env->sregs[PS], env->sregs[CCOUNT]); if (env->config->exception_vector[cs->exception_index]) { --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772437; cv=none; d=zohomail.com; s=zohoarc; b=Z3J4jItBVbyDzI1PsW9fGZJXDPboNxHLeRSp/cgoCDMVqOZHfulidLaX1TEXG+66UfYtdveyk1lDhmTxhbQH8l3sq+jKaH6N2Ra3ZJWk5XmQrJ7m7pdIML/ku7rKPt5q1BjuQdcN/hSGYWm3mpvonWkkjEmcLPLq4rp4y4hHYFY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772437; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=/XADBiqfGEepOXL74Q/I/CjMCNR2e56/eosGamhb89M=; b=TEkDe3tS98Mh15S44btKDpF9Zfnq9dF9zTFvuJKMSDXK4CCeuIxiFL0m8glz6J2aqse3HJkwMFl7/9q1dnw5dK6o+DAy2Es2hQtdYwvlKg2vAurw6/TKw4JJRTETF5EIoc0cT3A7nptKvXHuOPu31Gw6Nl9WDQCik+wPrt2Y8DY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179277243745566.27341095577674; Fri, 23 Oct 2026 09:20:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI0P-0000RU-Q8; Fri, 23 Oct 2026 12:20:34 -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 1xKHzy-00083x-M8 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:07 -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 1xKHzw-0002iN-95 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:06 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6rNH1492209 for ; Fri, 23 Oct 2026 16:19:59 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauyma-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:19:58 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f3969a2a7so177819785a.2 for ; Fri, 23 Oct 2026 09:19:58 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d41e0fesm699302f8f.46.2026.10.23.09.19.56 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= /XADBiqfGEepOXL74Q/I/CjMCNR2e56/eosGamhb89M=; b=OpsJL0pj9NKiD/Tp E2fCyiM9axowuG7ZpCShQFB9Nwx4ndhQBQttmRC6Zcy2IJU1N0EMEWzP7AZmb4tn sH1EQMynZiJUpPhgSHtjh5UkN9eA9fImRoY05/oCMa2cxDsyvniWjxyaZBPEfiI1 PvbhgCBIl1jn28tOVpU9i/UEt9xoOM0+S22yBPIMBiFzdZeae3oGUTGtqrABZnie wdSqhNUQQ3uwx661gasJwucUR+JzmnOxSLxTpO35waL2WRFI5nOvOeMBzgfjW0yH 4DdsYVsLpB5QwJKNIulGlNNolsjn7li0oklvcc/dHMQ0kmkjSRjvcs6qPvCkBzx+ idWS0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772398; x=1793377198; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/XADBiqfGEepOXL74Q/I/CjMCNR2e56/eosGamhb89M=; b=jDhD5fz+9ewhCDEHRgo69EyqDBJ4uS63mr6rLBCCicgpG2Vc39CU/THdfLm2mIUDCo aAsHMx1atsqc6/nZZBNLalWKMCqwVWer6mwToQ/U52ImgPlM+7XT7XDoNDyCKLD0jen8 pTMWkZjifFT4ozT466NFnBkSJClopaHUo7dQaSldqIr2tbm9dlRW68TiGxm5asQd6HGM gDdsuQeFFu3OH7yaeujwJ/1ldo4lb+OpLaAFIGu/LvpYotg89s/rgCF3PrUFxd1WJxjq Iye/bFB8Ch+il39O5z9B8wDS8utRkJ5p3a8TGYnZK+9gbzaAZp3KriNfqQ/i+ttm363I cmaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772398; x=1793377198; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/XADBiqfGEepOXL74Q/I/CjMCNR2e56/eosGamhb89M=; b=HfiP4emKuKdGYsgpl5teuPb15FLuz/TGqaq8zpmKj8NHgUWx/fYeHo7Y9deDWW3WBb gr39B7UZCu+RuexnntHnYKXqlCufellNd9E+OC2cLENv6vQrhmwpw24nMrWOw/+eDbSp lOJy4/bAcS51aQMT+jaHPGwgItCzIT0r7sh/mCi6cfQN2XYxvITSw98OPP3c2Bx87G/3 yXhyOYbNRJf8msIzepL3OqHzz24a4qz2uwZyevIbV/JhsTYuRTpw0uU+R1rP5ENZx4bF MX9L3FWHZy267ghUicFnHCKUL7uoatf3SN5RlppyZ72EmMQV5GPdvjb9GEJDkCySDd5Q J1PQ== X-Gm-Message-State: AFq9FYKiEzOAxwUK2DGpSqDSPFRJPL0pWJUvqR0/4GfQdCHErkzskt/Q 6aajKaIqMs10RAo6IsTvqHKkAblMnq2+SLrTDk1eFJHFPEDA/2MuUhcF0J6U5Xp44GM3/hRYsl5 R2HhBShB46Z/3o7v3g79gsBucnlxnKGJI1sCy/SZmrV2gwdnwuQM07fK8CCIPTzkOnag0 X-Gm-Gg: AYBFou3qM2HCjKfzqXczZXTs31wcBzRXVeNukAKyQC+nUI8+syPzF++28PrJN1eLxwH bzDrd64G3aKjJYpMxmxF7toFrGz6RG0YW3oFOLgQoZWU4Ybx+Cgxqw5ABHNJYK3hABAE8b601H9 tM4bicPzu18uo/PN2msdiMcFxhMx7txRbn0D4Qtu8FviZ6aokcboyuQldQBuKiIlHu25NW3g7PV QSEKXJG1YqqV1XzGWX6zUkwfxJUXLJAKpv0LC21n3CaRdcCjZIDxJoG3RuDHQF0SUjOoUKTn2Ma 4aWIyCYNxYNOayr/rmGe2LP9SsjrsuEUJdx5i8YEvaroMSxU9TjyzSrD7DUV6JquFNSFj0XGLSj tpUlc8bgXILz2r+i8cdkRlpitupGNPz58xSg47qkr X-Received: by 2002:a05:620a:4041:b0:93e:e24b:32f2 with SMTP id af79cd13be357-93f6f58a47emr507571585a.8.1792772397721; Fri, 23 Oct 2026 09:19:57 -0700 (PDT) X-Received: by 2002:a05:620a:4041:b0:93e:e24b:32f2 with SMTP id af79cd13be357-93f6f58a47emr507568085a.8.1792772397205; Fri, 23 Oct 2026 09:19:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 53/83] target/alpha: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:01 +0200 Message-ID: <20261023161332.60153-54-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb892e cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=v2UZkA9Hg2A--4dwkpcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXxIYj2n4vXeEv D0TmcE4Q4x+/7v7kAHEdjSXyHPnQyVCjxtISg/U/PmhLv8wcVktToMP2PqbeDPLppg3lXCg0xNA fgX92YZFnJm3Mhfr0JBJbKqOqXiKkww= X-Proofpoint-GUID: -6bbG4XHejm2lr9_T7XeJiw-b-HaA5pU X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX7GqXDMYZ7YGS YsyRJ9YlAbnz3G7Sr6Vs5eX7DgxmNSA4wunEKMJmCkJGLilgC9vOh578zFVDV7Te1/TAooRIwqE RVJT33Ijdr0JxQqJpyVTPtFyFcvupy9M/z25RAZqKfjPzkkQDluW1ZCerxv6dsS3ATZxXIoOpoW OHs1eD33Qil/N5FLRZ+z1AS+HG09ihXiVAzA8HliobGoDtTQGvPXoTq/Fkt8ezmXLvRUugsJNj3 F1rpXX61Ecez1yFo3bi5QcdBHU2vJ+GyWZXetwBTEzzqCtIcX3bpYO89AfQW48IHp70aY4QOZBL SWEme85nC/t09bAZsj4XwwxyBi33/1EUvVLPWF8fLssA0UGzoJutj+QUdd3QzYb4pQklViV8Ipo 68PRuwA82Lv5RdhcUgqN8a0BC717c+tW432SDsgHDA6UeQjz17hvOi26jAO7Lry8uOYBp1d4ik4 N2ozYICeUW2J/2YwQjA== X-Proofpoint-ORIG-GUID: -6bbG4XHejm2lr9_T7XeJiw-b-HaA5pU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772438923158500 From: Peter Maydell Convert alpha to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261020122752.3651914-2-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/alpha/cpu.h | 3 ++- target/alpha/cpu.c | 2 +- target/alpha/helper.c | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index 8f780502476..5b2280c6095 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -282,7 +282,8 @@ extern const VMStateDescription vmstate_alpha_cpu; =20 void alpha_cpu_do_interrupt(CPUState *cpu); bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req); -hwaddr alpha_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool alpha_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); #endif /* !CONFIG_USER_ONLY */ const char *alpha_exception_name(int exception); void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags); diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 6e514dcf4cd..fd099c8e70f 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -242,7 +242,7 @@ static void alpha_cpu_initfn(Object *obj) =20 static const struct SysemuCPUOps alpha_sysemu_ops =3D { .has_work =3D alpha_cpu_has_work, - .get_phys_addr_debug =3D alpha_cpu_get_phys_addr_debug, + .translate_for_debug =3D alpha_cpu_translate_for_debug, }; #endif =20 diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 84997ef3a99..d59ecc0d4a9 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -317,14 +317,25 @@ static int get_physical_address(CPUAlphaState *env, v= addr addr, return ret; } =20 -hwaddr alpha_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool alpha_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { hwaddr phys; int prot, fail; =20 fail =3D get_physical_address(cpu_env(cs), addr, 0, 0, &phys, &prot); + if (fail >=3D 0) { + return false; + } + phys |=3D addr & ~TARGET_PAGE_MASK; - return (fail >=3D 0 ? -1 : phys); + + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 bool alpha_cpu_tlb_fill(CPUState *cs, vaddr addr, int size, --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772589; cv=none; d=zohomail.com; s=zohoarc; b=Th+WX/ZeBOnCEAB25LBoebW6zp2SWwaodhW/UWsP3w8GUi28XXztOxEdXHqd+AN6lkpc5ifZg5XpYsQ8aG8rNBZkR5mgjCVIkH6dljl2CW70UHCjfJSIiHGz1Nbub2Ur7R9QAD/F+vdVmVTffTmhrEX9Y49nkd03O8q7QswBzTY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772589; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=MQOSlIhH5HaG4TUBGOkgZqSBCSIqYLvSsT7ISyBL5d0=; b=UT+wDAs8e40lQt2+hPQvvbrNQ5KFusNoO4r1LTorsXSRMNTusYQbNLO05sS4UnWe93lu//slMPJyP8xrJfVapU0ANeeTONVW25QLPUrM0g1mbDUVzdZLNjp2hR8ShLX6HBBYg4J8diq6GIBFlbw7+8myGPiFHk9fzKq/+QUlc+8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772589520857.1157242412435; Fri, 23 Oct 2026 09:23:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI0U-0000h0-9q; Fri, 23 Oct 2026 12:20:38 -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 1xKI01-0008IX-ML for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:11 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKHzz-0002ju-6L for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:09 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6Pl63000350 for ; Fri, 23 Oct 2026 16:20:06 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7cn0w9b-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:20:05 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93f33438950so242579085a.1 for ; Fri, 23 Oct 2026 09:20:05 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312fc9caesm4288665e9.3.2026.10.23.09.20.03 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= MQOSlIhH5HaG4TUBGOkgZqSBCSIqYLvSsT7ISyBL5d0=; b=D4HBAUM3N04AnfaR K8YkUheSw6N9kb8ae8MEQt+yUTLn/dKI2ZttaZWRZI6o+LOn8LTagmz5INHs/low sI1SzEFjwcI1fH2V3TqzQjJ+tMaIAnZCloYxRCYa+0jDfsp97uoghB9+5yekjjzp EQJMWQuPGWYqV58N15pqphJCCuXxcHvuk40YTMbvCZAXLqWEEd4SeY2zULNwr+rL VCTr1flMstrmofixJOm8zjBvRT9tF8INZwM2KtJIpQZCvZNHLLiE/cuK89DsmMMg vPxroddTPFMJJvbwdT35MxrkeaG/aFGvXyT9P6umB39FF6XMSwtVsalUuPTZsnjS aJdiXQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772405; x=1793377205; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MQOSlIhH5HaG4TUBGOkgZqSBCSIqYLvSsT7ISyBL5d0=; b=H/PIb4TNMuDQ3XVVX5eaFOgUMntbouKqjEr4gSyfxA2+isPND5LQOWLPpNt433IVNo Lks4f597S4Yl1iyStafg1+g3qLNS90fux94A22CXGIPltDzrN62Msi0CPYJYZzwjxEiO H55FlgEBSwG0S2HRcVuf50sHfn+PzIAA6f7p1jLt/xa3lqAXjl0KIf5eoi+ldTzvurQJ uHdpkzNsdskp85XqmlTPQIROHgKir4/Jnn11IF6E5V9x1PkYgXZdBGocsB2Cm9EOuVu9 EqzKUs1eNFuTew7g+CC516jjqpYSakukhTRFAK/PPS3G+fDcjzHL/NNjwj6vmItuFU+o A2bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772405; x=1793377205; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MQOSlIhH5HaG4TUBGOkgZqSBCSIqYLvSsT7ISyBL5d0=; b=uvU2YJjaU1ANd7r7g9yy4wYVmGtQlFArjonMy5UJTf8GzJwlxm4A+NHp1osGWW29U+ Ci3gRfqKUmFC70f/3mun+VOS73i1MitELpbSE25tpXzXcoPcJvOcqE5jwb8tOijJgNeM cae0mDZyR8ZVgIMY9zo5/YYQZVFSZGx9pzc5fdP/8Cu9jrPHV+0I3AwPeXWmGvsai0xA MPbjpjpvnmV76Jh+NDyqJoVkp6D/RAcoipmxcSEOe6w0tgFKCUJqPWphn4yt5aQ7xMzS 8LNV0wIQb3D9pO3YUei9holQ2LLvZNA7ZdokHLLAJfBBGSQaLkScjVeL+0wdb8en7lC0 MQoA== X-Gm-Message-State: AFq9FYKz+6rsGKjdAN3HSvwHug6rwsqeZhuoCjUToxlma+QLwoBQ8p7x zLCu80acFkTjvtBMC653ztVvD4WC9vgYmSVuGNPQCd6JHKpIUNUPS11OomzrQ+YeIphlpKqyoau 8a0CHFwIb2yQ0kYxsP+J0pwU9pBSc0D3Jfj8/b7yQLORJ/5ChY/o5m1Z6eDIY1Vxzg5oS X-Gm-Gg: AYBFou1n7r6LW22G+K2RGEAsbnZagEm2exxawy8iVQkOFEWR86IZuMx4NwaR5Y7uEXc 0GFGDeBsvuD58A/ghrUk2j3eRDNccZ2TcD3sUE9x0SYTwbrBknwudxJtc2BddKbix3IVD7cEhpb H/pqYn6D2PBlOzaYqs6FRg2YLPy62g3khglc2HtEcDHCjg+SkvpiAw5zd7wLg+4zyx20Zf3cU3R l+uaz7CsWA606HYwloL3tWh5+2Er5XCdYdKaObIQtvOkKaWKp9TOwqn0M2wNWhDe14pBgn+YvTV 7eRyUmd/MMykbuTJfQVOofm/9ZXo1/nVMm+CtIva+fIxJbiJBHu5ZFpy+rVFgb00Ps9zAuA407P RBLL+A8NiOMHS8Hl1LkfLZvQDhUyq3ofZJyI6dgzw X-Received: by 2002:a05:620a:4443:b0:939:5cd5:e243 with SMTP id af79cd13be357-93f6f54d441mr470542585a.6.1792772405295; Fri, 23 Oct 2026 09:20:05 -0700 (PDT) X-Received: by 2002:a05:620a:4443:b0:939:5cd5:e243 with SMTP id af79cd13be357-93f6f54d441mr470537585a.6.1792772404796; Fri, 23 Oct 2026 09:20:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 54/83] target/avr: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:02 +0200 Message-ID: <20261023161332.60153-55-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXzpSl4mxq8esE ZtiN1LOiBf3BA7WCem+ZyBofeN1IJThTmH4/InmFIAzvZeZa4jiQ9vC5daZgyOGDpZw8YEByjYf GHr/ahwU0mwwwHWzPqz0GyPFhdHswYA2TK5p4IvnzPbUS+VL3ovI4NnE1Y9QiKPRnLt60LhTgFD vCufm10LOPuF2Bt5znpat6AHJAHOzix+qPa25mYV8pelHs5xyOpwQ8rpgh7KwiZupL6dLjW8vOI F3w0kH9Rk7l44K51IAbuapv6d74g6mpCiULZJ/CgaS6fL1MoM0dnA8FIfEsFvY8Em/vNNxL7ZQ1 csQf0lW9ewJT+CGnm2anoFJwGYrBDMIcQnhiqajk1GKb/1Wp4SDyFre0b3ImtikMycAIOZ9J8aN 6FWlFWCY646m3z5lJaCSFmcErAKTk/kKAagTqrK6f7scm3w/JWda+s3QD3XKvA69BNWn8froDPE wlDX+a+XBPrCMj/qLxw== X-Proofpoint-GUID: ikxVgmyJ8iCjl6VRoDLFFYONC9_qavWN X-Authority-Analysis: v=2.4 cv=a9mlZkSF c=1 sm=1 tr=0 ts=6adb8936 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=ZncIJZGNqlsG_wB1ppsA:9 a=0bXxn9q0MV6snEgNplNhOjQmxlI=:19 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: ikxVgmyJ8iCjl6VRoDLFFYONC9_qavWN X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX5TsgLJbiLSPC QK2XtU0gy2t5PqSxHE2t7xS4TRWIufuQELpvaA2pVDN2npxp4IpevJu5tu7ZJv4H0NJPHyI5Qid GP9EgJMhfgSLzOTSI58FtWieGudZfpw= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772589777158500 From: Peter Maydell Convert avr to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261020122752.3651914-3-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/avr/cpu.h | 3 ++- target/avr/cpu.c | 2 +- target/avr/helper.c | 11 +++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/target/avr/cpu.h b/target/avr/cpu.h index b1b5b637617..a98fa6ceadc 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -179,7 +179,8 @@ extern const struct VMStateDescription vms_avr_cpu; =20 void avr_cpu_do_interrupt(CPUState *cpu); bool avr_cpu_exec_interrupt(CPUState *cpu, int int_req); -hwaddr avr_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool avr_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); int avr_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int avr_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); int avr_print_insn(bfd_vma addr, disassemble_info *info); diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 244871e5e63..83710f56518 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -234,7 +234,7 @@ static void avr_cpu_dump_state(CPUState *cs, FILE *f, i= nt flags) =20 static const struct SysemuCPUOps avr_sysemu_ops =3D { .has_work =3D avr_cpu_has_work, - .get_phys_addr_debug =3D avr_cpu_get_phys_addr_debug, + .translate_for_debug =3D avr_cpu_translate_for_debug, }; =20 static const TCGCPUOps avr_tcg_ops =3D { diff --git a/target/avr/helper.c b/target/avr/helper.c index f452c9d9040..8f90b8d9a45 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -108,9 +108,16 @@ void avr_cpu_do_interrupt(CPUState *cs) qemu_plugin_vcpu_interrupt_cb(cs, ret); } =20 -hwaddr avr_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool avr_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { - return addr; /* I assume 1:1 address correspondence */ + /* I assume 1:1 address correspondence */ + *result =3D (TranslateForDebugResult) { + .physaddr =3D addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 bool avr_cpu_tlb_fill(CPUState *cs, vaddr address, int size, --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772662; cv=none; d=zohomail.com; s=zohoarc; b=kE6mP4hBZ5KrCyDqF9VSINu7qVuJbJC87tFwQ+S0uBOVQcv7wH9QapsfcIu5W1iLOPrUYzEyzbwt5Xd653y/b/C2pMAt03UZpHdbR8q2YJHYa7hsKYHfN/xZhJKyN7+61UJxAYfxp+kXu1N+y8/cx64DE8R8IJ48nlfkF+vVKrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772662; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=/5Zc0y7WfdRouFj8DsBNduG8+Z0M8WHegrOziiA/Tww=; b=jm45B74Nv1736sK5Llo3n0/2Hw650S41nuPAPPSIW6D0MxDoW2O3G2OUX/pizVeCNNK2ExTEZAPC7BXs3D898OxBuO4tsmrvO8flXRd37g040MXxV+mJDMqoGECg7v1/ksczWFirhjxmGGnwZ4X3qT/puO4cjca2vWylviuaMos= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772662925460.015505064158; Fri, 23 Oct 2026 09:24:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI0Y-00015F-SJ; Fri, 23 Oct 2026 12:20:43 -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 1xKI08-0008TE-OL for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:21 -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 1xKI06-0002vl-T8 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:16 -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 69NE5wAO4063399 for ; Fri, 23 Oct 2026 16:20:13 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrch5a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:20:13 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93ca9b53afaso320588785a.0 for ; Fri, 23 Oct 2026 09:20:13 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d4048c1sm709936f8f.29.2026.10.23.09.20.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= /5Zc0y7WfdRouFj8DsBNduG8+Z0M8WHegrOziiA/Tww=; b=XTIab7APdfgi1v3q ExT/srvqOKvsHBAiacy3cxXawDMrndQHHLbGtyjocs6MhuNtZe+XHphkALE+weGb JHTzjZQm/zrZWgU6zSFTV3Qbu8/xevWb+mDD7Kjei36kZwQhXemR5no3QtpSuVdY rs6qMjRHF5oGH10Q9l/Uo7RAIG4OXUFkalr3Tp5h6EXp1wBAZ9hOe7v80pSiUVtJ psrbv7i4rMBSJ1NGiI8bFGN4/YSrf7c1R4KVVf4ApKJGJR6OJkTsw17ZjezvGWl6 V1ETr04ULohJa59AJoQ9FIN4BHO2UEJ57jZaVcC0d1vBSjo9qx6esNKQtExv8Wf6 HVuUPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772412; x=1793377212; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/5Zc0y7WfdRouFj8DsBNduG8+Z0M8WHegrOziiA/Tww=; b=Nl4ZwIJfQKp0LolYEJ4IHgWE4ME8tGElIGRMfv2x8dd7i2CMlPTgWxzb8wxqeVZk4N h/J20V1FaPOaKGg9WQMoK/RCKCcBjLOX1eRhdlczyQV19zbnLTrBrVogqhF/Rhvd6yoz q42tACdmoth/PPCT6TqD+UDrIPgj8wE+RqMH1K3BhN3qf9oL3px1L4gKPaMGtFAVz/cb BfgdMAauy8fHQYqOrRH3eMU6/l9lfOX58+Fyf51AxvGhU/I/Z8+PgNrh/TATEbwNvXNf b5XsvrzRFLRZC+pfdG+SfiQ+Y/iDWQfuXQ2XdRQGmwdwgQ3vwJWU/CzvELPshSasKwvE LKkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772412; x=1793377212; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/5Zc0y7WfdRouFj8DsBNduG8+Z0M8WHegrOziiA/Tww=; b=XzYAWFWkMHIwUS2DiMcrVaA7b7i+JzAFc/atwcf631HxVJJfKb/cozVHKc5q3cTK+5 uBamR/wxvwvPSncblvqjNsUpg8ZtVhCbdvjcL3/aVYPM6F5w3rzcF36lrxsBo3Qrq4SE +u/OxWXbJAt+T6l3FmzxM1t/7/VFtCZUyrix/8rLC3tGDS/hf7biUGbx6Kz0AMhno5EO gJIXgOoMGS/nQjXEvhdFkRIEqeDRRzzz4ShOCvHbx7kPupjQbFx7ytxRCKZv8bFobfi2 4jFUA0SPfvmCtts0PN7OJwBXvtHjaNS4hqeKeOiTOz92tXi9mtFOGsLFwenpAJ2FfacU 3UhQ== X-Gm-Message-State: AFq9FYLfa8igLQ82zx11p6f5ifIpKu4hcpP7V/aPm1n0l286qIfp1nqi qAkxBwntDOdDGB0uheyQ4dgVg39i25U+2euAZXO/YQAWq61bwZiE6XUGdIx0Ml8lk0BFrsdZBxV QCj7ARSeEkr+vXQr2/4RllF9DK1YfLR8A8Iw9XsOGjEDtabmOy8Vz1KeA5NCjt7qcaC1d X-Gm-Gg: AYBFou0XcttE5/mwDFs9pfu2ru7LuuL0dCEaAtmMdBoX24bHf372zS8VMRZ6AGmh18e rVmSizNfgM+gTGZO1JpoEYqbwynckUV0joS1lWqPZYX+zd1CS0BxOPzotO3PUEGhaklWhakX+X4 m+IpI1FN6YzT/5oPiu8ZQTcod6QjB7wl3tz615BWe9LdrcKzvIchxgfMuMIlSzyHvl5qsZjuCqd Juy5Xm3a41wyG2T4Eodcd6TP3hU2rMN+dlI27AJu/ccIRr+jnnbFYsJM3T2RktlGqr2L+h7JzAF dSazRiTZCz4eEScQuB4YTVk+U/mSVWCZru6xGXq8AlYQJZpEPKQRslNBdxBceFpOolxzlB+B/Hf /47qqBPmyC2Rf/mPpkTPgvolom97iH1GLCRFPGb+u X-Received: by 2002:a05:620a:4515:b0:93f:26d6:d70b with SMTP id af79cd13be357-93f6f787243mr516788385a.29.1792772412421; Fri, 23 Oct 2026 09:20:12 -0700 (PDT) X-Received: by 2002:a05:620a:4515:b0:93f:26d6:d70b with SMTP id af79cd13be357-93f6f787243mr516783685a.29.1792772411891; Fri, 23 Oct 2026 09:20:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 55/83] target/or1k: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:03 +0200 Message-ID: <20261023161332.60153-56-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: _0U3o-o4UiKcilHnB2wgCwBu9s2gxD9e X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXwI4ZppAVCXCX 60OaY/oLE3hv/D7/HU5yEpTc6tEWwg6n4U+Z/8U860of0i512yF73O4QBdrfZM/4C4aeI4iXmsd 6l+Z1tT2pHj6ewrPAfCuV2wxu5F9AmE= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb893d cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=6LqkmPY7H80bW4kP3U4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX+/WKT6nMrR0c nbSgRWCJjRBwMIH5n3BXdAUJv4TqA5oc90WZBJq4eCLk0olQnesWIl9n2suhTPXhWIUTn3gT9vb rdec554YhQQ/xpmW7DJBHzn/igoS11tdU6iTc05crqHvOUlzcLfcAyCK6gUrcaR+CLP+ADd2701 V2Y2qIBcw4F6i/5+bRFTQc/pKiy6gPH5L5dfr1ybdBolPs3T141RABdetQHw+pdybnuxYDsBU+W u6hxJIpguVbE7jgJ75flXoaFxPWFtghnA8foK0qjZS8T02Gvh/cMrJNMS1mBRClIvnW8SDTisFh mYvhMXakPrKuY6D0iWJ4brsIrDeE20HREu5saHsFZ//d2qu1KD+FWZBPPUG9xKxIaTbIiNgURAW NEr4Ev2z5MV2UiwvgwGWX4aUFy9njF0y0lilMaLrO8buLodPMHS14+vLPs6mpL4chsWVv9UZWhg dwMoPQnK0flxRD691dA== X-Proofpoint-ORIG-GUID: _0U3o-o4UiKcilHnB2wgCwBu9s2gxD9e X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772663182158500 From: Peter Maydell Convert or1k to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261020122752.3651914-4-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/or1k/cpu.h | 3 ++- target/or1k/cpu.c | 2 +- target/or1k/mmu.c | 21 ++++++++++++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/target/or1k/cpu.h b/target/or1k/cpu.h index 96ed1779fae..50a665eec01 100644 --- a/target/or1k/cpu.h +++ b/target/or1k/cpu.h @@ -298,7 +298,8 @@ void openrisc_translate_code(CPUState *cs, TranslationB= lock *tb, int print_insn_or1k(bfd_vma addr, disassemble_info *info); =20 #ifndef CONFIG_USER_ONLY -hwaddr openrisc_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool openrisc_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); =20 bool openrisc_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, diff --git a/target/or1k/cpu.c b/target/or1k/cpu.c index 5aba8a42a95..8537d1a0326 100644 --- a/target/or1k/cpu.c +++ b/target/or1k/cpu.c @@ -247,7 +247,7 @@ static void openrisc_any_initfn(Object *obj) =20 static const struct SysemuCPUOps openrisc_sysemu_ops =3D { .has_work =3D openrisc_cpu_has_work, - .get_phys_addr_debug =3D openrisc_cpu_get_phys_addr_debug, + .translate_for_debug =3D openrisc_cpu_translate_for_debug, }; #endif =20 diff --git a/target/or1k/mmu.c b/target/or1k/mmu.c index 3fc56e1b771..a78e8c8ca2e 100644 --- a/target/or1k/mmu.c +++ b/target/or1k/mmu.c @@ -139,7 +139,8 @@ bool openrisc_cpu_tlb_fill(CPUState *cs, vaddr addr, in= t size, cpu_loop_exit_restore(cs, retaddr); } =20 -hwaddr openrisc_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool openrisc_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { OpenRISCCPU *cpu =3D OPENRISC_CPU(cs); int prot, excp, sr =3D cpu->env.sr; @@ -152,12 +153,15 @@ hwaddr openrisc_cpu_get_phys_addr_debug(CPUState *cs,= vaddr addr) PAGE_READ, (sr & SR_SM) !=3D 0); if (!excp) { - return phys_addr; + break; } excp =3D get_phys_mmu(cpu, &phys_addr, &prot, addr, PAGE_EXEC, (sr & SR_SM) !=3D 0); - return excp ? -1 : phys_addr; + if (excp) { + return false; + } + break; =20 default: /* The mmu is partially enabled, and we don't really have @@ -167,13 +171,20 @@ hwaddr openrisc_cpu_get_phys_addr_debug(CPUState *cs,= vaddr addr) PAGE_EXEC | PAGE_READ | PAGE_WRITE, (sr & SR_SM) !=3D 0); if (!excp) { - return phys_addr; + break; } /* fallthru */ =20 case 0: /* The mmu is definitely disabled; lookups never fail. */ get_phys_nommu(&phys_addr, &prot, addr); - return phys_addr; + break; } + + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys_addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772539; cv=none; d=zohomail.com; s=zohoarc; b=OmcabGG3qNqeb+QjE1qI3+Q2hWCm4P82M/XA51pfTEGWCh3BgB9uWTL4JeYodksg8mi+YtAtxq4naoLVjr5O8OlqflCO/5jnXGWj/OsMJvvtfJyPYnidyipnniAl4/vh7W6bWpXbktSOOFP1zPqQmg8FKrawzyBlsdSvxSuNkGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772539; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=lSBam1xv9u6QOI6xwmBpMgg5DLxdjBbzJf8D3Ui4yac=; b=k4Igv6GLcrlssPLxcbdKCH8U3fJr/hkR/GPqUi+UOMojFkFMBdTVB6xi/CtAnJDmdOkekuTUQjDI1yP7pWAaXmo3BwX8zwFBYrk38UH0BIVNCMynumYmE7KkLMvByQS7QYA5DTmJ2JPSnX7RVYRQxXhubnHW7S500OWcLOMdTvM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772539101641.7408836151117; Fri, 23 Oct 2026 09:22:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI0R-0000eH-P9; Fri, 23 Oct 2026 12:20:37 -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 1xKI0K-00007h-AR for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:30 -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 1xKI0G-0002wC-DB for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:27 -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 69NE5wHw4063428 for ; Fri, 23 Oct 2026 16:20:20 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrch5w-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:20:20 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93f2c0e6653so192732185a.1 for ; Fri, 23 Oct 2026 09:20:20 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d413f16sm745221f8f.42.2026.10.23.09.20.17 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= lSBam1xv9u6QOI6xwmBpMgg5DLxdjBbzJf8D3Ui4yac=; b=A2x/RyIIDrxONmk9 vHIWhNg4vZo6ZioLOHef8D8rAfWgnURCn4XO9noGONbvN0Fk+v8w92rfCT0TiODo +e3mQ5Z2C1Fyt3kPDQDly30umjAgn7+/ADTw3mlTZCDay+8JCi2l71hTtFC5LJA0 zHRoJs8SWvh/VizPgojJnjQy6btXbrQNRuEZnb1MextNhMSs7Uj9/oTTAAK4eTXt 46Ghf+tJ0dwcXEFD3JKCfXWq4PHcUjllw9Jfp/acFWFYjuNMMIvGBUIe1RY50sMx SJn1GnwQ7RJ0MCj1qm1ipK8cY0GRxGP72fLxsjF8OMkIXieg6A9tLWvfDOQ1cIS4 Bje5Pw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772420; x=1793377220; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lSBam1xv9u6QOI6xwmBpMgg5DLxdjBbzJf8D3Ui4yac=; b=ErCaWyip7Kee5ADNBNR6b3+QhkkGhF8mn7tBtrFui6Ga/tDunpcF6L8YdFpQhROc5L 5ApAOii9h80LU3r1tmkfNbHudm3gJvm0gzBwNDXtjWvnGdLDJRF9XqpMeacg+i7aYcie 5mXlbUv674pE2n0Qy2LhCMrAcqsyXnLQuj/Rs3fTRLmF/nbBNuEDJ3m2NrzBUMyV+Jvh kwbbGUik1fncPvt0YtoyCBfr6fDiVJe6qJLWOhbjaNnuYpEkkjKcS2blUtl2CBLfhPfz GzV0LlW721b3fvo71X2DSQL363fcqWLTA1/zEglTxo8BP8sFH79rG0bvTWwJBWQOxVeT jxLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772420; x=1793377220; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=lSBam1xv9u6QOI6xwmBpMgg5DLxdjBbzJf8D3Ui4yac=; b=F4MQEKbZXTyTLcnX+Mzm/GF0cSi+rVqLeDKaFWesxNsyoqlYSfS4t37Me5IBeqN7tc vkhX2HnpNgw0M64BtM7E+jVxhf7gFSM9r/xEmFG4croNtsTgGBa+X598N9xi+f+LDU4q 6zsoavlGZBml/oPOdzUZaKqsL2cgfYUJYdFSQOo7Vr2CaT4+0GEJq8MoegK1jk5/NOmX vXZ332DViK1IBy2OAbjOH+Or4fFBsgnJ/kzKbD8e7+gtjM3HRp7InUNR63ziuRh1bHmB iz+bOBBXQMRdbNnFz8IR+m9uNYejxO3TcqVEXVJK6wZl2vPuDAhE5a7E2Xv3qnDHurfi p4wA== X-Gm-Message-State: AFq9FYJoY7vxQ0Y7FbkAPV2MuNWVGZk2LdDJ4BkL0LHT+IyCcoXM1BGk 9EjPa0f3ufJgWuC1v3hIeaB3Uy/NNTJfPNCVnio9gSSD4TSMfUS2FCLxENmp7efzr/b2wH2C8pL Ihfq5AEj1YWoEE7r8ZrGwFFPr0fYI+VzIgeYlbSemzm8B9Y8cgpyQgtCh1kUcrqbF87QG X-Gm-Gg: AYBFou2/O3ddVElTdj+yvAxELrSOnCtku7B5hRPQ7nIUlVIHqIAbSQ9DRvYAHnq68CO 8Xu3b27KmbING3Absveqotgthr1UL6u3cZcabpE4Njy9guHg/15AGluatfs7uJ+qDWxYunl9CYK vCCYnrsNAnpB+iT9SkdLhQQoK6N+pzBIy/6SOkfm5gNuQDhsjSKI6sHslkaMjBk0jpEgdg3Z1zj zoEVPVr9MWudVtbBqsUs5gl5x2yfALL+kYGborg/2NpljIfByFxeXbDD1wwJs+hZtR3bd/118cF DpAVRJ4WCjh3eTN9/Hh4idzqvpR0ApeDzw73wJ+7UxMVNSK7ZcB51CPrHo7GBxLXYeWVzxwPMgn zbG1hwOA9SbTMjcLoPegogCArkCxFIuoMX+9pzibX X-Received: by 2002:a05:620a:839b:b0:93e:9292:1b96 with SMTP id af79cd13be357-93f6f591f31mr482012285a.3.1792772419472; Fri, 23 Oct 2026 09:20:19 -0700 (PDT) X-Received: by 2002:a05:620a:839b:b0:93e:9292:1b96 with SMTP id af79cd13be357-93f6f591f31mr482007385a.3.1792772418890; Fri, 23 Oct 2026 09:20:18 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 56/83] target/rx: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:04 +0200 Message-ID: <20261023161332.60153-57-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: YhdUtd6fBlhwwAWBJHTVM3cvWV749ifn X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX7GgPzZ3cOltP nznGHYvehjqIaZOvtERXe+YApHmH+TLPEYwETJF0M43Ljrib8LfmYZ7XTA2dFKaoJgHb9o+5Del xbPhXd6Rv/Bxq1achTBLBQOEc9btSwc= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb8944 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=Qx0XU4k73VZMi5TUh0cA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX0o6U4obZSv+k 3kdEoLZQUm2026dOJbkeeOQZ6mLv51sBCS7UQJcgxXR0shXzOyU/ISW2Psl2R57Xz14n2Jexa5/ GgWrdCu+wcAUjQ6qEzMhTHu0KfPvS9K/PuUCo25Ez2KfEiNplvSvtrrt9Hfkx0s+sv1go83MxF/ CyPL+CroqMHn6djAIe53VnRSvH+d19va1Tk25MzUuYZ3CwaPcvCGCSoxn/E6tgkscRdZgNOsxxV 16jOVqvO26KCnjMV5XH1P0rS0Udhdh8NdNtrT9YNw4ueHNco8ZRMfPz5+S4sGZ89lbD6M5hSkTT Bg2Cn1h8DgfrcQOpbm5TQvzNAGZDXFviEkJTficOtZIOQdx/c+psjQMZx3yYgXK11eYLLbmT360 VyOvGA/hXn9eYb+gVK+nFtPK/4X49ZbZb5A4m6+/w56HmWUAbO14154d4ZuqhCIXUGfXNePTe6n V86eBJ67w5RcQUNLOiA== X-Proofpoint-ORIG-GUID: YhdUtd6fBlhwwAWBJHTVM3cvWV749ifn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772540876158500 From: Peter Maydell Convert rx to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261020122752.3651914-5-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/rx/cpu.h | 3 ++- target/rx/cpu.c | 2 +- target/rx/helper.c | 10 ++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 06208380621..0c749fc58d4 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -150,7 +150,8 @@ const char *rx_crname(uint8_t cr); const char *rx_exception_name(int excp); void rx_cpu_do_interrupt(CPUState *cpu); bool rx_cpu_exec_interrupt(CPUState *cpu, int int_req); -hwaddr rx_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool rx_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); void rx_cpu_dump_state(CPUState *cpu, FILE *f, int flags); int rx_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int rx_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 44ec3c3d62f..c35a98f7cef 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -209,7 +209,7 @@ static void rx_cpu_init(Object *obj) =20 static const struct SysemuCPUOps rx_sysemu_ops =3D { .has_work =3D rx_cpu_has_work, - .get_phys_addr_debug =3D rx_cpu_get_phys_addr_debug, + .translate_for_debug =3D rx_cpu_translate_for_debug, }; =20 static const TCGCPUOps rx_tcg_ops =3D { diff --git a/target/rx/helper.c b/target/rx/helper.c index ed9cadc0bd4..f170a14721e 100644 --- a/target/rx/helper.c +++ b/target/rx/helper.c @@ -159,7 +159,13 @@ bool rx_cpu_exec_interrupt(CPUState *cs, int interrupt= _request) return false; } =20 -hwaddr rx_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool rx_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { - return addr; + *result =3D (TranslateForDebugResult) { + .physaddr =3D addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772610; cv=none; d=zohomail.com; s=zohoarc; b=a0pIMyRitg3Tit31y9P5ztJdl1S7gBSj2JjKxnq4gWX8iCybQwgEE+oD5tju/+2f9qiL+d4ZnvyENpHbANz19s9PaNO25y3yAHmiGZZxYwaI5Q6KRYTwHupdu3Sp3FRFeQtYlG8L4pDbw3JO6l+VeiBaZgSman84IcpPFaOhrPA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772610; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=7OTaslLjMUl6opt5MVd7zI/TFoC/bM7dDwz3gIXPm34=; b=RHyW76kw+YdbyDS54cAucb+f2Pc9+1DnDwaUUMQGtOabtGGVVOsqUYS277PEUtwV1edB7oFAOBNIOyE2NWh1zswcqDPC5PtmD1+XOZOQM2jE5q4GeOOPw72phCkiFs33heIhZo0odwgxncYCDCQHomBmSkFNB+2zu/ERnLbC9g4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772610165591.7043343659292; Fri, 23 Oct 2026 09:23:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI0Y-00015C-RK; Fri, 23 Oct 2026 12:20:43 -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 1xKI0O-0000Ou-61 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:32 -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 1xKI0M-0002wu-2p for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:31 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5vNb4072851 for ; Fri, 23 Oct 2026 16:20:27 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7bw0xgu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:20:27 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93cb98809caso182477985a.1 for ; Fri, 23 Oct 2026 09:20:27 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3ee6b2sm641212f8f.13.2026.10.23.09.20.24 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 7OTaslLjMUl6opt5MVd7zI/TFoC/bM7dDwz3gIXPm34=; b=nnSvFUkdp9GKWnEo etx99u6zHQTCvD9VaS7BOmiskaMhybDiD4EQFRysZBlin4+gtJLiDORXlyMIi6Vh O9ImdSjPwbIlkiD756ylY7U85ul6dv2/pQfF3TCIVG2nXqKtqHb6R4tOSb85dcDv cn6M0PP+Atf2TFD0JmcBWOObayfLBvEaZtOJAfkI8KXgUIOwGdFTJkgxIMefML7c fdZ6seMWsSWqFkWs1zZ6uk+Fxi2zIEK9Xq/rAVR11RlaQN2YdHcHVeS8fks5JLmy miyADVG9+2JbP6Yni9ByfcmUVDYj4WuxMlR6feoNIz3hNRtyhWNuV/E3qfffIKB9 CjlZgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772427; x=1793377227; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7OTaslLjMUl6opt5MVd7zI/TFoC/bM7dDwz3gIXPm34=; b=hB3PA0Wb8bTnI3blaehEyFzneDpkFZuDiOgwptkzyoDRonntbZnuMb/claN30S7E4Q SL8JtQl5ApZy3HT3JEhfP65Qsg8lBBd9Mcfg54CTAGZZ6qCGsza8TqPoqQsdviiJlpoK tmhtfDBmeLUwftzay0YQsya2hk5fuG6aBCz6/OMLrIdDjlkL9gZeOTRjTUBHFFY0NJB+ O52kNDhnEd7gGyq6n1BKskwHwqzjQgUrMEPLXqYcX+4sppjdvCeSttadToETFPcglGdw Uw44vHHuaQascUNJqhA7iT0O7bTVkBr0ZY8xckiI4sKHNvUN2oaZB2ze6u0npo3QLaRU xYSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772427; x=1793377227; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=7OTaslLjMUl6opt5MVd7zI/TFoC/bM7dDwz3gIXPm34=; b=T5hFPdIepsCwSzygaOrF+CzvzU1medPP3ycXaAAi3sKgx/4i8Yz3KxJHvgSy1iOVjm ChZmCqBvbTVf7mYHVopESGrIi/Nl/9ZoqWhFFvKHos3eaQcZoeE+JOJ7CgXJ9YB+lW6s b0j0AlNf09k8Y5ayCqlIUiA2Z6nhv2DDNLHTm1j97uZpth1NHSSWdJZNm4am0I+G3kQB dw80qXZb493nvQLIRBGZIjUNMwo1VhlEG5q2DhGXkyvxAhPXCcnaMNcbnboslTky8aJ9 PUHbp4h/DdalPgaXYu57G0XcUlMKdt0e06vneDXmw41Qe386K0N91vFbLKGZ1+TOSQqt 1HYw== X-Gm-Message-State: AFq9FYK8ZLmbIUrj7sMvU7mu9PQfwOoqRlKJA3KR0sux+fM2tUMFz+/s WzDguiIRtrpGLHhMf8KZ465q/ssN8HZ22fJQzLgbnWbG9NbSHMrdyhU3+GyzjRQZIDc2ztFae7I wCrp8X9PWSBvfcDnCIISO+5rZn5LWx7VBuNSTuJtib9nBDdWEzDG4FN8n/QQto7e8XHNI X-Gm-Gg: AYBFou1roEd4QlpgeQ0Ce9a21wrV/nUk9MqFNQNStzoCNz7kqnbBydhw84YbTEDJZD+ YcMCHeG+YdY9GD5skGrSG4et9y1Sr0kxfYsC8xO/wnv2ornXX5YNVp3vATQXcaDf5COqCgOjg5s V4cA84xHrVNn5/qCAM++8+Ccr+oBe60urs4o4+T/huwul388eCJ7GJg64UUtcL06aLV25pi/bFK K24YOt+YdQUwfVUcMUw1dQuGb8xSO94px04pY6lq7MNwXldtpS9hoyWsLJnMA2VsAultEYtWe4Q /WvsKvMboAE2eRmFRvJ5A/PfC5GenaZA6M/YAgpTInIFrF5C6KTKYSUdGjX/2HS4U7hKkUZ6NDR 7DEJQgPPuwig3ESGH9mELLUsaaoxHo3PoQh0yJ5UH X-Received: by 2002:a05:620a:198a:b0:93c:735c:2477 with SMTP id af79cd13be357-93f6f78718amr497437885a.21.1792772426580; Fri, 23 Oct 2026 09:20:26 -0700 (PDT) X-Received: by 2002:a05:620a:198a:b0:93c:735c:2477 with SMTP id af79cd13be357-93f6f78718amr497431985a.21.1792772425983; Fri, 23 Oct 2026 09:20:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 57/83] target/tricore: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:05 +0200 Message-ID: <20261023161332.60153-58-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: S6q-Sla3y9IIriJG8-N0BUNZL3TIeuBC X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX6qAp/o4VFo/0 w15x7ZlK+hIuyHEXDuR62sikQXzFAe4/RcVzaYoGAJexnLNQBuLuCdnZBqJFsWJ+9wD+vJq7zP0 rM2H8i65a9L49/buLXQG+ALrLMDmZDo= X-Authority-Analysis: v=2.4 cv=QdTzLcbv c=1 sm=1 tr=0 ts=6adb894b cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=RLtJ85U6kMftc6pV0xwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: S6q-Sla3y9IIriJG8-N0BUNZL3TIeuBC X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX2iRpoPg1pOh7 JonYnfwOpgg0acyKitBN3VkFwgIQDEFz5El1woblumKdxZJ5id1pAuRsS6557Y4ItJhuho+NYZX zuXR1gvGOh15MukGLZ+frKYoDdoXt2OZKk+YKqzuguUrQ3CHFWT+KGcmb95uAWLs4xV3QvhUTdn +Bvofs41tKwavmnbSeDJMAd63PrKHSYz7OV2aNA7WucNk0dQCHRAsHNqrXwVljl25HEMX7FugBx S+fz4nnKz3KfMG7qY0ZUstCcuOHwVfDhVxkVguHw3Y6/vxMoO2XybHGCzWuiBoEWt3eEqdeho0L MgFhBx5tWm3rVwFrqkK3iWr9L/qfPwA+OmB6uq00MDmEpjNts4gXfPhtOYSeliLlG4zVH70Uhlb g4xWUVu+cTA1ykcU96TtnTn9refdfqmuMk8JJa7a0GU8kKJ/ugI2Arkvg+YLWvuVzYQwdD3uTj7 XBbkYgZosvkAFEuphBg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772612210158500 From: Peter Maydell Convert tricore to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261020122752.3651914-6-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/tricore/cpu.h | 3 ++- target/tricore/cpu.c | 2 +- target/tricore/helper.c | 13 ++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index 12e497d2a7a..17e3d1fe804 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -79,7 +79,8 @@ struct TriCoreCPUClass { ResettablePhases parent_phases; }; =20 -hwaddr tricore_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool tricore_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); void tricore_cpu_dump_state(CPUState *cpu, FILE *f, int flags); =20 FIELD(PCXI, PCPN_13, 24, 8) diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 82b56c3cd56..fa782f82f00 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -207,7 +207,7 @@ static bool tricore_cpu_exec_interrupt(CPUState *cs, in= t interrupt_request) =20 static const struct SysemuCPUOps tricore_sysemu_ops =3D { .has_work =3D tricore_cpu_has_work, - .get_phys_addr_debug =3D tricore_cpu_get_phys_addr_debug, + .translate_for_debug =3D tricore_cpu_translate_for_debug, }; =20 static const TCGCPUOps tricore_tcg_ops =3D { diff --git a/target/tricore/helper.c b/target/tricore/helper.c index 273713a1473..9cc80b14c8c 100644 --- a/target/tricore/helper.c +++ b/target/tricore/helper.c @@ -47,7 +47,8 @@ static int get_physical_address(CPUTriCoreState *env, hwa= ddr *physical, return ret; } =20 -hwaddr tricore_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool tricore_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { TriCoreCPU *cpu =3D TRICORE_CPU(cs); hwaddr phys_addr; @@ -56,9 +57,15 @@ hwaddr tricore_cpu_get_phys_addr_debug(CPUState *cs, vad= dr addr) =20 if (get_physical_address(&cpu->env, &phys_addr, &prot, addr, MMU_DATA_LOAD, mmu_idx)) { - return -1; + return false; } - return phys_addr; + + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys_addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 /* TODO: Add exception support */ --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772509; cv=none; d=zohomail.com; s=zohoarc; b=cUXTM63ERm9JdvsVWlg6BZiwBPwa7KkVt/EbfgqBugjTfn8KuC7J8sfwF0dKXmAk5UVmIL17F2vY2F9ouYXXM6RB3Z2zR3CaRPYj2R9hEcCK7GW1Qp3nUV8F5FqfbxKwxeSr/FI4AQgLMiPg/R/f6B7J1OnfLfMwh65+5qZSGYM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772509; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=l1lqnjP7naulAaIaoUswheUlFqomEI5Zxfp5GnOchz4=; b=Xfk0+1rROHW4MUsbaydo5RdXXL42wTKxTB8Lj86fDI6jZ/cREjpsy6JYE9ocHSh/rfIDIxy25ZQ+DwFuKYO5jnxhTAgs3Woffew/xsdFmEC58d9jTg0/Wcpvr9hnL4p0RqYW0P+1RILSrkBTyCS9TGYB3YI586yfy0bQ0VFriKs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772509292740.314664276298; Fri, 23 Oct 2026 09:21:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI0e-0001GV-Sh; Fri, 23 Oct 2026 12:20:49 -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 1xKI0X-00015D-Vf for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:42 -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 1xKI0U-0002xg-P4 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:40 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE661Y3018953 for ; Fri, 23 Oct 2026 16:20:35 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsykby54-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:20:35 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93c5ab5c136so168547585a.3 for ; Fri, 23 Oct 2026 09:20:34 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d42b275sm917818f8f.55.2026.10.23.09.20.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= l1lqnjP7naulAaIaoUswheUlFqomEI5Zxfp5GnOchz4=; b=eITrlHj/OBuvCMcQ KA5nUlZlGc4y/tEfGyv+tg+brlQAfwR+iP6OUH0jCBWhAx5K8Iujj3aOL1alCuFi AASu7ZJP252+KAyNhyO7yNTvEDKtUDH8NdrjLybZsDpx7whxaQ8VLcKalWl/2M9s 0fxwrc6xuYJJSnesL7Q+qFMIa6JzDAGdEZzdlqxrf6QESxKFvJ9X9sv7vVn1IIfX Yw4Jd93tg908YR/XFI6yE8drX57V7SdMwj7zuPNGY3u0E2lEHP6ib6gEm6geyy7h ebTQvdcnhevwzHpCHwYvIZ2Cb9nlpgAJe2mpVNtVt59yFw6fz7ecoz57lU+i3+XX nBE5CA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772434; x=1793377234; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=l1lqnjP7naulAaIaoUswheUlFqomEI5Zxfp5GnOchz4=; b=TQTgoVmDzEfESs28NH4wUlF1LM7sRz3CahyT+ofLFxy0VTaJ8o8IavBXG38ARYSV18 hdSXc3zNWdAeAwbvX5RqtlgmhoahmktGlvkW9/BDmA+z19vLsOVC86TOM3R7ilRVgXQI XHEZOWeYD5kK1f0ljtDdrr//Nd9odh0qzcl6yguwrkb0UGlRREODrkVEJbFHUDX1KfO/ dihPyOsTVzfOvI5OKOWMN2U6K8b6+MbVxvOgl/8OMtqDcBvzut+m9OOzGNu+VEyHWf+2 BEUX8fRkCu4pW+Tdyacrw1vL+wRYvYbm9t/ceJd++XO3PI8TYpm1PHWlA5EHzX39n6H8 +KJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772434; x=1793377234; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=l1lqnjP7naulAaIaoUswheUlFqomEI5Zxfp5GnOchz4=; b=xYwpl/G4JIWhKruov0IDvU/q/kgIScAJ0+TmBt/YxPxx70QKfQMOgTp3jVBL5wXE6Y 2IRMDNude6Oo/5ma+cQILQUd/e3dsZhqstmDuvkywMaFB1tcnr2PEWZs/wnwP/wlWJQJ FPNGIX0EXudvaKCfIKvH+wKDRJ0E4X83shtgnVis2e9uOtZbFvPcpL//SWuqv8qYuhqw QANrip0E83yY9MVLmBdts5s96nAwbgnBaenXn9+MpFYPtttyBvQw5buNmggvVokrbV0L tYRp5zvC3uRwWv6aRK1tTxg49XKaqKY/8ephOLfcrCHEdBNtagaFUw/nr5zMgOlc0o57 soZw== X-Gm-Message-State: AFq9FYK7C1SMarhoG/9RNN2UGtLfhyN50GkeOn8GKEj3NUw2eZncI8H+ uksQkDrJXmo0kyB2vkKcY3ctumEiSPCE0UxtQKcFlHhEGdCds9iMu3khQUCux+FAMs7rLp16pbX 71gpPMXdP9tYpsSmURNbpikFqGBElb4wbAxGQi+xtCYPMK+i4R1INjk9cWRo4Tp7owJIZ X-Gm-Gg: AYBFou2owSfB0RcqE25LgKIN8DwGofWuIJQqHa0VsIZGUnOvYVohrsQ5k47NSSadscb m0wn3Ro+NFmKAzBU12F//8w3JwWNYAEWMMLwTOSQJQqcqMGRCM/7IznrCLZlp6Wv3TuL0TfgiQo +6wUKOtUMqtFzcy2fMGfYO3zC569f4m6VC8R9mKWenlCpMWKeXsBH2CRfW5ifGZLlZLS/eJvfZL /gLph6hRhcuvmfgC3pfvjL5NwrKYT5sb9aF0XckVBlXSMQ1WykB5uboLmgD2ZxRwJZUTX+H+/nm JizL+I3gcdhQJYB21LoaAlh6Ns8zCoK+9gp2p01mVCTaHEAE+RhN4gKT1QmOHSQQb74YPcw1GcE ewFAMDcPIH5toZYPEH0yK6+T/4YJAVcLEi214fX7n X-Received: by 2002:a05:620a:439e:b0:93f:1cd7:734b with SMTP id af79cd13be357-93f6f796974mr485611085a.34.1792772433923; Fri, 23 Oct 2026 09:20:33 -0700 (PDT) X-Received: by 2002:a05:620a:439e:b0:93f:1cd7:734b with SMTP id af79cd13be357-93f6f796974mr485603285a.34.1792772433149; Fri, 23 Oct 2026 09:20:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 58/83] target/alpha: Record masked exceptions in FPCR for /S insns Date: Fri, 23 Oct 2026 18:13:06 +0200 Message-ID: <20261023161332.60153-59-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX3DLQ3VsJ/MfS A1aSWx/eCe5WWjAKgS2oihn/Uk36s93PT+JmbDP3vxC3PPhHPokXqcDUD7iUITRmypW3775cTpJ PzBNtweBtoe4T6wHM8nD8gNF3bOxXq/07G/LIYMETx+QxPyeg9JxthCtCZlaM2JGVZraF7yEYNB x+jpEHiH1jBNVh93+xHqf5PXEXpi4BKutLooPqGIiwYHVYLyWF/wC2Cz40TRMkyP5vQUcyqk4rm HOewkr4k1JxaSYjsst5n4Tz60XWMM5MzP3rwbV9lfJHau35nqFzSMyPs1vsYfjXyaBt1oLCGCYR 3Tx6NFEg4oa3RC6xZRu/ix+VCRACvM6laWN8uzK0uqn1gCOOV/6Yimmf6k7lgMSrZta//ul0ncB TRQoSxk8KonVSo8hbdDDYsl5LnXSSI6JwTVKbz19oe+7EV1r3cqfGNY6Ss8aQ2CXazTXOXTX5tF ynV0oMCkhtu4rtlu+Fg== X-Proofpoint-ORIG-GUID: y1AqgYsH4DAiY1QxKHtsLyRqGgcaDRHB X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX9Xq+MYGOnjbD FwYumgbxbpzy6U05wCOzrIDP+Gm3QraR5fiFtQ50veeVsGfocBJFCo+EDT33FbzeuluBN8Sbp37 1nw0UlTjhKLi4C5E7KrXIva1IVPZEIc= X-Proofpoint-GUID: y1AqgYsH4DAiY1QxKHtsLyRqGgcaDRHB X-Authority-Analysis: v=2.4 cv=GLKdgeNK c=1 sm=1 tr=0 ts=6adb8953 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=pGLkceISAAAA:8 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=jx90jitu5bfcP4pVPFUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772510306158500 From: Matt Turner The trap qualifiers (/U, /V, /I) control whether an exception traps, but EV6 still records every exception in the FPCR status bits. Commit 471d493047 ("target-alpha: Set fpcr_exc_status even for disabled exceptions") made helper_fp_exc_raise follow this, but in helper_fp_exc_raise_s it only added a second "exc &=3D ~ignore" and left the mask in the initializer, so for insns with software completion the masked exceptions still never reached env->fpcr. The most visible effect is on inexact: the IEEE-mode code generated by gcc -mieee (e.g. ADDT/SU, DIVT/SUD) has no /I qualifier, so FE_INEXACT was never set. Many of glibc's math tests fail because of that, and the narrowing functions such as f32addf64 return results 1ulp off because their round-to-odd step depends on inexact. Record all exceptions first and only then apply the ignore mask, as helper_fp_exc_raise does. Which exceptions trap is unchanged. Fixes: 471d493047 ("target-alpha: Set fpcr_exc_status even for disabled exc= eptions") Signed-off-by: Matt Turner Reviewed-by: Richard Henderson Message-ID: <20261016-alpha-fpcr-status-s-v2-1-4719bec02b3b@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/alpha/fpu_helper.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/alpha/fpu_helper.c b/target/alpha/fpu_helper.c index 529eadca9f2..643ce641e83 100644 --- a/target/alpha/fpu_helper.c +++ b/target/alpha/fpu_helper.c @@ -86,9 +86,17 @@ void helper_fp_exc_raise(CPUAlphaState *env, uint32_t ig= nore, uint32_t regno) /* Raise exceptions for ieee fp insns with software completion. */ void helper_fp_exc_raise_s(CPUAlphaState *env, uint32_t ignore, uint32_t r= egno) { - uint32_t exc =3D env->error_code & ~ignore; + uint32_t exc =3D env->error_code; if (exc) { + /* + * The qualifiers can suppress the raising of exceptions, + * but real hardware still records that they occurred. + */ env->fpcr |=3D exc; + exc &=3D ~ignore; + if (!exc) { + return; + } exc &=3D env->fpcr_exc_enable; /* * In system mode, the software handler gets invoked --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772509; cv=none; d=zohomail.com; s=zohoarc; b=ngbYRZKy6AiJjXx5uvzxYwovgO4sqz7tnqj97E92+C57P2f06umrd77rBc36qIWeFdGTGSesxOSdSxcbt//Av5zLHnXc2CI5RFmu2a4RY9Vl4dSV0aDbdPMn3Lzd1+ipdEBTU/ZU6gj8Dt8BM0Y2+DngkAdm6ap7gwonHFTenrM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772509; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Xfl4AZhX7FLGzUTE81HFyoHl1mHyA1hx7sIiUGCbqOk=; b=TAms21XzXJV25aSKrs/Y6evfTZW1Z2ftTnw10O5rvEol7paLyRTr/B0AQlNI0cY8uqgnFyO3sIpYYuLx1Geb4OEhbgiLC2kP4P49xzs7D3IqegzSGMFDc69eUsYvI650/FwcnKNCSfL9cJ39vy+LOyu2bcjnuE4WesvlhN0acDU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17927725093831001.2135381211193; Fri, 23 Oct 2026 09:21:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI14-0001aF-8y; Fri, 23 Oct 2026 12:21:16 -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 1xKI0f-0001Iv-2t for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:49 -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 1xKI0c-0002y5-3P for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:20:48 -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 69NE63ML4064343 for ; Fri, 23 Oct 2026 16:20:42 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrch73-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:20:42 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93c5ab5c136so168569485a.3 for ; Fri, 23 Oct 2026 09:20:42 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a92a42adsm16178325e9.3.2026.10.23.09.20.39 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Xfl4AZhX7FLGzUTE81HFyoHl1mHyA1hx7sIiUGCbqOk=; b=oRjNBfLgryt+rKVy Wxyo6McbXWW7+GBFJiMcikfT9ZpdZW1LZaaIdEIZeXj9DeBnf0ZUY8cdIKLaghk9 P+/PsoUKdL/G0C9dV91B4Krm1vH2Y5kOJ4FXNNaWo7U4I4XE10UWjEm4SUpbC1/T eNY2mz6Uwo/2FtT2Lo+2jRdrj0SgQLJ1np18N9Ig20nF2aYpvr51xd2UAaK2ztn/ WVxLvC1k5HllBQ0svtpuKJNpUmdMC47RRySoRCyKutwVSj4dVJeIaxMltjnz3yQO Abfnnl4tyAzhptiutWGISynZgoG2vYBx9DHYpGvUf6Tf0iplxLgwS+iL3beULpxY ZgbGbg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772441; x=1793377241; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Xfl4AZhX7FLGzUTE81HFyoHl1mHyA1hx7sIiUGCbqOk=; b=fIbVd+tr4GRehWFe9HftvrRI6WPWd7hMyxIMCToFFmtkmPq16YkM1oJ31AhT04sO6z Zwno3/gqEgReuLuQSv4ayxspZm8YidRCMRs5Uu8a1/yLlfHabuvZR7T/no8OKomvWklz B3NtIswGg8v2G9VeTh4uuBAX+rE8BBtPKByO8/9jvQFVclH72RB4DlQGiPCL2ay+o8t1 kM49dBXq6Y9R+2PucYFxDQjMjmfX6w8XXhSNONHscEBS+vTaiN2t2qr5x+gapKoJkBA3 cfBU+cXdIGJoj2r3WP8p8/j3olB3cleqaMmH5eLd+CtC3iMKulHGyoXKqEMl9IPFgbXP /OJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772441; x=1793377241; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Xfl4AZhX7FLGzUTE81HFyoHl1mHyA1hx7sIiUGCbqOk=; b=fZt5XDI0b05Iixn0evg+sj2Aigy3VRR/4SAR/3lDqYcTxmqArCl18Y+Cq0OqgTAt+E n+PwZt5hSQVRA18o31fMqLigSrt4ffJ4kpb6Xx6F0NrVI56Vq2N1pL8pDHr8FG7aMFd4 tm1dvw403O72Kaf3xNO/9VA31p+XKv3uzwXbGxTvBhdUINnPfUY9QjzHbEXwybuFlJV1 6tkzmTQ817SSbCQlWJeeo0KIhbl0KpLt7vBLSer62Xc4F0FlW9OuR6+ik7cPi2xX80n3 I+SmCSwbWUeIqPgiGwJy2qKUA3Z/O79Ch7mprjvZ6RwKX5CRKzpX1zfUvbAgBC2Kt34X kWcw== X-Gm-Message-State: AFq9FYK5hKlUTaxyQ3ATnwiSeGYrZHYEiEvKcW4xzhvDIQzmDNJOc8vv ZrmuYHaf3Z5adP+XqN9miGWOq0A31C8gMhEUqhNfb6yTbDhy/yMR2r7JBE4sijSdaidE++0CJdi U3aAHF5v1nBXlrXCBqV6QY/hFpgq3n+WxJiNnQoS7V5jaYyTya7qMU223EZsvXoSxYO1Q X-Gm-Gg: AYBFou169ob0jY4KN3koltCg0YvmZe73ZOwNXcMSLhPHvnhKyHC1XT0ZEIurC/dg+5s ElNJItz4CHkJXhpxmkbXGsQYQOVZWmFn9J0QMhvKaf082l3GKXwwceU6IEqUjAvdvqb7fA4RXHr 2bfWT3kFSXNbvOhX7GSsMlLiW/9NVf5AZgimuoH5oP0LWjVjVgSsfMkxGhT4Rdh9P3ZINvuhvG8 AIIxdPax47Tr7wyvXhNY0NYC4pNaBpZmuVw7M6sgOwrH3qpTW5tT79H7FRz5TxDblS4+SEULTih uebocxdBTr21FQWpEGCiHI83+FcDvg6eQkZFzIl8jppgj3fzd9Jdg3zgzOwFvSMALuplWpx9jp6 JxK38nhunnfRvxxhC28TPkFoirsWQ9Vbt6j9lOLQU X-Received: by 2002:a05:620a:4394:b0:93f:38ee:68b9 with SMTP id af79cd13be357-93f6f657640mr507038585a.28.1792772441031; Fri, 23 Oct 2026 09:20:41 -0700 (PDT) X-Received: by 2002:a05:620a:4394:b0:93f:38ee:68b9 with SMTP id af79cd13be357-93f6f657640mr507032885a.28.1792772440361; Fri, 23 Oct 2026 09:20:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 59/83] target/alpha: Determine tininess from the delivered result Date: Fri, 23 Oct 2026 18:13:07 +0200 Message-ID: <20261023161332.60153-60-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: MQ9fsinRrI_p38e1iDhFwLKRidIOWBwC X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXz4n8JD0X6zCs xq/aF8Rx7PSLRsL6iYebqmEFs7EkiMIJPqM+4EjGW/zIFFzLfHvTs1uhnDlJPZFtaLZyN4m2XET 19UWho8flTHzRsSxzvNCkD4HlQ3TraI= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb895a cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=pGLkceISAAAA:8 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=z3b634WXv9LZD2Rr3gYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=cvBusfyB2V15izCimMoJ:22 cc=bnc X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX5/4OojrlZcWt jfXdkyJ2C/ZU6D2ToMFusIVsOuu6o5gvVQpk0jBjwNpwthI/4HfoWaetAd9mo+GaOBBkkbT43FI UG6FqFH3/CjOYYhKiKEEHEZf3b5RJ/zglp4yZPsbaxEUw8VM1vJ42sw5YEmBNKzb2OwyR8ZV73l t1Jn17uBI5IwSO7SacAEB2w38PxsjnXBShAaDVZsS2KtVC/daFpSKVhneJQsIq8gUHFt7tYfzgs B0ElGVPxp1g9Tf32x7wbZayMelLUs5eCkquGdN/XPS83R+0OCcWc6ZKnT0ONxuzhmhXhajyPeA9 qIQJGQ+bbR5XR0e7v8nai1hLwXDx+EWivOqPGWq8MY1Q5TSAvUmhpmP0HIdFsJF1+zAnA3LrDgI OS7bROZsQLH4pdg1qD/SCdkWTcWMnAEnpEm6I7mDYJZ8q748t6rVkdokCQVGlzTFMjwjpha4Ezg FMHsMn/djNjskidpGKirjhYxJOZl9xn+ymczGTWo= X-Proofpoint-ORIG-GUID: MQ9fsinRrI_p38e1iDhFwLKRidIOWBwC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc=bounce route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772510436158500 From: Matt Turner Alpha raises underflow only if the result it delivers is tiny. softfloat implements IEEE 754 tininess after rounding, which rounds as if the exponent range were unbounded. The two disagree about a result that rounds up to the smallest normal: 0x4p-1024 / 0x1.0000000000001p+0 in FE_UPWARD =3D 0x4p-1024 The binade below DBL_MIN has a finer spacing than the denormals, so with an unbounded exponent the quotient rounds to a value below DBL_MIN and softfloat raises underflow. Alpha does not. glibc marks math/test-float32x-float64-div as XFAIL on Alpha because of this (glibc commit a32db99a38), and under qemu that test unexpectedly passes. Every result that is tiny by Alpha's rule is also tiny by the IEEE one, so there is no need for another tininess mode in softfloat. Pass soft_to_fpcr_exc whether the delivered result is normal, and drop underflow when it is. Only the S and T format add, sub, mul, div and cvtts helpers can underflow; the rest pass false. An insn with a denormal operand is different. Unless DNZ is set it traps for software completion and the kernel computes the result, and the kernel's emulation raises underflow in the same situation: 0x3.ffffffffffffcp-1024 / 0x1.fffffffffffffp-1 in FE_UPWARD =3D 0x4p-1024, FPCR_UNF set That result is tiny whether tininess is detected before rounding, as math-emu does, or after rounding, as softfloat does. linux-user computes these results in the helper instead of trapping, so keep softfloat's underflow when float_flag_input_denormal_used is set. That check is for CONFIG_USER_ONLY only: in system mode gen_ieee_input raises the trap before the helper runs, and with DNZ set the operand is flushed rather than used. Signed-off-by: Matt Turner Reviewed-by: Richard Henderson Message-ID: <20261016-alpha-fpcr-status-s-v2-2-4719bec02b3b@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/alpha/fpu_helper.c | 60 ++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/target/alpha/fpu_helper.c b/target/alpha/fpu_helper.c index 643ce641e83..e91e907c215 100644 --- a/target/alpha/fpu_helper.c +++ b/target/alpha/fpu_helper.c @@ -38,7 +38,11 @@ void helper_setflushzero(CPUAlphaState *env, uint32_t va= l) #define CONVERT_BIT(X, SRC, DST) \ (SRC > DST ? (X) / (SRC / DST) & (DST) : ((X) & SRC) * (DST / SRC)) =20 -static uint32_t soft_to_fpcr_exc(CPUAlphaState *env) +/* + * NORMAL is whether the delivered result is normal. Operations that + * cannot underflow pass false. + */ +static uint32_t soft_to_fpcr_exc(CPUAlphaState *env, bool normal) { FloatExceptionFlags exc =3D get_float_exception_flags(&FP_STATUS); uint32_t ret =3D 0; @@ -48,8 +52,24 @@ static uint32_t soft_to_fpcr_exc(CPUAlphaState *env) ret |=3D CONVERT_BIT(exc, float_flag_invalid, FPCR_INV); ret |=3D CONVERT_BIT(exc, float_flag_divbyzero, FPCR_DZE); ret |=3D CONVERT_BIT(exc, float_flag_overflow, FPCR_OVF); - ret |=3D CONVERT_BIT(exc, float_flag_underflow, FPCR_UNF); ret |=3D CONVERT_BIT(exc, float_flag_inexact, FPCR_INE); + + /* + * Alpha raises no underflow when the delivered result is normal. + * softfloat does when that result was rounded up to the smallest + * normal, so drop it. In user mode, a denormal operand means the + * result is the one the kernel's software completion would comput= e, + * and that does raise underflow. + */ + if (exc & float_flag_underflow) { + bool tiny =3D !normal; +#ifdef CONFIG_USER_ONLY + tiny |=3D exc & float_flag_input_denormal_used; +#endif + if (tiny) { + ret |=3D FPCR_UNF; + } + } } =20 return ret; @@ -227,7 +247,7 @@ uint64_t helper_adds(CPUAlphaState *env, uint64_t a, ui= nt64_t b) fa =3D s_to_float32(a); fb =3D s_to_float32(b); fr =3D float32_add(fa, fb, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float32_is_normal(fr)); =20 return float32_to_s(fr); } @@ -239,7 +259,7 @@ uint64_t helper_subs(CPUAlphaState *env, uint64_t a, ui= nt64_t b) fa =3D s_to_float32(a); fb =3D s_to_float32(b); fr =3D float32_sub(fa, fb, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float32_is_normal(fr)); =20 return float32_to_s(fr); } @@ -251,7 +271,7 @@ uint64_t helper_muls(CPUAlphaState *env, uint64_t a, ui= nt64_t b) fa =3D s_to_float32(a); fb =3D s_to_float32(b); fr =3D float32_mul(fa, fb, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float32_is_normal(fr)); =20 return float32_to_s(fr); } @@ -263,7 +283,7 @@ uint64_t helper_alpha_divs(CPUAlphaState *env, uint64_t= a, uint64_t b) fa =3D s_to_float32(a); fb =3D s_to_float32(b); fr =3D float32_div(fa, fb, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float32_is_normal(fr)); =20 return float32_to_s(fr); } @@ -274,7 +294,7 @@ uint64_t helper_sqrts(CPUAlphaState *env, uint64_t a) =20 fa =3D s_to_float32(a); fr =3D float32_sqrt(fa, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); =20 return float32_to_s(fr); } @@ -304,7 +324,7 @@ uint64_t helper_addt(CPUAlphaState *env, uint64_t a, ui= nt64_t b) fa =3D t_to_float64(a); fb =3D t_to_float64(b); fr =3D float64_add(fa, fb, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float64_is_normal(fr)); =20 return float64_to_t(fr); } @@ -316,7 +336,7 @@ uint64_t helper_subt(CPUAlphaState *env, uint64_t a, ui= nt64_t b) fa =3D t_to_float64(a); fb =3D t_to_float64(b); fr =3D float64_sub(fa, fb, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float64_is_normal(fr)); =20 return float64_to_t(fr); } @@ -328,7 +348,7 @@ uint64_t helper_mult(CPUAlphaState *env, uint64_t a, ui= nt64_t b) fa =3D t_to_float64(a); fb =3D t_to_float64(b); fr =3D float64_mul(fa, fb, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float64_is_normal(fr)); =20 return float64_to_t(fr); } @@ -340,7 +360,7 @@ uint64_t helper_divt(CPUAlphaState *env, uint64_t a, ui= nt64_t b) fa =3D t_to_float64(a); fb =3D t_to_float64(b); fr =3D float64_div(fa, fb, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float64_is_normal(fr)); =20 return float64_to_t(fr); } @@ -351,7 +371,7 @@ uint64_t helper_sqrtt(CPUAlphaState *env, uint64_t a) =20 fa =3D t_to_float64(a); fr =3D float64_sqrt(fa, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); =20 return float64_to_t(fr); } @@ -368,7 +388,7 @@ uint64_t helper_cmptun(CPUAlphaState *env, uint64_t a, = uint64_t b) if (float64_unordered_quiet(fa, fb, &FP_STATUS)) { ret =3D 0x4000000000000000ULL; } - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); =20 return ret; } @@ -384,7 +404,7 @@ uint64_t helper_cmpteq(CPUAlphaState *env, uint64_t a, = uint64_t b) if (float64_eq_quiet(fa, fb, &FP_STATUS)) { ret =3D 0x4000000000000000ULL; } - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); =20 return ret; } @@ -400,7 +420,7 @@ uint64_t helper_cmptle(CPUAlphaState *env, uint64_t a, = uint64_t b) if (float64_le(fa, fb, &FP_STATUS)) { ret =3D 0x4000000000000000ULL; } - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); =20 return ret; } @@ -416,7 +436,7 @@ uint64_t helper_cmptlt(CPUAlphaState *env, uint64_t a, = uint64_t b) if (float64_lt(fa, fb, &FP_STATUS)) { ret =3D 0x4000000000000000ULL; } - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); =20 return ret; } @@ -429,7 +449,7 @@ uint64_t helper_cvtts(CPUAlphaState *env, uint64_t a) =20 fa =3D t_to_float64(a); fr =3D float64_to_float32(fa, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, float32_is_normal(fr)); =20 return float32_to_s(fr); } @@ -441,7 +461,7 @@ uint64_t helper_cvtst(CPUAlphaState *env, uint64_t a) =20 fa =3D s_to_float32(a); fr =3D float32_to_float64(fa, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); =20 return float64_to_t(fr); } @@ -449,7 +469,7 @@ uint64_t helper_cvtst(CPUAlphaState *env, uint64_t a) uint64_t helper_cvtqs(CPUAlphaState *env, uint64_t a) { float32 fr =3D int64_to_float32(a, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); =20 return float32_to_s(fr); } @@ -504,7 +524,7 @@ uint64_t helper_cvttq_c(CPUAlphaState *env, uint64_t a) uint64_t helper_cvtqt(CPUAlphaState *env, uint64_t a) { float64 fr =3D int64_to_float64(a, &FP_STATUS); - env->error_code =3D soft_to_fpcr_exc(env); + env->error_code =3D soft_to_fpcr_exc(env, false); return float64_to_t(fr); } =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772584; cv=none; d=zohomail.com; s=zohoarc; b=HxKbeIAKPHk3lNY3myUgtdZs//LrSViOBwSVn0NgalK8XhkjxcP/835laWUqZGnRtwiGhE7p1vJbcjs5Rth3SKeGAyaVfceh6l++WVKHtjPDnLkGxsS3QsjuWvTOt7ysWVmVMcMCJVcm062txJU6v4B0nwSkD4B8qcYbO+a/J9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772584; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=YXpYGsQko7oiiDUGSY97O1bimieZO6QhavLk+dcE/0o=; b=OqyBI8079VOXWN2EiVK/Cmjq64XWCAeUwGTpARSD0750pjt7YWJwM2ce2CSxxjKqcO7cjdDidHNTYlOsSlZhIk/vAtvShrQE4mCmHUFpLkdkyRoTjLE769lLY4NkEZaai3uJ8HSsUPKMQJ67mc5Vb9whrRQWWrsjhd5ao3n+vMY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772584330764.6538018006967; Fri, 23 Oct 2026 09:23:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI1A-0001iR-5p; Fri, 23 Oct 2026 12:21:20 -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 1xKI0v-0001b6-OZ for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:09 -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 1xKI0n-0002yf-LB for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:05 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE67UM3019010 for ; Fri, 23 Oct 2026 16:20:50 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsykby5u-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:20:49 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f5844cb60so194182385a.0 for ; Fri, 23 Oct 2026 09:20:49 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d421f65sm750389f8f.48.2026.10.23.09.20.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= YXpYGsQko7oiiDUGSY97O1bimieZO6QhavLk+dcE/0o=; b=orQorwGg/wQU18hF iQgBDS8CF7S5eqeaeU5gY6kKHcYhS1D1GK/33Wi5CB439gCPnuXGKaMkwhoN4J5R bO+T6qE56vU8w/sUQ757KLfIFghyoGkxRwzBLLpPQ2nekcrjdxptPgeb430uyzBt 9IZteo2Y5mFDVGWnkmmp9Y76vZ/8b6YXGCmOga3ljzpiq/F7+VCQLcFdXVArauCC edmuE6p+3mKBTcziiqsCUCq/EFSHFYt6CwPkiLznuV5uJipl/wcRVQP90w9S63Fu 6rb6pRZ8cecWzBeVctwCRZqjMFiTEhIbLGl+JQLIHEpkJByQb5/shcUWtKvB7RzB 1wQFXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772449; x=1793377249; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=YXpYGsQko7oiiDUGSY97O1bimieZO6QhavLk+dcE/0o=; b=UANe1u3NUIZLmRB4E9kX0k2Fx0YutNSroi1mh9j9cpOEsMEONMnvo5TipWqL1fZ+/w LNhkNkmhk2DMklnybNhcvoBfy0ptusBkfhjT4Dl2JWrDsWsY6ijkcxfptWA9+0cyBDAX u+wRAWK0ZdeNDtYgfnMmQWfkro8N6sGIU0FQMg3PzjF1jHMYz45zX/lEhC1qMw8m8jxj 8C1PdAUbOF7oocZN/yDukJ+BawIAIeYz0+AJ0eJHoyskfSvRYjdLLRPAy7POHoOOUm2i D/ZcN6R0wSGDMWwRsZGI4d9/VoAEZ+TvWhM3ErHIs+5262BrN9GCysxgHHPD/y8dA+MU Iy9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772449; x=1793377249; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=YXpYGsQko7oiiDUGSY97O1bimieZO6QhavLk+dcE/0o=; b=QtSkZWasO03D43BkMSCFJsyBDmgtQpWUTj78ie3oBY/yrBIgmJ696VY7uoOPQCD8aT cRmRaa/WHcDwp0HfzxXRSh04q2mX1hcU1nZJRS1XXH/fFKz02UyuKRmeHexge+87WBjh Fcu1kCPd2izeB5O0rxXfDl/IRna2+MBQzZQW1NN5PBroS8n2kM3ctwavtVSlWcXe5f/x 4knMduXt3gwrejXILObr0AO0YBAciBxSjYpeiykNOq0aamEkmf6AxK0jpAHV2mEEiqFE S4ojKwqpveInN+ATUsqnbZyTpp1BDSsqiGL275p8rkqJ4rbalMnOKhtoCs1/hfErUVoh n0LA== X-Gm-Message-State: AFq9FYIbEd6E09HVn9A2/6O9iv5IwT9zi21P8iP9Roy7OC8eLhItgY7m sMl1EOaPUv7K2xv2ypt7v48xKfnWpssM9d+eH2oyRnNNOs6dovpO8Pmq++hnLSUEgfQtFzJlF42 PRavGrpLGBzdDdcsHj67yLY8Ana7ddmHS5i1yHfVHNRtNSWiSpwhLuEKIRrDn1hSfRrhz X-Gm-Gg: AYBFou0d8H4SMsWX94u0Ru/ahMbuOf+5NtNUfeSHWVi8J4kO1QkQKsMQ8LUsJvc71gn NH4oRFYLzvNAp8vE5le7rGLMbokom8JvqWS7s3DH+PBRQNXiQSi7sVFYfvSS8sNMNOqHBUW8HMY 4OlY9t1OELzaugjrHILHzaVDW+Rf/eS5rWmJOJMnz13waZhnM6XBNYnmRVr9Iv4naeeNtX9TCKa Ms65NWM+0UtTD8bF5EupT+aNnGWx2f4r0YC9rlNNYsj8/RdDcY+qUpYFjACzX7zF7Ax2ts0m94j mBimV+N1l1WU7T4ccwJzUMPiMgXL80kzhyTTxEhclhjIlAU4UbT40Rnl46lvN928Xzxn58ujpx9 1BU91bxQjrTRWEbHCFD9ifA+4v+Is7f4e9kKLx4ys X-Received: by 2002:a05:620a:2b4d:b0:93e:e111:2778 with SMTP id af79cd13be357-93f626db3bdmr983590285a.14.1792772448407; Fri, 23 Oct 2026 09:20:48 -0700 (PDT) X-Received: by 2002:a05:620a:2b4d:b0:93e:e111:2778 with SMTP id af79cd13be357-93f626db3bdmr983583885a.14.1792772447470; Fri, 23 Oct 2026 09:20:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 60/83] target/alpha: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:08 +0200 Message-ID: <20261023161332.60153-61-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX+w55b7vnd1s0 XSfaXik3xXMFdEnUirUE6xwJ9CDG1/HhtJJGQniO80yBc/WJRBl2f1+gO2iekzaO7e6/L10+fWY hE7E4HqAXF61KOuFYwgNLjGXoS2jNzcP4KrdFJhSwNQxB/QsVMSygJRaPUCkVNlwpejaKAjAmZa PjRGOba72uQhh05t9eYvRaijGoBA1E77KU34nlI+T1CgXKeUWFFmasG79z4z60yCTFCuW5qHAb9 IMS+5AkOQRvIDNkB8Yo94pVsXVQCfx1MGtOqDXJa+SVUMKSA+DcGO5RbLYZDHWCZndSDsVgQO8S HizHVN9T6pJAgEn2lzHkLJIhMJqK+Syy6N2GFUS9O+MKSMWOftkePNYV0NIWzBEXuvg9UFmK+OP oF2ZGQzZredAspQNozWmoDpPN9pF5Wg+mr4R37ra1327eOywAsXkyfcJDC3Wr99xc+grOHbkwfu Rm92WRU0P1LEn8M+ZEg== X-Proofpoint-ORIG-GUID: nHmkquvO6y5IjTUrEreU6aSVYY9FkV9S X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX9iq4vl/dga8z fVLMjf0DV1Ioa6KNDk2P0zpp9s/aDZ3Mrk2vanmMkkiTE/Lcz29m2VtamhtzypVnrk7minFhZT/ N5tNECf66l+eOyPEd1FXin1dZUfs2cw= X-Proofpoint-GUID: nHmkquvO6y5IjTUrEreU6aSVYY9FkV9S X-Authority-Analysis: v=2.4 cv=GLKdgeNK c=1 sm=1 tr=0 ts=6adb8961 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=d489uCCT4T9dLKBjaQgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772585679158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-2-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/alpha/clk_helper.c | 2 +- target/alpha/fpu_helper.c | 60 +++++++++++++++++++-------------------- target/alpha/helper.c | 6 ++-- target/alpha/int_helper.c | 38 ++++++++++++------------- target/alpha/sys_helper.c | 12 ++++---- target/alpha/vax_helper.c | 42 +++++++++++++-------------- 6 files changed, 80 insertions(+), 80 deletions(-) diff --git a/target/alpha/clk_helper.c b/target/alpha/clk_helper.c index 26ffc231cda..36674221a66 100644 --- a/target/alpha/clk_helper.c +++ b/target/alpha/clk_helper.c @@ -11,7 +11,7 @@ #include "exec/helper-proto.h" #include "cpu.h" =20 -uint64_t helper_load_pcc(CPUAlphaState *env) +uint64_t HELPER(load_pcc)(CPUAlphaState *env) { #ifndef CONFIG_USER_ONLY /* diff --git a/target/alpha/fpu_helper.c b/target/alpha/fpu_helper.c index e91e907c215..cc095ac156d 100644 --- a/target/alpha/fpu_helper.c +++ b/target/alpha/fpu_helper.c @@ -25,12 +25,12 @@ #define FP_STATUS (env->fp_status) =20 =20 -void helper_setroundmode(CPUAlphaState *env, uint32_t val) +void HELPER(setroundmode)(CPUAlphaState *env, uint32_t val) { set_float_rounding_mode(val, &FP_STATUS); } =20 -void helper_setflushzero(CPUAlphaState *env, uint32_t val) +void HELPER(setflushzero)(CPUAlphaState *env, uint32_t val) { set_flush_to_zero(val, &FP_STATUS); } @@ -91,7 +91,7 @@ static void fp_exc_raise1(CPUAlphaState *env, uintptr_t r= etaddr, /* Raise exceptions for ieee fp insns without software completion. In that case there are no exceptions that don't trap; the mask doesn't apply. */ -void helper_fp_exc_raise(CPUAlphaState *env, uint32_t ignore, uint32_t reg= no) +void HELPER(fp_exc_raise)(CPUAlphaState *env, uint32_t ignore, uint32_t re= gno) { uint32_t exc =3D env->error_code; if (exc) { @@ -104,7 +104,7 @@ void helper_fp_exc_raise(CPUAlphaState *env, uint32_t i= gnore, uint32_t regno) } =20 /* Raise exceptions for ieee fp insns with software completion. */ -void helper_fp_exc_raise_s(CPUAlphaState *env, uint32_t ignore, uint32_t r= egno) +void HELPER(fp_exc_raise_s)(CPUAlphaState *env, uint32_t ignore, uint32_t = regno) { uint32_t exc =3D env->error_code; if (exc) { @@ -135,7 +135,7 @@ void helper_fp_exc_raise_s(CPUAlphaState *env, uint32_t= ignore, uint32_t regno) =20 /* Input handing without software completion. Trap for all non-finite numbers. */ -void helper_ieee_input(CPUAlphaState *env, uint64_t val) +void HELPER(ieee_input)(CPUAlphaState *env, uint64_t val) { uint32_t exp =3D (uint32_t)(val >> 52) & 0x7ff; uint64_t frac =3D val & 0xfffffffffffffull; @@ -153,7 +153,7 @@ void helper_ieee_input(CPUAlphaState *env, uint64_t val) } =20 /* Similar, but does not trap for infinities. Used for comparisons. */ -void helper_ieee_input_cmp(CPUAlphaState *env, uint64_t val) +void HELPER(ieee_input_cmp)(CPUAlphaState *env, uint64_t val) { uint32_t exp =3D (uint32_t)(val >> 52) & 0x7ff; uint64_t frac =3D val & 0xfffffffffffffull; @@ -176,7 +176,7 @@ void helper_ieee_input_cmp(CPUAlphaState *env, uint64_t= val) then the code downstream of that will need to cope with denorms sans flush_input_to_zero. Most of it should work sanely, but there's nothing to compare with. */ -void helper_ieee_input_s(CPUAlphaState *env, uint64_t val) +void HELPER(ieee_input_s)(CPUAlphaState *env, uint64_t val) { if (unlikely(2 * val - 1 < 0x1fffffffffffffull) && !get_flush_inputs_to_zero(&env->fp_status)) { @@ -230,17 +230,17 @@ static inline float32 s_to_float32(uint64_t a) return r.f; } =20 -uint32_t helper_s_to_memory(uint64_t a) +uint32_t HELPER(s_to_memory)(uint64_t a) { return s_to_float32_int(a); } =20 -uint64_t helper_memory_to_s(uint32_t a) +uint64_t HELPER(memory_to_s)(uint32_t a) { return float32_to_s_int(a); } =20 -uint64_t helper_adds(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(adds)(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; =20 @@ -252,7 +252,7 @@ uint64_t helper_adds(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float32_to_s(fr); } =20 -uint64_t helper_subs(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(subs)(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; =20 @@ -264,7 +264,7 @@ uint64_t helper_subs(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float32_to_s(fr); } =20 -uint64_t helper_muls(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(muls)(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; =20 @@ -276,7 +276,7 @@ uint64_t helper_muls(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float32_to_s(fr); } =20 -uint64_t helper_alpha_divs(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(alpha_divs)(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; =20 @@ -288,7 +288,7 @@ uint64_t helper_alpha_divs(CPUAlphaState *env, uint64_t= a, uint64_t b) return float32_to_s(fr); } =20 -uint64_t helper_sqrts(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(sqrts)(CPUAlphaState *env, uint64_t a) { float32 fa, fr; =20 @@ -317,7 +317,7 @@ static inline uint64_t float64_to_t(float64 fa) return r.ll; } =20 -uint64_t helper_addt(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(addt)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; =20 @@ -329,7 +329,7 @@ uint64_t helper_addt(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float64_to_t(fr); } =20 -uint64_t helper_subt(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(subt)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; =20 @@ -341,7 +341,7 @@ uint64_t helper_subt(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float64_to_t(fr); } =20 -uint64_t helper_mult(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(mult)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; =20 @@ -353,7 +353,7 @@ uint64_t helper_mult(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float64_to_t(fr); } =20 -uint64_t helper_divt(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(divt)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; =20 @@ -365,7 +365,7 @@ uint64_t helper_divt(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float64_to_t(fr); } =20 -uint64_t helper_sqrtt(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(sqrtt)(CPUAlphaState *env, uint64_t a) { float64 fa, fr; =20 @@ -377,7 +377,7 @@ uint64_t helper_sqrtt(CPUAlphaState *env, uint64_t a) } =20 /* Comparisons */ -uint64_t helper_cmptun(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(cmptun)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; uint64_t ret =3D 0; @@ -393,7 +393,7 @@ uint64_t helper_cmptun(CPUAlphaState *env, uint64_t a, = uint64_t b) return ret; } =20 -uint64_t helper_cmpteq(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(cmpteq)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; uint64_t ret =3D 0; @@ -409,7 +409,7 @@ uint64_t helper_cmpteq(CPUAlphaState *env, uint64_t a, = uint64_t b) return ret; } =20 -uint64_t helper_cmptle(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(cmptle)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; uint64_t ret =3D 0; @@ -425,7 +425,7 @@ uint64_t helper_cmptle(CPUAlphaState *env, uint64_t a, = uint64_t b) return ret; } =20 -uint64_t helper_cmptlt(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(cmptlt)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; uint64_t ret =3D 0; @@ -442,7 +442,7 @@ uint64_t helper_cmptlt(CPUAlphaState *env, uint64_t a, = uint64_t b) } =20 /* Floating point format conversion */ -uint64_t helper_cvtts(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvtts)(CPUAlphaState *env, uint64_t a) { float64 fa; float32 fr; @@ -454,7 +454,7 @@ uint64_t helper_cvtts(CPUAlphaState *env, uint64_t a) return float32_to_s(fr); } =20 -uint64_t helper_cvtst(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvtst)(CPUAlphaState *env, uint64_t a) { float32 fa; float64 fr; @@ -466,7 +466,7 @@ uint64_t helper_cvtst(CPUAlphaState *env, uint64_t a) return float64_to_t(fr); } =20 -uint64_t helper_cvtqs(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvtqs)(CPUAlphaState *env, uint64_t a) { float32 fr =3D int64_to_float32(a, &FP_STATUS); env->error_code =3D soft_to_fpcr_exc(env, false); @@ -511,24 +511,24 @@ static uint64_t do_cvttq(CPUAlphaState *env, uint64_t= a, int roundmode) return ret; } =20 -uint64_t helper_cvttq(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvttq)(CPUAlphaState *env, uint64_t a) { return do_cvttq(env, a, get_float_rounding_mode(&FP_STATUS)); } =20 -uint64_t helper_cvttq_c(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvttq_c)(CPUAlphaState *env, uint64_t a) { return do_cvttq(env, a, float_round_to_zero); } =20 -uint64_t helper_cvtqt(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvtqt)(CPUAlphaState *env, uint64_t a) { float64 fr =3D int64_to_float64(a, &FP_STATUS); env->error_code =3D soft_to_fpcr_exc(env, false); return float64_to_t(fr); } =20 -uint64_t helper_cvtql(CPUAlphaState *env, uint64_t val) +uint64_t HELPER(cvtql)(CPUAlphaState *env, uint64_t val) { uint32_t exc =3D 0; if (val !=3D (int32_t)val) { diff --git a/target/alpha/helper.c b/target/alpha/helper.c index d59ecc0d4a9..55c7782b4d2 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -111,12 +111,12 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_= t val) env->fpcr_flush_to_zero =3D t; } =20 -uint64_t helper_load_fpcr(CPUAlphaState *env) +uint64_t HELPER(load_fpcr)(CPUAlphaState *env) { return cpu_alpha_load_fpcr(env); } =20 -void helper_store_fpcr(CPUAlphaState *env, uint64_t val) +void HELPER(store_fpcr)(CPUAlphaState *env, uint64_t val) { cpu_alpha_store_fpcr(env, val); } @@ -531,7 +531,7 @@ void alpha_cpu_dump_state(CPUState *cs, FILE *f, int fl= ags) =20 /* This should only be called from translate, via gen_excp. We expect that ENV->PC has already been updated. */ -G_NORETURN void helper_excp(CPUAlphaState *env, int excp, int error) +G_NORETURN void HELPER(excp)(CPUAlphaState *env, int excp, int error) { CPUState *cs =3D env_cpu(env); =20 diff --git a/target/alpha/int_helper.c b/target/alpha/int_helper.c index 6bfe63500e0..11b0af82bc1 100644 --- a/target/alpha/int_helper.c +++ b/target/alpha/int_helper.c @@ -23,7 +23,7 @@ #include "qemu/host-utils.h" =20 =20 -uint64_t helper_zapnot(uint64_t val, uint64_t mskb) +uint64_t HELPER(zapnot)(uint64_t val, uint64_t mskb) { uint64_t mask; =20 @@ -39,12 +39,12 @@ uint64_t helper_zapnot(uint64_t val, uint64_t mskb) return val & mask; } =20 -uint64_t helper_zap(uint64_t val, uint64_t mask) +uint64_t HELPER(zap)(uint64_t val, uint64_t mask) { - return helper_zapnot(val, ~mask); + return HELPER(zapnot)(val, ~mask); } =20 -uint64_t helper_cmpbe0(uint64_t a) +uint64_t HELPER(cmpbe0)(uint64_t a) { uint64_t m =3D 0x7f7f7f7f7f7f7f7fULL; uint64_t c =3D ~(((a & m) + m) | a | m); @@ -58,7 +58,7 @@ uint64_t helper_cmpbe0(uint64_t a) return c >> 56; } =20 -uint64_t helper_cmpbge(uint64_t a, uint64_t b) +uint64_t HELPER(cmpbge)(uint64_t a, uint64_t b) { uint64_t mask =3D 0x00ff00ff00ff00ffULL; uint64_t test =3D 0x0100010001000100ULL; @@ -87,7 +87,7 @@ uint64_t helper_cmpbge(uint64_t a, uint64_t b) return cl >> 50; } =20 -uint64_t helper_minub8(uint64_t op1, uint64_t op2) +uint64_t HELPER(minub8)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; uint8_t opa, opb, opr; @@ -102,7 +102,7 @@ uint64_t helper_minub8(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_minsb8(uint64_t op1, uint64_t op2) +uint64_t HELPER(minsb8)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; int8_t opa, opb; @@ -118,7 +118,7 @@ uint64_t helper_minsb8(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_minuw4(uint64_t op1, uint64_t op2) +uint64_t HELPER(minuw4)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; uint16_t opa, opb, opr; @@ -133,7 +133,7 @@ uint64_t helper_minuw4(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_minsw4(uint64_t op1, uint64_t op2) +uint64_t HELPER(minsw4)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; int16_t opa, opb; @@ -149,7 +149,7 @@ uint64_t helper_minsw4(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_maxub8(uint64_t op1, uint64_t op2) +uint64_t HELPER(maxub8)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; uint8_t opa, opb, opr; @@ -164,7 +164,7 @@ uint64_t helper_maxub8(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_maxsb8(uint64_t op1, uint64_t op2) +uint64_t HELPER(maxsb8)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; int8_t opa, opb; @@ -180,7 +180,7 @@ uint64_t helper_maxsb8(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_maxuw4(uint64_t op1, uint64_t op2) +uint64_t HELPER(maxuw4)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; uint16_t opa, opb, opr; @@ -195,7 +195,7 @@ uint64_t helper_maxuw4(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_maxsw4(uint64_t op1, uint64_t op2) +uint64_t HELPER(maxsw4)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; int16_t opa, opb; @@ -211,7 +211,7 @@ uint64_t helper_maxsw4(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_perr(uint64_t op1, uint64_t op2) +uint64_t HELPER(perr)(uint64_t op1, uint64_t op2) { uint64_t res =3D 0; uint8_t opa, opb, opr; @@ -230,12 +230,12 @@ uint64_t helper_perr(uint64_t op1, uint64_t op2) return res; } =20 -uint64_t helper_pklb(uint64_t op1) +uint64_t HELPER(pklb)(uint64_t op1) { return (op1 & 0xff) | ((op1 >> 24) & 0xff00); } =20 -uint64_t helper_pkwb(uint64_t op1) +uint64_t HELPER(pkwb)(uint64_t op1) { return ((op1 & 0xff) | ((op1 >> 8) & 0xff00) @@ -243,12 +243,12 @@ uint64_t helper_pkwb(uint64_t op1) | ((op1 >> 24) & 0xff000000)); } =20 -uint64_t helper_unpkbl(uint64_t op1) +uint64_t HELPER(unpkbl)(uint64_t op1) { return (op1 & 0xff) | ((op1 & 0xff00) << 24); } =20 -uint64_t helper_unpkbw(uint64_t op1) +uint64_t HELPER(unpkbw)(uint64_t op1) { return ((op1 & 0xff) | ((op1 & 0xff00) << 8) @@ -256,7 +256,7 @@ uint64_t helper_unpkbw(uint64_t op1) | ((op1 & 0xff000000) << 24)); } =20 -void helper_check_overflow(CPUAlphaState *env, uint64_t op1, uint64_t op2) +void HELPER(check_overflow)(CPUAlphaState *env, uint64_t op1, uint64_t op2) { if (unlikely(op1 !=3D op2)) { arith_excp(env, GETPC(), EXC_M_IOV, 0); diff --git a/target/alpha/sys_helper.c b/target/alpha/sys_helper.c index 0e0a619975b..95613e97f2b 100644 --- a/target/alpha/sys_helper.c +++ b/target/alpha/sys_helper.c @@ -27,17 +27,17 @@ =20 =20 /* PALcode support special instructions */ -void helper_tbia(CPUAlphaState *env) +void HELPER(tbia)(CPUAlphaState *env) { tlb_flush(env_cpu(env)); } =20 -void helper_tbis(CPUAlphaState *env, uint64_t p) +void HELPER(tbis)(CPUAlphaState *env, uint64_t p) { tlb_flush_page(env_cpu(env), p); } =20 -void helper_halt(uint64_t restart) +void HELPER(halt)(uint64_t restart) { if (restart) { qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); @@ -46,17 +46,17 @@ void helper_halt(uint64_t restart) } } =20 -uint64_t helper_get_vmtime(void) +uint64_t HELPER(get_vmtime)(void) { return qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); } =20 -uint64_t helper_get_walltime(void) +uint64_t HELPER(get_walltime)(void) { return qemu_clock_get_ns(rtc_clock); } =20 -void helper_set_alarm(CPUAlphaState *env, uint64_t expire) +void HELPER(set_alarm)(CPUAlphaState *env, uint64_t expire) { AlphaCPU *cpu =3D env_archcpu(env); =20 diff --git a/target/alpha/vax_helper.c b/target/alpha/vax_helper.c index c1d201e7b4d..01c12538494 100644 --- a/target/alpha/vax_helper.c +++ b/target/alpha/vax_helper.c @@ -82,7 +82,7 @@ static float32 f_to_float32(CPUAlphaState *env, uintptr_t= retaddr, uint64_t a) return r.f; } =20 -uint32_t helper_f_to_memory(uint64_t a) +uint32_t HELPER(f_to_memory)(uint64_t a) { uint32_t r; r =3D (a & 0x00001fffe0000000ull) >> 13; @@ -91,7 +91,7 @@ uint32_t helper_f_to_memory(uint64_t a) return r; } =20 -uint64_t helper_memory_to_f(uint32_t a) +uint64_t HELPER(memory_to_f)(uint32_t a) { uint64_t r; r =3D ((uint64_t)(a & 0x0000c000)) << 48; @@ -106,7 +106,7 @@ uint64_t helper_memory_to_f(uint32_t a) /* ??? Emulating VAX arithmetic with IEEE arithmetic is wrong. We should either implement VAX arithmetic properly or just signal invalid opcode.= */ =20 -uint64_t helper_addf(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(addf)(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; =20 @@ -116,7 +116,7 @@ uint64_t helper_addf(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float32_to_f(fr); } =20 -uint64_t helper_subf(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(subf)(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; =20 @@ -126,7 +126,7 @@ uint64_t helper_subf(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float32_to_f(fr); } =20 -uint64_t helper_mulf(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(mulf)(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; =20 @@ -136,7 +136,7 @@ uint64_t helper_mulf(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float32_to_f(fr); } =20 -uint64_t helper_divf(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(divf)(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; =20 @@ -146,7 +146,7 @@ uint64_t helper_divf(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float32_to_f(fr); } =20 -uint64_t helper_sqrtf(CPUAlphaState *env, uint64_t t) +uint64_t HELPER(sqrtf)(CPUAlphaState *env, uint64_t t) { float32 ft, fr; =20 @@ -213,7 +213,7 @@ static float64 g_to_float64(CPUAlphaState *env, uintptr= _t retaddr, uint64_t a) return r.d; } =20 -uint64_t helper_g_to_memory(uint64_t a) +uint64_t HELPER(g_to_memory)(uint64_t a) { uint64_t r; r =3D (a & 0x000000000000ffffull) << 48; @@ -223,7 +223,7 @@ uint64_t helper_g_to_memory(uint64_t a) return r; } =20 -uint64_t helper_memory_to_g(uint64_t a) +uint64_t HELPER(memory_to_g)(uint64_t a) { uint64_t r; r =3D (a & 0x000000000000ffffull) << 48; @@ -233,7 +233,7 @@ uint64_t helper_memory_to_g(uint64_t a) return r; } =20 -uint64_t helper_addg(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(addg)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; =20 @@ -243,7 +243,7 @@ uint64_t helper_addg(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float64_to_g(fr); } =20 -uint64_t helper_subg(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(subg)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; =20 @@ -253,7 +253,7 @@ uint64_t helper_subg(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float64_to_g(fr); } =20 -uint64_t helper_mulg(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(mulg)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; =20 @@ -263,7 +263,7 @@ uint64_t helper_mulg(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float64_to_g(fr); } =20 -uint64_t helper_divg(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(divg)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; =20 @@ -273,7 +273,7 @@ uint64_t helper_divg(CPUAlphaState *env, uint64_t a, ui= nt64_t b) return float64_to_g(fr); } =20 -uint64_t helper_sqrtg(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(sqrtg)(CPUAlphaState *env, uint64_t a) { float64 fa, fr; =20 @@ -282,7 +282,7 @@ uint64_t helper_sqrtg(CPUAlphaState *env, uint64_t a) return float64_to_g(fr); } =20 -uint64_t helper_cmpgeq(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(cmpgeq)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; =20 @@ -296,7 +296,7 @@ uint64_t helper_cmpgeq(CPUAlphaState *env, uint64_t a, = uint64_t b) } } =20 -uint64_t helper_cmpgle(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(cmpgle)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; =20 @@ -310,7 +310,7 @@ uint64_t helper_cmpgle(CPUAlphaState *env, uint64_t a, = uint64_t b) } } =20 -uint64_t helper_cmpglt(CPUAlphaState *env, uint64_t a, uint64_t b) +uint64_t HELPER(cmpglt)(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; =20 @@ -324,13 +324,13 @@ uint64_t helper_cmpglt(CPUAlphaState *env, uint64_t a= , uint64_t b) } } =20 -uint64_t helper_cvtqf(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvtqf)(CPUAlphaState *env, uint64_t a) { float32 fr =3D int64_to_float32(a, &FP_STATUS); return float32_to_f(fr); } =20 -uint64_t helper_cvtgf(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvtgf)(CPUAlphaState *env, uint64_t a) { float64 fa; float32 fr; @@ -340,13 +340,13 @@ uint64_t helper_cvtgf(CPUAlphaState *env, uint64_t a) return float32_to_f(fr); } =20 -uint64_t helper_cvtgq(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvtgq)(CPUAlphaState *env, uint64_t a) { float64 fa =3D g_to_float64(env, GETPC(), a); return float64_to_int64_round_to_zero(fa, &FP_STATUS); } =20 -uint64_t helper_cvtqg(CPUAlphaState *env, uint64_t a) +uint64_t HELPER(cvtqg)(CPUAlphaState *env, uint64_t a) { float64 fr; fr =3D int64_to_float64(a, &FP_STATUS); --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772510; cv=none; d=zohomail.com; s=zohoarc; b=JWuRCdFjsDpgvHOXFcPEup2TygODQhyP+o/hclINpjafZb4j3yh4Tmy98GhHQCHf+pCKARMFDzvIbxBN4D+ONOyrmPcvlpNUe37h3ZmyrorI3IWFPecShHMuQ9XKI1h3BcG8i1MuA09efn5u9NEkcoc0exKFoa63KJlO81ftSK0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772510; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=0vZ+WjjnN1pJ03QYeryilA3h2cEaVhJGtrfc4CGEDjA=; b=cPmOfr3S7kwotjMTN+991Hdc2cQReHWP0pRu5AO+K9qP8j8YBMQtfmL2NwLXDGa59XOLXVzoda8oIIGnwahrKykt6wkOCAKKAN+jkU9kZlTLt+s+0keKP7ZTS4eerRCg43Y+RIPN/QpavG4oV6R5NsUTYMOSXUyZAqolFg1/5N8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772510171693.4264688507419; Fri, 23 Oct 2026 09:21:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI1D-0001pn-VP; Fri, 23 Oct 2026 12:21:24 -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 1xKI0w-0001bA-KM for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21: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 1xKI0s-0002z1-HY for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:06 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6rZB1492211 for ; Fri, 23 Oct 2026 16:20:57 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauyqm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:20:56 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93f32050e72so342536385a.1 for ; Fri, 23 Oct 2026 09:20:56 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a92a4444sm16474995e9.5.2026.10.23.09.20.53 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 0vZ+WjjnN1pJ03QYeryilA3h2cEaVhJGtrfc4CGEDjA=; b=YqosLHFQg+o1NcNx RaF+c1/dKMabDQVc473Ttj2V9zyogg0vCZ/YR8pQ0amhWKPknt4OOtj/wClNe0FJ h5QqKFCSNmMDtIDJk9qft/P4E0ASpI7vBV5Rlv0EwEsjKw7RnYFcjxrpTZQpmYbd QYW5UQhNtuVDMWLRhaTYVwDZq3uXAaHLdjD/42EBwvgkF7ppSr/308I4Iv8UKKLB DG3pHvoyEd39SmA3ERowOm+bkPuOKewRVe6Lxsu3PJvEcWwIbe+SVBAzyXMDEyMo POKrtPXSj0xoQey0S8phf0x1pPIxoCkIe9Bb3D0iHo1OdpD5F4FH6yBxxo4CmCg9 LEHx9A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772456; x=1793377256; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=0vZ+WjjnN1pJ03QYeryilA3h2cEaVhJGtrfc4CGEDjA=; b=AvgkAkqg7Nd4l6zJCjbsjrYjys72bvIILvIIDW7HwvPlMm8ZDanmz2mNo47+GeNUze G1KR9RPaCRaAz3hrhTcJeBMEPCsDtPqCxJfeREVoJJGA6l4kZoi5L+eAqQc2UOZQKxzZ /gWMVmyI7nijhak4z+PwEfzqG0EMdVSOqcme9SlLY8fJrc9zC31PEv5WeS+q+yuXdjiI ZgPNRWZ3LIBYIl4xKYP9Y5pfwuPSGbtxj+vHcxdp1ngd8wNzU0Djrk76SlcmhBNpBPRt tJ+BQLjU4VUQIWi85pesAEm56Xnmzy/NNWKRhncm2V8ICAxTkbFrx+rlHzXSyyoD9Dat 7Pdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772456; x=1793377256; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=0vZ+WjjnN1pJ03QYeryilA3h2cEaVhJGtrfc4CGEDjA=; b=MUfTI5XU9+0UFhf07Ro1EDsA2twxP0mE2HZ9uTkHlpfTIQKBwGoZafxEH86DHC2WCT /vgKvj1pnd4CI4AAXVST+2RY2dzTpdhDX1nRkTs06Pyq4QGXqa321/bLxFxe9ogbdngz VzwznJ125rt1+1ZCes4qs1ANi2K5TWAfR6OEnWt7PLVwcgtmQZBfHGfKrUqMrOv/w1JI QWgwjMx2kxdq4sv3JLMYEkEG5+SmG73OLCGZdKJBiklOaWKCwX0AT0esIS1KLTLIKigG 8fgPOf8HIfoLNoIZ78Vr6SPuVQQXEwhl2k/kRgboVAHAiYLzNFBaZvcTKFTSyb7RvH5l iSTA== X-Gm-Message-State: AFq9FYLVU/5iZ5JVZ91JX2cWrexYkZ4OZLspdi6TMfyXvF7L37YJGVnk 4ZKPQSJieLy++QVSZXFAyQK5esRmHbTMofl+RnIoMAa9RR5vgMNfS85jVSpC1BWRJweBSnyUTNC gm3z4NEb55aQzJ8ZqugRQ8bcIVr9gupADikbNEZaOX1xUdMJbRGmqRZP3YJ7V8WPi9CyY X-Gm-Gg: AYBFou2kZrn35Y+gWd9cfcaxcm5An9ab+fbbg+4O4+DZe1kZFhSs6eRcOmIIr/t6bap xxV9pl9iIdYsI2+dzZ9aRAxqniV4lZpu5e3b/mCjDqf0Mf8qtO0C5wYnRtPb22b2aHzJRc5LmGV iQq3mb73WCMBM8Rciiqth2xXaCfUcF9NhAHSfLWTgKaGyfNvPn8P9rvEUV+5LaNt/v66WrhIKzC lgfqxTpwpi712ytCrtfz9sY4rgolOkEpKmNpox7otstA6BcvfxyCq04IeICwYe1htFVR7JsaNqH xCGlauUEtd61e/Jkywo22j5YQUdZyWhtOmZ8MWKjk1y3Q5j9oxDbN092R6EDrzYMh4+6ZEfYnQm I2SEq58S58+7m4YhJxcXh1mwotpT9WNv48wGcFI5f X-Received: by 2002:a05:620a:40c3:b0:937:d6e8:59b0 with SMTP id af79cd13be357-93f6f79bca2mr490649085a.10.1792772455512; Fri, 23 Oct 2026 09:20:55 -0700 (PDT) X-Received: by 2002:a05:620a:40c3:b0:937:d6e8:59b0 with SMTP id af79cd13be357-93f6f79bca2mr490641785a.10.1792772454583; Fri, 23 Oct 2026 09:20:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 61/83] target/arm: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:09 +0200 Message-ID: <20261023161332.60153-62-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb8969 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=UqKkN2FlH-C22XUL27IA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXxWWJkvrQwIwX 6Q/XPkbTqu/Bgqw+VN5GRIvj2AsE/CIU95iWebhQIb0Dy5YEYgbETNC5LKDbOa61gGSzbYYSU0s s3DWb0+uRpoexcnQf+tFwZWtgvn4ScU= X-Proofpoint-GUID: 5uWwGYH_OK4X5mOqXV7D_ov3NJty3Igw X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX9PqTvb0IS3jT ROKD1C7wg+idQlpTy0GTYxa8V77sYZqEUIe8qe9i4xrSUiK4Qba5wIRuNfnjJ0M2PCm1i7QbSwh NNlgHe34md3cF0mss6fRBP/x+e37AzhNoDu5PW0bQzfZ71cjIFXWO4qlYBgGelNHjBGDoP6ICT+ nj88tBhlmjLKigpaB7KVMPg5hu7zCHY4EhZvXd85Dl4ABWPAL0zSsqcH/jmRIJDMEHwtUcb44Dv G8aAp3dxS+acQvUk825R5O8SG5vz3JIDbzD/Evjbx+qqAl00EMwabJ4aivEUlOG+Vlc1Nd1INSq 2s6rRvOXTz47krjEqSrmpomhhOl1pH8T3qASK/Tv1BtoAH2Vy1BiHcjV+QUiups7/yBAVaScQqE 15GMrw8ANe1ylL5gsImS2Y9HoiOyUm4DipK71K9ieBwcBekcUqsDibZt+V6wmzXgCWRs/PnplsW BO6BhXk9ZI4nqMyQRvQ== X-Proofpoint-ORIG-GUID: 5uWwGYH_OK4X5mOqXV7D_ov3NJty3Igw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772512425158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-3-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/tcg/vec_internal.h | 5 +- target/arm/tcg/helper-a64.c | 6 +- target/arm/tcg/mve_helper.c | 28 +++---- target/arm/tcg/psci.c | 2 +- target/arm/tcg/sme_helper.c | 4 +- target/arm/tcg/sve_helper.c | 141 +++++++++++++++++----------------- target/arm/tcg/tlb_helper.c | 2 +- target/arm/tcg/vec_helper.c | 72 ++++++++--------- target/arm/tcg/vec_helper64.c | 64 +++++++-------- 9 files changed, 163 insertions(+), 161 deletions(-) diff --git a/target/arm/tcg/vec_internal.h b/target/arm/tcg/vec_internal.h index 8f6d8a984b3..6d9d7c35efa 100644 --- a/target/arm/tcg/vec_internal.h +++ b/target/arm/tcg/vec_internal.h @@ -22,6 +22,7 @@ =20 #include "fpu/softfloat.h" #include "vector-type.h" +#include "exec/helper-head.h.inc" =20 typedef struct CPUArchState CPUARMState; =20 @@ -364,8 +365,8 @@ static inline float64 float64_maybe_ah_chs(float64 a, b= ool fpcr_ah) } =20 /* Not actually called directly as a helper, but uses similar machinery. */ -bfloat16 helper_sme2_ah_fmax_b16(bfloat16 a, bfloat16 b, float_status *fps= t); -bfloat16 helper_sme2_ah_fmin_b16(bfloat16 a, bfloat16 b, float_status *fps= t); +bfloat16 HELPER(sme2_ah_fmax_b16)(bfloat16 a, bfloat16 b, float_status *fp= st); +bfloat16 HELPER(sme2_ah_fmin_b16)(bfloat16 a, bfloat16 b, float_status *fp= st); =20 float32 sve_f16_to_f32(float16 f, float_status *fpst); float16 sve_f32_to_f16(float32 f, float_status *fpst); diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c index f76d89990c3..fdfa220574f 100644 --- a/target/arm/tcg/helper-a64.c +++ b/target/arm/tcg/helper-a64.c @@ -707,7 +707,7 @@ void HELPER(exception_return)(CPUARMState *env, uint64_= t new_pc) } else { env->regs[15] =3D new_pc & ~0x3; } - helper_rebuild_hflags_a32(env, new_el); + HELPER(rebuild_hflags_a32)(env, new_el); qemu_log_mask(CPU_LOG_INT, "Exception return from AArch64 EL%d to " "AArch32 EL%d PC 0x%" PRIx32 "\n", cur_el, new_el, env->regs[15]); @@ -721,7 +721,7 @@ void HELPER(exception_return)(CPUARMState *env, uint64_= t new_pc) env->pstate &=3D ~PSTATE_SS; } aarch64_restore_sp(env, new_el); - helper_rebuild_hflags_a64(env, new_el); + HELPER(rebuild_hflags_a64)(env, new_el); =20 /* * Apply TBI to the exception return address. We had to delay this @@ -777,7 +777,7 @@ illegal_return: if (!arm_singlestep_active(env)) { env->pstate &=3D ~PSTATE_SS; } - helper_rebuild_hflags_a64(env, cur_el); + HELPER(rebuild_hflags_a64)(env, cur_el); qemu_log_mask(LOG_GUEST_ERROR, "Illegal exception return at EL%d: " "resuming execution at 0x%" PRIx64 "\n", cur_el, env->pc= ); } diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c index 09ae2334167..4a8e0b210e6 100644 --- a/target/arm/tcg/mve_helper.c +++ b/target/arm/tcg/mve_helper.c @@ -3310,14 +3310,14 @@ DO_VCMP_FP_BOTH(vfcmples, vfcmple_scalars, 4, float= 32, !DO_GT32) mve_advance_vpt(env); \ } =20 -DO_VCVT_FIXED(vcvt_sh, 2, int16_t, helper_vfp_shtoh) -DO_VCVT_FIXED(vcvt_uh, 2, uint16_t, helper_vfp_uhtoh) -DO_VCVT_FIXED(vcvt_hs, 2, int16_t, helper_vfp_toshh_round_to_zero) -DO_VCVT_FIXED(vcvt_hu, 2, uint16_t, helper_vfp_touhh_round_to_zero) -DO_VCVT_FIXED(vcvt_sf, 4, int32_t, helper_vfp_sltos) -DO_VCVT_FIXED(vcvt_uf, 4, uint32_t, helper_vfp_ultos) -DO_VCVT_FIXED(vcvt_fs, 4, int32_t, helper_vfp_tosls_round_to_zero) -DO_VCVT_FIXED(vcvt_fu, 4, uint32_t, helper_vfp_touls_round_to_zero) +DO_VCVT_FIXED(vcvt_sh, 2, int16_t, HELPER(vfp_shtoh)) +DO_VCVT_FIXED(vcvt_uh, 2, uint16_t, HELPER(vfp_uhtoh)) +DO_VCVT_FIXED(vcvt_hs, 2, int16_t, HELPER(vfp_toshh_round_to_zero)) +DO_VCVT_FIXED(vcvt_hu, 2, uint16_t, HELPER(vfp_touhh_round_to_zero)) +DO_VCVT_FIXED(vcvt_sf, 4, int32_t, HELPER(vfp_sltos)) +DO_VCVT_FIXED(vcvt_uf, 4, uint32_t, HELPER(vfp_ultos)) +DO_VCVT_FIXED(vcvt_fs, 4, int32_t, HELPER(vfp_tosls_round_to_zero)) +DO_VCVT_FIXED(vcvt_fu, 4, uint32_t, HELPER(vfp_touls_round_to_zero)) =20 /* VCVT with specified rmode */ #define DO_VCVT_RMODE(OP, ESIZE, TYPE, FN) \ @@ -3351,13 +3351,13 @@ DO_VCVT_FIXED(vcvt_fu, 4, uint32_t, helper_vfp_toul= s_round_to_zero) mve_advance_vpt(env); \ } =20 -DO_VCVT_RMODE(vcvt_rm_sh, 2, uint16_t, helper_vfp_toshh) -DO_VCVT_RMODE(vcvt_rm_uh, 2, uint16_t, helper_vfp_touhh) -DO_VCVT_RMODE(vcvt_rm_ss, 4, uint32_t, helper_vfp_tosls) -DO_VCVT_RMODE(vcvt_rm_us, 4, uint32_t, helper_vfp_touls) +DO_VCVT_RMODE(vcvt_rm_sh, 2, uint16_t, HELPER(vfp_toshh)) +DO_VCVT_RMODE(vcvt_rm_uh, 2, uint16_t, HELPER(vfp_touhh)) +DO_VCVT_RMODE(vcvt_rm_ss, 4, uint32_t, HELPER(vfp_tosls)) +DO_VCVT_RMODE(vcvt_rm_us, 4, uint32_t, HELPER(vfp_touls)) =20 -#define DO_VRINT_RM_H(M, F, S) helper_rinth(M, S) -#define DO_VRINT_RM_S(M, F, S) helper_rints(M, S) +#define DO_VRINT_RM_H(M, F, S) HELPER(rinth)(M, S) +#define DO_VRINT_RM_S(M, F, S) HELPER(rints)(M, S) =20 DO_VCVT_RMODE(vrint_rm_h, 2, uint16_t, DO_VRINT_RM_H) DO_VCVT_RMODE(vrint_rm_s, 4, uint32_t, DO_VRINT_RM_S) diff --git a/target/arm/tcg/psci.c b/target/arm/tcg/psci.c index 56754bde951..d8e01df7623 100644 --- a/target/arm/tcg/psci.c +++ b/target/arm/tcg/psci.c @@ -172,7 +172,7 @@ void arm_handle_psci_call(ARMCPU *cpu) } else { env->regs[0] =3D 0; } - helper_wfi(env, 4); + HELPER(wfi)(env, 4); break; case QEMU_PSCI_1_0_FN_PSCI_FEATURES: switch (param[1]) { diff --git a/target/arm/tcg/sme_helper.c b/target/arm/tcg/sme_helper.c index 9de95428d2a..5fb629362b9 100644 --- a/target/arm/tcg/sme_helper.c +++ b/target/arm/tcg/sme_helper.c @@ -34,12 +34,12 @@ #define HELPER_H "tcg/helper-sme-defs.h" #include "exec/helper-info.c.inc" =20 -void helper_set_svcr(CPUARMState *env, uint32_t val, uint32_t mask) +void HELPER(set_svcr)(CPUARMState *env, uint32_t val, uint32_t mask) { aarch64_set_svcr(env, val, mask); } =20 -void helper_sme_zero(CPUARMState *env, uint32_t imm, uint32_t svl) +void HELPER(sme_zero)(CPUARMState *env, uint32_t imm, uint32_t svl) { uint32_t i; =20 diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c index 8389dce6299..c296fc8c08f 100644 --- a/target/arm/tcg/sve_helper.c +++ b/target/arm/tcg/sve_helper.c @@ -778,13 +778,13 @@ DO_ZPZZ_PAIR_FP(sve2_fminp_zpzz_h, float16, H1_2, flo= at16_min) DO_ZPZZ_PAIR_FP(sve2_fminp_zpzz_s, float32, H1_4, float32_min) DO_ZPZZ_PAIR_FP(sve2_fminp_zpzz_d, float64, H1_8, float64_min) =20 -DO_ZPZZ_PAIR_FP(sve2_ah_fmaxp_zpzz_h, float16, H1_2, helper_vfp_ah_maxh) -DO_ZPZZ_PAIR_FP(sve2_ah_fmaxp_zpzz_s, float32, H1_4, helper_vfp_ah_maxs) -DO_ZPZZ_PAIR_FP(sve2_ah_fmaxp_zpzz_d, float64, H1_8, helper_vfp_ah_maxd) +DO_ZPZZ_PAIR_FP(sve2_ah_fmaxp_zpzz_h, float16, H1_2, HELPER(vfp_ah_maxh)) +DO_ZPZZ_PAIR_FP(sve2_ah_fmaxp_zpzz_s, float32, H1_4, HELPER(vfp_ah_maxs)) +DO_ZPZZ_PAIR_FP(sve2_ah_fmaxp_zpzz_d, float64, H1_8, HELPER(vfp_ah_maxd)) =20 -DO_ZPZZ_PAIR_FP(sve2_ah_fminp_zpzz_h, float16, H1_2, helper_vfp_ah_minh) -DO_ZPZZ_PAIR_FP(sve2_ah_fminp_zpzz_s, float32, H1_4, helper_vfp_ah_mins) -DO_ZPZZ_PAIR_FP(sve2_ah_fminp_zpzz_d, float64, H1_8, helper_vfp_ah_mind) +DO_ZPZZ_PAIR_FP(sve2_ah_fminp_zpzz_h, float16, H1_2, HELPER(vfp_ah_minh)) +DO_ZPZZ_PAIR_FP(sve2_ah_fminp_zpzz_s, float32, H1_4, HELPER(vfp_ah_mins)) +DO_ZPZZ_PAIR_FP(sve2_ah_fminp_zpzz_d, float64, H1_8, HELPER(vfp_ah_mind)) =20 #undef DO_ZPZZ_PAIR_FP =20 @@ -1044,8 +1044,8 @@ DO_ZPZ(sve2_sqneg_h, uint16_t, H1_2, DO_SQNEG) DO_ZPZ(sve2_sqneg_s, uint32_t, H1_4, DO_SQNEG) DO_ZPZ_D(sve2_sqneg_d, uint64_t, DO_SQNEG) =20 -DO_ZPZ(sve2_urecpe_s, uint32_t, H1_4, helper_recpe_u32) -DO_ZPZ(sve2_ursqrte_s, uint32_t, H1_4, helper_rsqrte_u32) +DO_ZPZ(sve2_urecpe_s, uint32_t, H1_4, HELPER(recpe_u32)) +DO_ZPZ(sve2_ursqrte_s, uint32_t, H1_4, HELPER(rsqrte_u32)) =20 /* Three-operand expander, unpredicated, in which the third operand is "wi= de". */ @@ -3621,25 +3621,25 @@ static void do_perseg_zzz(void *vd, void *vn, void = *vm, void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \ { do_perseg_zzz(vd, vn, vm, desc, FUNC); } =20 -DO_PERSEG_ZZZ(sve2p1_uzpq_b, helper_sve_uzp_b) -DO_PERSEG_ZZZ(sve2p1_uzpq_h, helper_sve_uzp_h) -DO_PERSEG_ZZZ(sve2p1_uzpq_s, helper_sve_uzp_s) -DO_PERSEG_ZZZ(sve2p1_uzpq_d, helper_sve_uzp_d) +DO_PERSEG_ZZZ(sve2p1_uzpq_b, HELPER(sve_uzp_b)) +DO_PERSEG_ZZZ(sve2p1_uzpq_h, HELPER(sve_uzp_h)) +DO_PERSEG_ZZZ(sve2p1_uzpq_s, HELPER(sve_uzp_s)) +DO_PERSEG_ZZZ(sve2p1_uzpq_d, HELPER(sve_uzp_d)) =20 -DO_PERSEG_ZZZ(sve2p1_zipq_b, helper_sve_zip_b) -DO_PERSEG_ZZZ(sve2p1_zipq_h, helper_sve_zip_h) -DO_PERSEG_ZZZ(sve2p1_zipq_s, helper_sve_zip_s) -DO_PERSEG_ZZZ(sve2p1_zipq_d, helper_sve_zip_d) +DO_PERSEG_ZZZ(sve2p1_zipq_b, HELPER(sve_zip_b)) +DO_PERSEG_ZZZ(sve2p1_zipq_h, HELPER(sve_zip_h)) +DO_PERSEG_ZZZ(sve2p1_zipq_s, HELPER(sve_zip_s)) +DO_PERSEG_ZZZ(sve2p1_zipq_d, HELPER(sve_zip_d)) =20 -DO_PERSEG_ZZZ(sve2p1_tblq_b, helper_sve_tbl_b) -DO_PERSEG_ZZZ(sve2p1_tblq_h, helper_sve_tbl_h) -DO_PERSEG_ZZZ(sve2p1_tblq_s, helper_sve_tbl_s) -DO_PERSEG_ZZZ(sve2p1_tblq_d, helper_sve_tbl_d) +DO_PERSEG_ZZZ(sve2p1_tblq_b, HELPER(sve_tbl_b)) +DO_PERSEG_ZZZ(sve2p1_tblq_h, HELPER(sve_tbl_h)) +DO_PERSEG_ZZZ(sve2p1_tblq_s, HELPER(sve_tbl_s)) +DO_PERSEG_ZZZ(sve2p1_tblq_d, HELPER(sve_tbl_d)) =20 -DO_PERSEG_ZZZ(sve2p1_tbxq_b, helper_sve2_tbx_b) -DO_PERSEG_ZZZ(sve2p1_tbxq_h, helper_sve2_tbx_h) -DO_PERSEG_ZZZ(sve2p1_tbxq_s, helper_sve2_tbx_s) -DO_PERSEG_ZZZ(sve2p1_tbxq_d, helper_sve2_tbx_d) +DO_PERSEG_ZZZ(sve2p1_tbxq_b, HELPER(sve2_tbx_b)) +DO_PERSEG_ZZZ(sve2p1_tbxq_h, HELPER(sve2_tbx_h)) +DO_PERSEG_ZZZ(sve2p1_tbxq_s, HELPER(sve2_tbx_s)) +DO_PERSEG_ZZZ(sve2p1_tbxq_d, HELPER(sve2_tbx_d)) =20 #undef DO_PERSEG_ZZZ =20 @@ -4575,18 +4575,19 @@ uint32_t HELPER(sve_whilecg)(void *vd, uint32_t cou= nt, uint32_t pred_desc) * little to gain with a more complex non-recursive form. */ #define DO_REDUCE(NAME, SUF, TYPE, H, FUNC, IDENT) \ -static TYPE FUNC##_reduce(TYPE *data, float_status *status, uintptr_t n) \ +static TYPE NAME##_##SUF##_reduce(TYPE *data, float_status *status, \ + uintptr_t n) \ { \ if (n =3D=3D 1) { \ return *data; \ } else { \ uintptr_t half =3D n / 2; \ - TYPE lo =3D FUNC##_reduce(data, status, half); \ - TYPE hi =3D FUNC##_reduce(data + half, status, half); \ + TYPE lo =3D NAME##_##SUF##_reduce(data, status, half); \ + TYPE hi =3D NAME##_##SUF##_reduce(data + half, status, half); \ return FUNC(lo, hi, status); \ } \ } \ -uint64_t helper_sve_##NAME##v_##SUF(void *vn, void *vg, \ +uint64_t HELPER(sve_##NAME##v_##SUF)(void *vn, void *vg, \ float_status *status, uint32_t desc) \ { \ uintptr_t i, oprsz =3D simd_oprsz(desc), maxsz =3D simd_data(desc); \ @@ -4603,9 +4604,9 @@ uint64_t helper_sve_##NAME##v_##SUF(void *vn, void *v= g, \ for (; i < maxsz; i +=3D sizeof(TYPE)) { \ *(TYPE *)((void *)data + i) =3D ident; \ } \ - return FUNC##_reduce(data, status, maxsz / sizeof(TYPE)); \ + return NAME##_##SUF##_reduce(data, status, maxsz / sizeof(TYPE)); \ } \ -void helper_sve2p1_##NAME##qv_##SUF(void *vd, void *vn, void *vg, \ +void HELPER(sve2p1_##NAME##qv_##SUF)(void *vd, void *vn, void *vg, \ float_status *status, uint32_t desc) \ { \ unsigned oprsz =3D simd_oprsz(desc), segments =3D oprsz / 16; \ @@ -4617,7 +4618,7 @@ void helper_sve2p1_##NAME##qv_##SUF(void *vd, void *v= n, void *vg, \ TYPE nn =3D *(TYPE *)(vn + (s * 16 + H(e))); \ data[s] =3D (pg >> e) & 1 ? nn : ident; \ } \ - *(TYPE *)(vd + H(e)) =3D FUNC##_reduce(data, status, segments); \ + *(TYPE *)(vd + H(e)) =3D NAME##_##SUF##_reduce(data, status, segme= nts); \ } \ clear_tail(vd, 16, simd_maxsz(desc)); \ } @@ -4646,15 +4647,15 @@ DO_REDUCE(fmax,h, float16, H1_2, float16_max, float= 16_chs(float16_infinity)) DO_REDUCE(fmax,s, float32, H1_4, float32_max, float32_chs(float32_infinity= )) DO_REDUCE(fmax,d, float64, H1_8, float64_max, float64_chs(float64_infinity= )) =20 -DO_REDUCE(ah_fmin,h, float16, H1_2, helper_vfp_ah_minh, float16_infinity) -DO_REDUCE(ah_fmin,s, float32, H1_4, helper_vfp_ah_mins, float32_infinity) -DO_REDUCE(ah_fmin,d, float64, H1_8, helper_vfp_ah_mind, float64_infinity) +DO_REDUCE(ah_fmin, h, float16, H1_2, HELPER(vfp_ah_minh), float16_infinity) +DO_REDUCE(ah_fmin, s, float32, H1_4, HELPER(vfp_ah_mins), float32_infinity) +DO_REDUCE(ah_fmin, d, float64, H1_8, HELPER(vfp_ah_mind), float64_infinity) =20 -DO_REDUCE(ah_fmax,h, float16, H1_2, helper_vfp_ah_maxh, +DO_REDUCE(ah_fmax, h, float16, H1_2, HELPER(vfp_ah_maxh), float16_chs(float16_infinity)) -DO_REDUCE(ah_fmax,s, float32, H1_4, helper_vfp_ah_maxs, +DO_REDUCE(ah_fmax, s, float32, H1_4, HELPER(vfp_ah_maxs), float32_chs(float32_infinity)) -DO_REDUCE(ah_fmax,d, float64, H1_8, helper_vfp_ah_maxd, +DO_REDUCE(ah_fmax, d, float64, H1_8, HELPER(vfp_ah_maxd), float64_chs(float64_infinity)) =20 #undef DO_REDUCE @@ -4766,15 +4767,15 @@ DO_ZPZZ_FP(sve_fmax_h, uint16_t, H1_2, float16_max) DO_ZPZZ_FP(sve_fmax_s, uint32_t, H1_4, float32_max) DO_ZPZZ_FP(sve_fmax_d, uint64_t, H1_8, float64_max) =20 -DO_ZPZZ_FP(sve_ah_fmin_b16, uint16_t, H1_2, helper_sme2_ah_fmin_b16) -DO_ZPZZ_FP(sve_ah_fmin_h, uint16_t, H1_2, helper_vfp_ah_minh) -DO_ZPZZ_FP(sve_ah_fmin_s, uint32_t, H1_4, helper_vfp_ah_mins) -DO_ZPZZ_FP(sve_ah_fmin_d, uint64_t, H1_8, helper_vfp_ah_mind) +DO_ZPZZ_FP(sve_ah_fmin_b16, uint16_t, H1_2, HELPER(sme2_ah_fmin_b16)) +DO_ZPZZ_FP(sve_ah_fmin_h, uint16_t, H1_2, HELPER(vfp_ah_minh)) +DO_ZPZZ_FP(sve_ah_fmin_s, uint32_t, H1_4, HELPER(vfp_ah_mins)) +DO_ZPZZ_FP(sve_ah_fmin_d, uint64_t, H1_8, HELPER(vfp_ah_mind)) =20 -DO_ZPZZ_FP(sve_ah_fmax_b16, uint16_t, H1_2, helper_sme2_ah_fmax_b16) -DO_ZPZZ_FP(sve_ah_fmax_h, uint16_t, H1_2, helper_vfp_ah_maxh) -DO_ZPZZ_FP(sve_ah_fmax_s, uint32_t, H1_4, helper_vfp_ah_maxs) -DO_ZPZZ_FP(sve_ah_fmax_d, uint64_t, H1_8, helper_vfp_ah_maxd) +DO_ZPZZ_FP(sve_ah_fmax_b16, uint16_t, H1_2, HELPER(sme2_ah_fmax_b16)) +DO_ZPZZ_FP(sve_ah_fmax_h, uint16_t, H1_2, HELPER(vfp_ah_maxh)) +DO_ZPZZ_FP(sve_ah_fmax_s, uint32_t, H1_4, HELPER(vfp_ah_maxs)) +DO_ZPZZ_FP(sve_ah_fmax_d, uint64_t, H1_8, HELPER(vfp_ah_maxd)) =20 DO_ZPZZ_FP(sve_fminnum_b16, uint16_t, H1_2, bfloat16_minnum) DO_ZPZZ_FP(sve_fminnum_h, uint16_t, H1_2, float16_minnum) @@ -4832,9 +4833,9 @@ DO_ZPZZ_FP(sve_fscalbn_h, int16_t, H1_2, float16_scal= bn) DO_ZPZZ_FP(sve_fscalbn_s, int32_t, H1_4, float32_scalbn) DO_ZPZZ_FP(sve_fscalbn_d, int64_t, H1_8, scalbn_d) =20 -DO_ZPZZ_FP(sve_fmulx_h, uint16_t, H1_2, helper_advsimd_mulxh) -DO_ZPZZ_FP(sve_fmulx_s, uint32_t, H1_4, helper_vfp_mulxs) -DO_ZPZZ_FP(sve_fmulx_d, uint64_t, H1_8, helper_vfp_mulxd) +DO_ZPZZ_FP(sve_fmulx_h, uint16_t, H1_2, HELPER(advsimd_mulxh)) +DO_ZPZZ_FP(sve_fmulx_s, uint32_t, H1_4, HELPER(vfp_mulxs)) +DO_ZPZZ_FP(sve_fmulx_d, uint64_t, H1_8, HELPER(vfp_mulxd)) =20 DO_ZPZZ_FP(sve2_famax_h, uint16_t, H1_2, float16_famax) DO_ZPZZ_FP(sve2_famax_s, uint32_t, H1_4, float32_famax) @@ -4915,13 +4916,13 @@ DO_ZPZS_FP(sve_fmins_h, float16, H1_2, float16_min) DO_ZPZS_FP(sve_fmins_s, float32, H1_4, float32_min) DO_ZPZS_FP(sve_fmins_d, float64, H1_8, float64_min) =20 -DO_ZPZS_FP(sve_ah_fmaxs_h, float16, H1_2, helper_vfp_ah_maxh) -DO_ZPZS_FP(sve_ah_fmaxs_s, float32, H1_4, helper_vfp_ah_maxs) -DO_ZPZS_FP(sve_ah_fmaxs_d, float64, H1_8, helper_vfp_ah_maxd) +DO_ZPZS_FP(sve_ah_fmaxs_h, float16, H1_2, HELPER(vfp_ah_maxh)) +DO_ZPZS_FP(sve_ah_fmaxs_s, float32, H1_4, HELPER(vfp_ah_maxs)) +DO_ZPZS_FP(sve_ah_fmaxs_d, float64, H1_8, HELPER(vfp_ah_maxd)) =20 -DO_ZPZS_FP(sve_ah_fmins_h, float16, H1_2, helper_vfp_ah_minh) -DO_ZPZS_FP(sve_ah_fmins_s, float32, H1_4, helper_vfp_ah_mins) -DO_ZPZS_FP(sve_ah_fmins_d, float64, H1_8, helper_vfp_ah_mind) +DO_ZPZS_FP(sve_ah_fmins_h, float16, H1_2, HELPER(vfp_ah_minh)) +DO_ZPZS_FP(sve_ah_fmins_s, float32, H1_4, HELPER(vfp_ah_mins)) +DO_ZPZS_FP(sve_ah_fmins_d, float64, H1_8, HELPER(vfp_ah_mind)) =20 /* * Fully general two-operand expander, controlled by a predicate, @@ -5077,37 +5078,37 @@ DO_ZPZ_FP(sve_fcvt_ds, uint64_t, H1_8, float64_to_f= loat32) DO_ZPZ_FP(sve_fcvt_sd, uint64_t, H1_8, float32_to_float64) =20 DO_ZPZ_FP(sve_fcvtzs_hh, uint16_t, H1_2, vfp_float16_to_int16_rtz) -DO_ZPZ_FP(sve_fcvtzs_hs, uint32_t, H1_4, helper_vfp_tosizh) -DO_ZPZ_FP(sve_fcvtzs_ss, uint32_t, H1_4, helper_vfp_tosizs) +DO_ZPZ_FP(sve_fcvtzs_hs, uint32_t, H1_4, HELPER(vfp_tosizh)) +DO_ZPZ_FP(sve_fcvtzs_ss, uint32_t, H1_4, HELPER(vfp_tosizs)) DO_ZPZ_FP(sve_fcvtzs_hd, uint64_t, H1_8, vfp_float16_to_int64_rtz) DO_ZPZ_FP(sve_fcvtzs_sd, uint64_t, H1_8, vfp_float32_to_int64_rtz) -DO_ZPZ_FP(sve_fcvtzs_ds, uint64_t, H1_8, helper_vfp_tosizd) +DO_ZPZ_FP(sve_fcvtzs_ds, uint64_t, H1_8, HELPER(vfp_tosizd)) DO_ZPZ_FP(sve_fcvtzs_dd, uint64_t, H1_8, vfp_float64_to_int64_rtz) =20 DO_ZPZ_FP(sve_fcvtzu_hh, uint16_t, H1_2, vfp_float16_to_uint16_rtz) -DO_ZPZ_FP(sve_fcvtzu_hs, uint32_t, H1_4, helper_vfp_touizh) -DO_ZPZ_FP(sve_fcvtzu_ss, uint32_t, H1_4, helper_vfp_touizs) +DO_ZPZ_FP(sve_fcvtzu_hs, uint32_t, H1_4, HELPER(vfp_touizh)) +DO_ZPZ_FP(sve_fcvtzu_ss, uint32_t, H1_4, HELPER(vfp_touizs)) DO_ZPZ_FP(sve_fcvtzu_hd, uint64_t, H1_8, vfp_float16_to_uint64_rtz) DO_ZPZ_FP(sve_fcvtzu_sd, uint64_t, H1_8, vfp_float32_to_uint64_rtz) -DO_ZPZ_FP(sve_fcvtzu_ds, uint64_t, H1_8, helper_vfp_touizd) +DO_ZPZ_FP(sve_fcvtzu_ds, uint64_t, H1_8, HELPER(vfp_touizd)) DO_ZPZ_FP(sve_fcvtzu_dd, uint64_t, H1_8, vfp_float64_to_uint64_rtz) =20 -DO_ZPZ_FP(sve_frint_h, uint16_t, H1_2, helper_advsimd_rinth) -DO_ZPZ_FP(sve_frint_s, uint32_t, H1_4, helper_rints) -DO_ZPZ_FP(sve_frint_d, uint64_t, H1_8, helper_rintd) +DO_ZPZ_FP(sve_frint_h, uint16_t, H1_2, HELPER(advsimd_rinth)) +DO_ZPZ_FP(sve_frint_s, uint32_t, H1_4, HELPER(rints)) +DO_ZPZ_FP(sve_frint_d, uint64_t, H1_8, HELPER(rintd)) =20 DO_ZPZ_FP(sve_frintx_h, uint16_t, H1_2, float16_round_to_int) DO_ZPZ_FP(sve_frintx_s, uint32_t, H1_4, float32_round_to_int) DO_ZPZ_FP(sve_frintx_d, uint64_t, H1_8, float64_round_to_int) =20 -DO_ZPZ_FP(sve2p2_frint32_s, uint32_t, H1_4, helper_frint32_s) -DO_ZPZ_FP(sve2p2_frint64_s, uint32_t, H1_4, helper_frint64_s) -DO_ZPZ_FP(sve2p2_frint32_d, uint64_t, H1_8, helper_frint32_d) -DO_ZPZ_FP(sve2p2_frint64_d, uint64_t, H1_8, helper_frint64_d) +DO_ZPZ_FP(sve2p2_frint32_s, uint32_t, H1_4, HELPER(frint32_s)) +DO_ZPZ_FP(sve2p2_frint64_s, uint32_t, H1_4, HELPER(frint64_s)) +DO_ZPZ_FP(sve2p2_frint32_d, uint64_t, H1_8, HELPER(frint32_d)) +DO_ZPZ_FP(sve2p2_frint64_d, uint64_t, H1_8, HELPER(frint64_d)) =20 -DO_ZPZ_FP(sve_frecpx_h, uint16_t, H1_2, helper_frecpx_f16) -DO_ZPZ_FP(sve_frecpx_s, uint32_t, H1_4, helper_frecpx_f32) -DO_ZPZ_FP(sve_frecpx_d, uint64_t, H1_8, helper_frecpx_f64) +DO_ZPZ_FP(sve_frecpx_h, uint16_t, H1_2, HELPER(frecpx_f16)) +DO_ZPZ_FP(sve_frecpx_s, uint32_t, H1_4, HELPER(frecpx_f32)) +DO_ZPZ_FP(sve_frecpx_d, uint64_t, H1_8, HELPER(frecpx_f64)) =20 DO_ZPZ_FP(sve_fsqrt_h, uint16_t, H1_2, float16_sqrt) DO_ZPZ_FP(sve_fsqrt_s, uint32_t, H1_4, float32_sqrt) diff --git a/target/arm/tcg/tlb_helper.c b/target/arm/tcg/tlb_helper.c index 4c3f16dc2aa..4a1611f23f5 100644 --- a/target/arm/tcg/tlb_helper.c +++ b/target/arm/tcg/tlb_helper.c @@ -289,7 +289,7 @@ void arm_cpu_do_unaligned_access(CPUState *cs, vaddr va= ddr, arm_deliver_fault(cpu, vaddr, access_type, mmu_idx, &fi); } =20 -void helper_exception_pc_alignment(CPUARMState *env, vaddr pc) +void HELPER(exception_pc_alignment)(CPUARMState *env, vaddr pc) { ARMMMUFaultInfo fi =3D { .type =3D ARMFault_Alignment }; int target_el =3D exception_target_el(env); diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index 3c06e93e02d..8dd840e8291 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -1286,23 +1286,23 @@ void HELPER(NAME)(void *vd, void *vn, float_status = *stat, uint32_t desc) \ clear_tail(d, oprsz, simd_maxsz(desc)); \ } =20 -DO_2OP(gvec_frecpe_h, helper_recpe_f16, float16) -DO_2OP(gvec_frecpe_s, helper_recpe_f32, float32) -DO_2OP(gvec_frecpe_rpres_s, helper_recpe_rpres_f32, float32) -DO_2OP(gvec_frecpe_d, helper_recpe_f64, float64) +DO_2OP(gvec_frecpe_h, HELPER(recpe_f16), float16) +DO_2OP(gvec_frecpe_s, HELPER(recpe_f32), float32) +DO_2OP(gvec_frecpe_rpres_s, HELPER(recpe_rpres_f32), float32) +DO_2OP(gvec_frecpe_d, HELPER(recpe_f64), float64) =20 -DO_2OP(gvec_frsqrte_h, helper_rsqrte_f16, float16) -DO_2OP(gvec_frsqrte_s, helper_rsqrte_f32, float32) -DO_2OP(gvec_frsqrte_rpres_s, helper_rsqrte_rpres_f32, float32) -DO_2OP(gvec_frsqrte_d, helper_rsqrte_f64, float64) +DO_2OP(gvec_frsqrte_h, HELPER(rsqrte_f16), float16) +DO_2OP(gvec_frsqrte_s, HELPER(rsqrte_f32), float32) +DO_2OP(gvec_frsqrte_rpres_s, HELPER(rsqrte_rpres_f32), float32) +DO_2OP(gvec_frsqrte_d, HELPER(rsqrte_f64), float64) =20 DO_2OP(gvec_vrintx_h, float16_round_to_int, float16) DO_2OP(gvec_vrintx_s, float32_round_to_int, float32) =20 -DO_2OP(gvec_sitos, helper_vfp_sitos, int32_t) -DO_2OP(gvec_uitos, helper_vfp_uitos, uint32_t) -DO_2OP(gvec_tosizs, helper_vfp_tosizs, float32) -DO_2OP(gvec_touizs, helper_vfp_touizs, float32) +DO_2OP(gvec_sitos, HELPER(vfp_sitos), int32_t) +DO_2OP(gvec_uitos, HELPER(vfp_uitos), uint32_t) +DO_2OP(gvec_tosizs, HELPER(vfp_tosizs), float32) +DO_2OP(gvec_touizs, HELPER(vfp_touizs), float32) DO_2OP(gvec_sstoh, int16_to_float16, int16_t) DO_2OP(gvec_ustoh, uint16_to_float16, uint16_t) DO_2OP(gvec_tosszh, vfp_tosszh, float16) @@ -2596,19 +2596,19 @@ DO_3OP_PAIR_NO_STATUS(gvec_uminp_s, MIN, uint32_t, = H4) clear_tail(d, oprsz, simd_maxsz(desc)); \ } =20 -DO_VCVT_FIXED(gvec_vcvt_sd, helper_vfp_sqtod, uint64_t) -DO_VCVT_FIXED(gvec_vcvt_ud, helper_vfp_uqtod, uint64_t) -DO_VCVT_FIXED(gvec_vcvt_sf, helper_vfp_sltos, uint32_t) -DO_VCVT_FIXED(gvec_vcvt_uf, helper_vfp_ultos, uint32_t) -DO_VCVT_FIXED(gvec_vcvt_sh, helper_vfp_shtoh, uint16_t) -DO_VCVT_FIXED(gvec_vcvt_uh, helper_vfp_uhtoh, uint16_t) +DO_VCVT_FIXED(gvec_vcvt_sd, HELPER(vfp_sqtod), uint64_t) +DO_VCVT_FIXED(gvec_vcvt_ud, HELPER(vfp_uqtod), uint64_t) +DO_VCVT_FIXED(gvec_vcvt_sf, HELPER(vfp_sltos), uint32_t) +DO_VCVT_FIXED(gvec_vcvt_uf, HELPER(vfp_ultos), uint32_t) +DO_VCVT_FIXED(gvec_vcvt_sh, HELPER(vfp_shtoh), uint16_t) +DO_VCVT_FIXED(gvec_vcvt_uh, HELPER(vfp_uhtoh), uint16_t) =20 -DO_VCVT_FIXED(gvec_vcvt_rz_ds, helper_vfp_tosqd_round_to_zero, uint64_t) -DO_VCVT_FIXED(gvec_vcvt_rz_du, helper_vfp_touqd_round_to_zero, uint64_t) -DO_VCVT_FIXED(gvec_vcvt_rz_fs, helper_vfp_tosls_round_to_zero, uint32_t) -DO_VCVT_FIXED(gvec_vcvt_rz_fu, helper_vfp_touls_round_to_zero, uint32_t) -DO_VCVT_FIXED(gvec_vcvt_rz_hs, helper_vfp_toshh_round_to_zero, uint16_t) -DO_VCVT_FIXED(gvec_vcvt_rz_hu, helper_vfp_touhh_round_to_zero, uint16_t) +DO_VCVT_FIXED(gvec_vcvt_rz_ds, HELPER(vfp_tosqd_round_to_zero), uint64_t) +DO_VCVT_FIXED(gvec_vcvt_rz_du, HELPER(vfp_touqd_round_to_zero), uint64_t) +DO_VCVT_FIXED(gvec_vcvt_rz_fs, HELPER(vfp_tosls_round_to_zero), uint32_t) +DO_VCVT_FIXED(gvec_vcvt_rz_fu, HELPER(vfp_touls_round_to_zero), uint32_t) +DO_VCVT_FIXED(gvec_vcvt_rz_hs, HELPER(vfp_toshh_round_to_zero), uint16_t) +DO_VCVT_FIXED(gvec_vcvt_rz_hu, HELPER(vfp_touhh_round_to_zero), uint16_t) =20 #undef DO_VCVT_FIXED =20 @@ -2627,12 +2627,12 @@ DO_VCVT_FIXED(gvec_vcvt_rz_hu, helper_vfp_touhh_rou= nd_to_zero, uint16_t) clear_tail(d, oprsz, simd_maxsz(desc)); \ } =20 -DO_VCVT_RMODE(gvec_vcvt_rm_sd, helper_vfp_tosqd, uint64_t) -DO_VCVT_RMODE(gvec_vcvt_rm_ud, helper_vfp_touqd, uint64_t) -DO_VCVT_RMODE(gvec_vcvt_rm_ss, helper_vfp_tosls, uint32_t) -DO_VCVT_RMODE(gvec_vcvt_rm_us, helper_vfp_touls, uint32_t) -DO_VCVT_RMODE(gvec_vcvt_rm_sh, helper_vfp_toshh, uint16_t) -DO_VCVT_RMODE(gvec_vcvt_rm_uh, helper_vfp_touhh, uint16_t) +DO_VCVT_RMODE(gvec_vcvt_rm_sd, HELPER(vfp_tosqd), uint64_t) +DO_VCVT_RMODE(gvec_vcvt_rm_ud, HELPER(vfp_touqd), uint64_t) +DO_VCVT_RMODE(gvec_vcvt_rm_ss, HELPER(vfp_tosls), uint32_t) +DO_VCVT_RMODE(gvec_vcvt_rm_us, HELPER(vfp_touls), uint32_t) +DO_VCVT_RMODE(gvec_vcvt_rm_sh, HELPER(vfp_toshh), uint16_t) +DO_VCVT_RMODE(gvec_vcvt_rm_uh, HELPER(vfp_touhh), uint16_t) =20 #undef DO_VCVT_RMODE =20 @@ -2651,8 +2651,8 @@ DO_VCVT_RMODE(gvec_vcvt_rm_uh, helper_vfp_touhh, uint= 16_t) clear_tail(d, oprsz, simd_maxsz(desc)); \ } =20 -DO_VRINT_RMODE(gvec_vrint_rm_h, helper_rinth, uint16_t) -DO_VRINT_RMODE(gvec_vrint_rm_s, helper_rints, uint32_t) +DO_VRINT_RMODE(gvec_vrint_rm_h, HELPER(rinth), uint16_t) +DO_VRINT_RMODE(gvec_vrint_rm_s, HELPER(rints), uint32_t) =20 #undef DO_VRINT_RMODE =20 @@ -3242,7 +3242,7 @@ void HELPER(gvec_urecpe_s)(void *vd, void *vn, uint32= _t desc) uint32_t *d =3D vd, *n =3D vn; =20 for (i =3D 0; i < opr_sz / 4; ++i) { - d[i] =3D helper_recpe_u32(n[i]); + d[i] =3D HELPER(recpe_u32)(n[i]); } clear_tail(d, opr_sz, simd_maxsz(desc)); } @@ -3253,7 +3253,7 @@ void HELPER(gvec_ursqrte_s)(void *vd, void *vn, uint3= 2_t desc) uint32_t *d =3D vd, *n =3D vn; =20 for (i =3D 0; i < opr_sz / 4; ++i) { - d[i] =3D helper_rsqrte_u32(n[i]); + d[i] =3D HELPER(rsqrte_u32)(n[i]); } clear_tail(d, opr_sz, simd_maxsz(desc)); } @@ -3307,7 +3307,7 @@ static inline void do_lut_s(void *zd, uint64_t *index= es, uint32_t *table, } =20 #define DO_SME2_LUT(ISIZE, NREG, SUFF, ESIZE) \ -void helper_sme2_luti##ISIZE##_##NREG##SUFF \ +void HELPER(sme2_luti##ISIZE##_##NREG##SUFF) \ (void *zd, void *zn, CPUARMState *env, uint32_t desc) \ { \ unsigned vl =3D simd_oprsz(desc); \ @@ -3345,7 +3345,7 @@ DO_SME2_LUT(4,4,s, 4) =20 #undef DO_SME2_LUT =20 -void helper_sme2_luti4_4b(void *zd, void *zn, CPUARMState *env, uint32_t d= esc) +void HELPER(sme2_luti4_4b)(void *zd, void *zn, CPUARMState *env, uint32_t = desc) { unsigned vl =3D simd_oprsz(desc); unsigned strided =3D extract32(desc, SIMD_DATA_SHIFT, 1); diff --git a/target/arm/tcg/vec_helper64.c b/target/arm/tcg/vec_helper64.c index 4f43869d9e9..53723fa40b9 100644 --- a/target/arm/tcg/vec_helper64.c +++ b/target/arm/tcg/vec_helper64.c @@ -23,46 +23,46 @@ DO_3OP(gvec_fdiv_h, float16_div, float16) DO_3OP(gvec_fdiv_s, float32_div, float32) DO_3OP(gvec_fdiv_d, float64_div, float64) =20 -DO_3OP(gvec_fmulx_h, helper_advsimd_mulxh, float16) -DO_3OP(gvec_fmulx_s, helper_vfp_mulxs, float32) -DO_3OP(gvec_fmulx_d, helper_vfp_mulxd, float64) +DO_3OP(gvec_fmulx_h, HELPER(advsimd_mulxh), float16) +DO_3OP(gvec_fmulx_s, HELPER(vfp_mulxs), float32) +DO_3OP(gvec_fmulx_d, HELPER(vfp_mulxd), float64) =20 -DO_3OP(gvec_recps_h, helper_recpsf_f16, float16) -DO_3OP(gvec_recps_s, helper_recpsf_f32, float32) -DO_3OP(gvec_recps_d, helper_recpsf_f64, float64) +DO_3OP(gvec_recps_h, HELPER(recpsf_f16), float16) +DO_3OP(gvec_recps_s, HELPER(recpsf_f32), float32) +DO_3OP(gvec_recps_d, HELPER(recpsf_f64), float64) =20 -DO_3OP(gvec_rsqrts_h, helper_rsqrtsf_f16, float16) -DO_3OP(gvec_rsqrts_s, helper_rsqrtsf_f32, float32) -DO_3OP(gvec_rsqrts_d, helper_rsqrtsf_f64, float64) +DO_3OP(gvec_rsqrts_h, HELPER(rsqrtsf_f16), float16) +DO_3OP(gvec_rsqrts_s, HELPER(rsqrtsf_f32), float32) +DO_3OP(gvec_rsqrts_d, HELPER(rsqrtsf_f64), float64) =20 -DO_3OP(gvec_ah_recps_h, helper_recpsf_ah_f16, float16) -DO_3OP(gvec_ah_recps_s, helper_recpsf_ah_f32, float32) -DO_3OP(gvec_ah_recps_d, helper_recpsf_ah_f64, float64) +DO_3OP(gvec_ah_recps_h, HELPER(recpsf_ah_f16), float16) +DO_3OP(gvec_ah_recps_s, HELPER(recpsf_ah_f32), float32) +DO_3OP(gvec_ah_recps_d, HELPER(recpsf_ah_f64), float64) =20 -DO_3OP(gvec_ah_rsqrts_h, helper_rsqrtsf_ah_f16, float16) -DO_3OP(gvec_ah_rsqrts_s, helper_rsqrtsf_ah_f32, float32) -DO_3OP(gvec_ah_rsqrts_d, helper_rsqrtsf_ah_f64, float64) +DO_3OP(gvec_ah_rsqrts_h, HELPER(rsqrtsf_ah_f16), float16) +DO_3OP(gvec_ah_rsqrts_s, HELPER(rsqrtsf_ah_f32), float32) +DO_3OP(gvec_ah_rsqrts_d, HELPER(rsqrtsf_ah_f64), float64) =20 -DO_3OP(gvec_ah_fmax_h, helper_vfp_ah_maxh, float16) -DO_3OP(gvec_ah_fmax_s, helper_vfp_ah_maxs, float32) -DO_3OP(gvec_ah_fmax_d, helper_vfp_ah_maxd, float64) +DO_3OP(gvec_ah_fmax_h, HELPER(vfp_ah_maxh), float16) +DO_3OP(gvec_ah_fmax_s, HELPER(vfp_ah_maxs), float32) +DO_3OP(gvec_ah_fmax_d, HELPER(vfp_ah_maxd), float64) =20 -DO_3OP(gvec_ah_fmin_h, helper_vfp_ah_minh, float16) -DO_3OP(gvec_ah_fmin_s, helper_vfp_ah_mins, float32) -DO_3OP(gvec_ah_fmin_d, helper_vfp_ah_mind, float64) +DO_3OP(gvec_ah_fmin_h, HELPER(vfp_ah_minh), float16) +DO_3OP(gvec_ah_fmin_s, HELPER(vfp_ah_mins), float32) +DO_3OP(gvec_ah_fmin_d, HELPER(vfp_ah_mind), float64) =20 DO_3OP(gvec_fmax_b16, bfloat16_max, bfloat16) DO_3OP(gvec_fmin_b16, bfloat16_min, bfloat16) DO_3OP(gvec_fmaxnum_b16, bfloat16_maxnum, bfloat16) DO_3OP(gvec_fminnum_b16, bfloat16_minnum, bfloat16) -DO_3OP(gvec_ah_fmax_b16, helper_sme2_ah_fmax_b16, bfloat16) -DO_3OP(gvec_ah_fmin_b16, helper_sme2_ah_fmin_b16, bfloat16) +DO_3OP(gvec_ah_fmax_b16, HELPER(sme2_ah_fmax_b16), bfloat16) +DO_3OP(gvec_ah_fmin_b16, HELPER(sme2_ah_fmin_b16), bfloat16) =20 #define nop(N, M, S) (M) =20 -DO_FMUL_IDX(gvec_fmulx_idx_h, nop, helper_advsimd_mulxh, float16, H2) -DO_FMUL_IDX(gvec_fmulx_idx_s, nop, helper_vfp_mulxs, float32, H4) -DO_FMUL_IDX(gvec_fmulx_idx_d, nop, helper_vfp_mulxd, float64, H8) +DO_FMUL_IDX(gvec_fmulx_idx_h, nop, HELPER(advsimd_mulxh), float16, H2) +DO_FMUL_IDX(gvec_fmulx_idx_s, nop, HELPER(vfp_mulxs), float32, H4) +DO_FMUL_IDX(gvec_fmulx_idx_d, nop, HELPER(vfp_mulxd), float64, H8) =20 #undef nop =20 @@ -123,13 +123,13 @@ void HELPER(sve_pmlal_q)(void *vd, void *vn, void *vm= , uint32_t desc) } } =20 -DO_3OP_PAIR(gvec_ah_fmaxp_h, helper_vfp_ah_maxh, float16, H2) -DO_3OP_PAIR(gvec_ah_fmaxp_s, helper_vfp_ah_maxs, float32, H4) -DO_3OP_PAIR(gvec_ah_fmaxp_d, helper_vfp_ah_maxd, float64, /**/) +DO_3OP_PAIR(gvec_ah_fmaxp_h, HELPER(vfp_ah_maxh), float16, H2) +DO_3OP_PAIR(gvec_ah_fmaxp_s, HELPER(vfp_ah_maxs), float32, H4) +DO_3OP_PAIR(gvec_ah_fmaxp_d, HELPER(vfp_ah_maxd), float64, /**/) =20 -DO_3OP_PAIR(gvec_ah_fminp_h, helper_vfp_ah_minh, float16, H2) -DO_3OP_PAIR(gvec_ah_fminp_s, helper_vfp_ah_mins, float32, H4) -DO_3OP_PAIR(gvec_ah_fminp_d, helper_vfp_ah_mind, float64, /**/) +DO_3OP_PAIR(gvec_ah_fminp_h, HELPER(vfp_ah_minh), float16, H2) +DO_3OP_PAIR(gvec_ah_fminp_s, HELPER(vfp_ah_mins), float32, H4) +DO_3OP_PAIR(gvec_ah_fminp_d, HELPER(vfp_ah_mind), float64, /**/) =20 void HELPER(simd_tblx)(void *vd, void *vm, CPUARMState *env, uint32_t desc) { --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772544; cv=none; d=zohomail.com; s=zohoarc; b=ZTVY+f+PhzP5aFEkJW/UhrEjIZ1i4GUDJ8SieOxyt9S7cXc910m9/zhEv4zG/06KVGSqjRuoPtZxxR4KbR9Q0Z2iTTL2X8vr8tN4gzc/bnbPEgFNxyDWw8r+nRoCxDgdzdOnC2wAfW48OnkPhr7EPnSwks8rW/V3elW7k6tSmFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772544; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Oa7LmP7wYWRmC/5aR+wNtnkHnznaonhU2a6dl5HdFHk=; b=cTlS9Kj+FMf0r/bV44JVWv5HyaL0zxCePufZJdU8uS2X3pPRjNe62ZxIv5VBxd7dgW5S5l0An1aipbKE1d7yo5Ilk66j+25ZQA7r7/IcP8g8wBhdVt5s8Dn1HM1WOkOgERiK0B88SjPYwS3G1mnsqWDQvVqY45AGbgnjz9sj7Ic= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772544339469.4801827931825; Fri, 23 Oct 2026 09:22:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI1B-0001li-Az; Fri, 23 Oct 2026 12:21:21 -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 1xKI0z-0001c6-Ea for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:11 -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 1xKI0w-00030s-UW for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:09 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5s9F4072757 for ; Fri, 23 Oct 2026 16:21:03 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7bw0xju-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:21:03 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93dd3c3badbso266539385a.2 for ; Fri, 23 Oct 2026 09:21:03 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d42f4c6sm711265f8f.59.2026.10.23.09.21.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Oa7LmP7wYWRmC/5aR+wNtnkHnznaonhU2a6dl5HdFHk=; b=ePCHZldGfOCVRge8 O/+JC9Ew6QJlVCNoKaWYt9HOo5oDvgkb+1Z4eR8rHiqOEoEEUklKZuGaN22eexJn bbttr5eM3vXmbtF6uebfLct5Aqq/tfyjEhMiUYTG9GMjf3ftJDDkxthKGauE2H8H 4QFGuYub0lputL/OKyJtCHPbhVeftxSlAP3BBNDNRokEyufLoA3LakhzgAnYxrfW nM3+PPG6snk7w4XMWmXlkDLfoyPIm+XC4w2XuMBD4TacChdX4+zRXB5iK51800g5 YKoQuqr0CuLS6iFUaym4vMHfcl6Zk5MOzJbXtEb2MxOt6T/Yo3l8SPC87LdUJvlm ANUffw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772462; x=1793377262; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Oa7LmP7wYWRmC/5aR+wNtnkHnznaonhU2a6dl5HdFHk=; b=HdL1/E3xyKUvz7nsJVHTJj8CLAuHXKbv7aeRxq0Fvv04kWkxUqZE9iOyZpOYsheNB5 ey9mi4q9N2xHyqldgD/uWyoeGVqRSZaLIbiei1tY4yTmnn0vGVlELCwK5KDW5H5sfKEI MqOQEGuClpbjyamLBndeC0n5OaHskydaOgmTMhziKViqmjDkDxsfBoSc5/gh4KOZOqNv ou72kIGf9oLYUC2OcxKnRwN9YwoFCXK82IbVtkwwaf90EPcgRRrBO3h6JrmkuQba9dR1 ZqYVwcsnruCVnDe55rhRjNiETRh/PPHw5s3qOo9d6h5AKdUku/VNOzLVdwn46kvNzH7L dvBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772462; x=1793377262; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Oa7LmP7wYWRmC/5aR+wNtnkHnznaonhU2a6dl5HdFHk=; b=u8/IJnYEJ6GqZvES3esN4/5rY2xKC7siSLAY9eSFa4uIly2O8tVHBFJRrYaExpqq3X OO6mzNLjNxcbYR6UTp4yrLbF+JDqXCDdpjnLg7Q3/HiJTwn90wfm//aqQnlqRb516A84 pY/Hh5iUpxW6VqtjL9dOvZsiPLfzhXqa3z6EdAjdH3DRmapqzAr4PjlSyNGglCMAj5G2 iQvRs0PwHiYqQgw5qdswCfeqx38UhAcl7MaE+Zp9brv2X8I7vm4ffLyP9WHfBwlzs0uj UL75ohzZBKPLM7DRImRl7S44xT9mfh5OVruyRhrWqpRxuitHMsvRYNSiDSy8p9HkUrtE 3WCw== X-Gm-Message-State: AFq9FYLJ9DB5V6xVGl4MtGBjc+LaP6GTvwsIEvZ/eC76Gt+c+FZGd+SO oUiareBlYVj7LLnslHeEcnAI5nSUNU8Xf024nGcW+CbBGpM/sPlzDCW4+OPeoAZYWlKPkiWwm32 nGqmdDKL525KsYyySl5jEjIt/5DEpaMPZ0RJXXHOcuI3X879Qd/dRFxEJb03ErEjRiBh0 X-Gm-Gg: AYBFou1UGMutS1Fdfho6oCEq4nvZGxomNC7EdZI51p++BqrEElVhu9DzHwbpgjDp0yT /ao8Pj3jClKqwky97eij7GfNM1kDPhwp1asOQr9iZPwiQusxpDH36t4AjpIhut9gbccG1hJciWr WIjrDzhsI3J8zEyJHdKO4LwwBJq6teOruuTLEKgNcv9VCRJVyaB8aJnPE7J3l2/zhzs1UHQB0Rh alF5iStH9PjTA4sgEN4n+aWNvD1RyUf9DmXwN6sXWPMgVkagjvb0Gr6W4cKbLawb5fp6i5l4vml WC//VWogqhiN5Mt5/rGqaf6k9qmHQRdaHqCYDdxmgxiPcQkEHBIYBJG80hRDYtBKNzdTNYR6WF4 eD5e4CG3gNYZUvYi/OOpQ/Fo3R2p1IiJOyVTf0SUa X-Received: by 2002:a05:620a:601b:b0:93b:d7a2:83d1 with SMTP id af79cd13be357-93f6f842370mr517060985a.64.1792772462282; Fri, 23 Oct 2026 09:21:02 -0700 (PDT) X-Received: by 2002:a05:620a:601b:b0:93b:d7a2:83d1 with SMTP id af79cd13be357-93f6f842370mr517057285a.64.1792772461814; Fri, 23 Oct 2026 09:21:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 62/83] target/avr: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:10 +0200 Message-ID: <20261023161332.60153-63-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: 9wbqURs8b-hGX7eDEqjrEjuxmWCS-N52 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX0T0FhaO4XjXz g7uBL7QgxUiBNF5han8mtdIu1TxfwW1R9FozTaVBqKzSe8JPPEuWSl8fFkPgi/o5hwtwrhKrdzl 4WZlojuP+fN5z2sEvc+g7zFZz+HYoNg= X-Authority-Analysis: v=2.4 cv=QdTzLcbv c=1 sm=1 tr=0 ts=6adb896f cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=ya3Pk_hNRNhBRN_1oewA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-GUID: 9wbqURs8b-hGX7eDEqjrEjuxmWCS-N52 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX1dqE1yy01I0+ pQMoFMJGeFvbdcm/96n+gNf7ppay75jq5rHrA+c08vqioBvJHiiK3BgUHBLJhttc+Vckeee0koI GxOnKm4fwbWn7GHsWyz5jIg0Eifu2jeinHh/ZQhrQ8Rhcr/wg2XXEEpJQrc6q5HGrY9tVnuMw8k uuUMV7s8MGeEFTtkHHaZV8l1hZiwWwzi/yku2ZkbJk3pY+2fmoNmLPpkI+KEMDuhaHagWqnxUxL rCqf6YTFoGGrOlWWAfJiWyB+ZOXE2jPTX2Fk1wX4w71V7ZShRDhWHbHmiAJVkxOU3bvc1ygyFj+ 9Y+ExmznDN3q8GFwH9m3hPVZ4ZsMT5b9xjYwC5yS/6DJ+F2jR39Jf7fkgVb5wjssDdhvgNsYMcy rw06/Hzft3Td1R+V7zwogghQaGB1aMCY6LD7Q0W0wUNT4hV5zApSrAYjKrDvZC3Xzr9qvNtRGaP rx/G3Vgvsjlkxrwpp7w== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772545015158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-4-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/avr/helper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/avr/helper.c b/target/avr/helper.c index 8f90b8d9a45..49bd2f57c9f 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -159,7 +159,7 @@ bool avr_cpu_tlb_fill(CPUState *cs, vaddr address, int = size, * helpers */ =20 -void helper_sleep(CPUAVRState *env) +void HELPER(sleep)(CPUAVRState *env) { CPUState *cs =3D env_cpu(env); =20 @@ -167,7 +167,7 @@ void helper_sleep(CPUAVRState *env) cpu_loop_exit(cs); } =20 -void helper_unsupported(CPUAVRState *env) +void HELPER(unsupported)(CPUAVRState *env) { CPUState *cs =3D env_cpu(env); =20 @@ -183,7 +183,7 @@ void helper_unsupported(CPUAVRState *env) cpu_loop_exit(cs); } =20 -void helper_debug(CPUAVRState *env) +void HELPER(debug)(CPUAVRState *env) { CPUState *cs =3D env_cpu(env); =20 @@ -191,7 +191,7 @@ void helper_debug(CPUAVRState *env) cpu_loop_exit(cs); } =20 -void helper_break(CPUAVRState *env) +void HELPER(break)(CPUAVRState *env) { CPUState *cs =3D env_cpu(env); =20 @@ -199,7 +199,7 @@ void helper_break(CPUAVRState *env) cpu_loop_exit(cs); } =20 -void helper_wdr(CPUAVRState *env) +void HELPER(wdr)(CPUAVRState *env) { qemu_log_mask(LOG_UNIMP, "WDG reset (not implemented)\n"); } @@ -281,7 +281,7 @@ const MemoryRegionOps avr_cpu_reg2 =3D { * this function implements ST instruction when there is a possibility to= write * into a CPU register */ -void helper_fullwr(CPUAVRState *env, uint32_t data, uint32_t addr) +void HELPER(fullwr)(CPUAVRState *env, uint32_t data, uint32_t addr) { env->fullacc =3D false; =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772542; cv=none; d=zohomail.com; s=zohoarc; b=EaR90HgFTtaulsH00zLTshJ9UMKx0cE8SbNqv14/ENmeH82CGQ1ZD0vWBUUzBnCN5Iz4lwYDL2c3cNpPGpLQVDBUvmEYl5/+2U+vtPCYZRZ6UhbKDDbZCdfpQFMceyY9nB5tPVRkwEVfAcSuEB77BKPQHyOeq0pWafz1VtNmv28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772542; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=I2J52Enkq5xu0RqWRFdZ5GZ2gTsNoqTPQQHDSKZA688=; b=ijRHNeJVlpf6hhpAb3pEKMLj6g16QXiNhOs4yEAEQ0uK0QJotsVaBSe0LblIsCQlLdtjJXn2hp5puO2lazZfrXRmPkxcEmYv2SBdVq4BkziI28tvlH2vNozPy/TSK8App/1tegO1xn5NkiSfjYeAZiN5YMmYz0Ew9+HcUTe+874= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772542155127.4692461702324; Fri, 23 Oct 2026 09:22:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI1H-0001sN-Sb; Fri, 23 Oct 2026 12:21:28 -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 1xKI18-0001hr-AA for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:19 -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 1xKI15-00031P-5k for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:18 -0400 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5wNR2109216 for ; Fri, 23 Oct 2026 16:21:11 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqms4gwb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:21:11 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-92e82060977so215715985a.1 for ; Fri, 23 Oct 2026 09:21:10 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a9062d50sm16323835e9.2.2026.10.23.09.21.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= I2J52Enkq5xu0RqWRFdZ5GZ2gTsNoqTPQQHDSKZA688=; b=ZWleb54PO2wNUD5c 4bXDf4jYgDj1kRP/9jzvRqZdyNWY3gxSBQhATrBb7mPZVZSwYxh7adbz5v3X5Fea mxRmbqfipGWv0U6hf6lpGxexOnxwtgEDWRJqXe9IAKg5a2+8xGqCQ8BunxaT2GGj g3HvNrEqaV0feSOmBa9cYr+2x5i7LbgmbOAVmn1uRRVtJicp95ZKVPYXheBFhaG2 ZTnhaW1+SY8bE8JbO4S/KK5QMsTwjQLAuv44uLS0XgGQhdJRvkX736mgYerVyp1A L5i2Cx/92AyJoVJ0XeqL6HrkDOLqzrwII0TCXcitDcl8U/OWu38ntWJuOrOg4014 ZxxHyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772470; x=1793377270; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=I2J52Enkq5xu0RqWRFdZ5GZ2gTsNoqTPQQHDSKZA688=; b=gjYoUIBjeCMxCnk8muDw44103igsPkZ3zAkQoo+Y8keHUwmSPctWTQSLXr9A4FASRV F//f1122Rx3GbX9j2cjf5310EYCTajzQviAVnsJft9grAiEtu9x0qOa2JyCnNGa0aXOJ TFdM8erLF4aCzMeY/K8JC/sOHWQZwriE5fseBtyCvL3Nvq3DHsCv9smCbnqviL4Pb7uV uuEbH9qazQIRYEH1N2luknuCL+ceI9FLRe4Az/vBOGVPZlFXqfo3a1Z+swTy+g9ePWAt Qd4DBCTf+xPJpQevdpJu2QI9Ml4AHR3WNpUbhBbeVKRNd7L/F/7FFbII16yI2maXaDpZ 8aNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772470; x=1793377270; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=I2J52Enkq5xu0RqWRFdZ5GZ2gTsNoqTPQQHDSKZA688=; b=FF0sUbQIDU9wa7FEA+gLeM0ScRWpW/e/OlLcPw+dFNZ2YCIETgN62yPTI8tIJkf/vs Wni/XRrN6LGv4hnOnYl7u1ib2FU0oCl4gH1BUrxPnBB3bcxNydIxkw4ZKeTFb5HP2tsb SFcxnadtA6SIXuTP1FK9KFV+goouOqDha91IacF2LVFj5TVRZLYriq3/ilfsMjkFFkXa gR9XNUsDPy/Vr7lb4O5dduekVsQZdSP2O8IuZFYQsJ/YpXNMzjFqh8rOm90PtilwdTQe FkSlWo7N15DPwO2xqIomSHTS5D5yNlADH7QyArbE7ViA9+jAhHP4wyYw5BBtlLR5aU+f 5IZA== X-Gm-Message-State: AFq9FYLI8sbrVoXrVOyfS2fIjzx50NOhdt7dE1WmBH7SRWIyfNS8xHzI e4T16wVYvwLxN58oeWjzV+2tbPs7HpYfw8zwORsUkZYMu5iz6VDS0wH2haZO7kjxmZY1mz/CBL8 6HvUizC534DSWt4SnhEeWYJ+xhAfFKnXMge3YR8XwKYF40gVzcT2iH0Ete3/25C+qD4yr X-Gm-Gg: AYBFou2YHqSfDn66DrK+adut/ZQfnbCLw01SFQ1mT6vMc5/D/QZl6Ihf6WYdUWHp5co ncP62N1KCRtNoe3rhncZLsxtROzb/70w8FUBE74uNWRxa9UyBP2OmISDQOCGWYw4DdBPIpYr/Jt LeMCmY0CQ6FqwdLxW9hcleRt3voqUq3b6vvX750eZ45eAFXWNm4OHadxvPaL4NUCDu5B3gRt41J xcBvKo84tfJzDficTrgmzbDBy4lyBc2DC0bzQtKi+/lTdLNPxad6lczZ238I056BV4viCL+DKSe wAXj2HEYW1+fvCo6hqHooSkGMCbDTYBsVd1dYCpr63L1oXB80sCcLml5zfgkqo2jgUl9M4gG+hn kXHnxax8gOgHQqeHvpTJrE1Tsmw== X-Received: by 2002:a05:620a:270d:b0:939:5d22:d1f0 with SMTP id af79cd13be357-93f624b1fa5mr941884885a.2.1792772469619; Fri, 23 Oct 2026 09:21:09 -0700 (PDT) X-Received: by 2002:a05:620a:270d:b0:939:5d22:d1f0 with SMTP id af79cd13be357-93f624b1fa5mr941881285a.2.1792772468942; Fri, 23 Oct 2026 09:21:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 63/83] target/hppa: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:11 +0200 Message-ID: <20261023161332.60153-64-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXxynKBzpuity/ EBugzRCQtDNPVPwJidiTF+giS8iXkOQDswXAVGLI7LRq1gPgEziMJWk5ygVvitd4De3eH5Q1WwL UUcEk7JK4V7TzYEe6uQR/So5ATeQBAnq1FGugUkgH6Rqly3LmYteC8DT8u7LgOhAO6SzJwICuQf LiGj83fB4IyqPK22/RQjVlO99o3pmCXTtLUIT2OyZ6he1MBtn9NcLJaOq/Chz+XKmLrd6KFDVN/ 4WaQpNYg+YyDmhxlUBryNgmstXS2ObmUQGY+eeoKwuIDz1DTmOTdeRk56vO4xv0X9zYTg4Xzwqz nI/GGkJKg1YHA6mC7XCWs3ST8U4Pvf9NcUxwBrOvs7jVJt/9BJf03OK3+oZpESFvzMN/SzvaPNv V/Y22LtB2cOqx6YmfH/cyN/gEx4ejaF1c8Qb8YOMfhzC3mFX4dvd/TCrKkRU9TZB+wXCrSKMSrh IKvnDwBOVqFGQnD+UMg== X-Proofpoint-GUID: penE1aCsSIOPiTzktdqnf6pm_yWbY68I X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX2sBSbQtXsSDI gCboHBHNdou5vgdlsnzZrBBRIHKWa1XNTgJz5GtAElC2ebZk9irKPc++svLW25rToYqGpAYsn4G g1iV/f12LrW0QXNfkUTkigbrMDTEzSU= X-Authority-Analysis: v=2.4 cv=UdbE26SN c=1 sm=1 tr=0 ts=6adb8977 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=ya3Pk_hNRNhBRN_1oewA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: penE1aCsSIOPiTzktdqnf6pm_yWbY68I X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772542942158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-5-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/hppa/fpu_helper.c | 2 +- target/hppa/op_helper.c | 2 +- target/hppa/sys_helper.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/hppa/fpu_helper.c b/target/hppa/fpu_helper.c index cdbebcfeb3a..a0c8c91ee54 100644 --- a/target/hppa/fpu_helper.c +++ b/target/hppa/fpu_helper.c @@ -82,7 +82,7 @@ void HELPER(loaded_fr0)(CPUHPPAState *env) =20 void cpu_hppa_loaded_fr0(CPUHPPAState *env) { - helper_loaded_fr0(env); + HELPER(loaded_fr0)(env); } =20 #define CONVERT_BIT(X, SRC, DST) \ diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index 3542c275663..ea0680aa9eb 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -341,7 +341,7 @@ target_ulong HELPER(probe)(CPUHPPAState *env, target_ul= ong addr, if (excp =3D=3D EXCP_DTLB_MISS) { excp =3D EXCP_NA_DTLB_MISS; } - helper_hppa_excp(env, excp); + HELPER(hppa_excp)(env, excp); } return (want & prot) !=3D 0; #endif diff --git a/target/hppa/sys_helper.c b/target/hppa/sys_helper.c index f7fd80b5830..ccfc2b48816 100644 --- a/target/hppa/sys_helper.c +++ b/target/hppa/sys_helper.c @@ -51,13 +51,13 @@ void HELPER(write_interval_timer)(CPUHPPAState *env, ta= rget_ulong val) void HELPER(hppa_halt)(CPUHPPAState *env) { qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); - helper_hppa_excp(env, EXCP_HLT); + HELPER(hppa_excp)(env, EXCP_HLT); } =20 void HELPER(hppa_reset)(CPUHPPAState *env) { qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); - helper_hppa_excp(env, EXCP_HLT); + HELPER(hppa_excp)(env, EXCP_HLT); } =20 target_ulong HELPER(swap_system_mask)(CPUHPPAState *env, target_ulong nsm) @@ -120,7 +120,7 @@ static void getshadowregs(CPUHPPAState *env) void HELPER(rfi_r)(CPUHPPAState *env) { getshadowregs(env); - helper_rfi(env); + HELPER(rfi)(env); } =20 #ifndef CONFIG_USER_ONLY --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772681; cv=none; d=zohomail.com; s=zohoarc; b=TUnev6jUqloVrdIch2JZhZze2RHtmiWNk23qGK2AkDGLO5BkOfIsSmc30DHE4rQ2AMIXZGzNrCp04zS1h7pTdjPGxTIF7xvS5dcn/bICcMskT5G6m1BZoSYvjhzAepYlmSd+ZUM7EYXV+dBN6L1D3C03C9LfftXi2HZI+4N5RsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772681; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=nyt61xyyrl40AsbayTKHAL9PyyEs9xVdcjn/EMQ38cU=; b=AaySqQn1xrkY7WVdXrPoTWnMzVL9aeIb19yP5mtTGObN8ZiofTGjmVYhDnYpTIkOg1EaQAq6jbZVt+/ifSNu0xVB+rbZO0onm7P4heRboRhrKfEpkC9iSqv/2HaMfmoicZ2LwZVzJaNYi+aMvB5wr05EXQyOeX4ix1L7sUnrAT0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772681153829.6120133077866; Fri, 23 Oct 2026 09:24:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI1V-0002Kp-Fp; Fri, 23 Oct 2026 12:21:41 -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 1xKI1P-00028Y-EW for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:36 -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 1xKI1H-00032c-Qq for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:34 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6rpw1492210 for ; Fri, 23 Oct 2026 16:21:22 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmauyru-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:21:21 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93f33438950so242880785a.1 for ; Fri, 23 Oct 2026 09:21:21 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29cdb75cfsm17522645e9.9.2026.10.23.09.21.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= nyt61xyyrl40AsbayTKHAL9PyyEs9xVdcjn/EMQ38cU=; b=FLs6IzXkvuwvn4tf b0qSkakxBIaruI9F/GA00JskgMtqyf5ygFfIheLQy/0koqGfWa0iQVg9fMznhykQ sI1YR2XnDzYRAFXc0lARdSZLi+Vg2+xDHNcsyU78QZsksQLc0xPUlCa0GdqCtzEW +NEIDk2jG5YebZWLw9gLjax9pFbc4EFJoAb0EnOR8+DZbpUfdcmGydMhtAp4fSGs Gxgp5cDBzMTSbFYQNUk72P0TseHClSQw11E3cZ3nqDXTrQZA7Qm8zO2JcQzgjLoF peKZRKpW72Zwfw8AxZtNkAPGmg5s+WeOCHh4P3//bAvh8/vFvc1FDz7dZUVH+Hbh jp8+Zw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772481; x=1793377281; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nyt61xyyrl40AsbayTKHAL9PyyEs9xVdcjn/EMQ38cU=; b=BU8GX7+h5SstrliWQBKZeRfzOllZHViqfVMhR8W7oHx8bQZlBuOqjdIFIm4Mrhi3WO YkRttUYPGeqng1kJztnO71b4yeU8w+QlVaTrTUDqUPLTw8qE1VZO+kOwtpLP2Ww+X6hR sZQy/R2Y1qdLR/LurijTD957FVXlnx4/Gahki9OHciSx/tUy9CkY5RSuE2gSDHVp5wWg 4PnGrg7ZekDL5nMdnxp5gd7VL6P5LrsWgZ5WabJbmHJ/i09uQv8LmmHPXFV6aK9bxUVD BPYG9GjpDJFbTKUhuW8YfUEU0TtLh+qShFgsYIPiEoBHMYxCVbXEMlsO65rGzug3c5D7 IdCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772481; x=1793377281; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nyt61xyyrl40AsbayTKHAL9PyyEs9xVdcjn/EMQ38cU=; b=SrQtiYt5hp8OQnydst1Q2Bs/AEdQzGEmdjVaH317CvB0JsAsstlAxlLt9O8Op1puPJ abNI0i/ErfIoedh8la8zW4uyJ18wiLS1pX8n25mvGUX7UIwA5uagOuilhfY4trYOcwFK ddi1KYwVZwlWo7X+tgpWtPs8We8V6rpzRNqXikfoUGowzTbI9uRCz3Tc3IUsJZjlgZX6 mq2oUvYnpRvWHYi2Ab0q3NQ9WCp9AUNAF7qr4c4QeZiugqMiCZr0PV+9VHp5tLdreMd4 qzm2sX2e/IeVVw1WYaXRqSldsshp+awXlesTHrgoAHC/47LamlPTMBtuwHoXKESXGC+F UmVQ== X-Gm-Message-State: AFq9FYLhHujQspkPP4UjJ6T+yBalUjfv6xKBcCr13EW3bKoW5+gbt81r 4/2nmFa7vuUgQ5+6co0UuJo0zUe6VpRnWlP9OS6rThSJp8a2WEqLW8pjqYQBMACO3iwfIE6Jy+e sSJQQkZIVu7o3WQpbn03MYX+aEwLuOY20MQHjTTrxx4Wo6a4uIac4qjICtumiGRIQOQJv X-Gm-Gg: AYBFou30B5VXI01i5+Bfd/IDBlUD1WELw1EIwZJdx3qCTEgSibBP2LfNL+c2Fl+qXJc IPH14EnEEKc11u6FAy89yCNgIv1m1F/wKg2rETcq+to+5eSv69U3sQPV7esDiyowcrhr30Qgz/q laYOFrkb19psJOsO8Cj4v1RtwLnEPUJhZ5e/aH3zUhQKLPa0LzMgEkNGQQHfYUtpUQ7qI362IjE wiQA3ZhewR0ZT2AdIgVaNUHmXdpuQuc+dtli2EPYA1tulChQ8IcZwW47I6LF+XCL8QmRO1sxyNj ShrQ4kToB8Jlz0hHyHsXpdfUEeVVyPWZQiQ3pbMj4yzN2Wyc/KLoy3fkYO4X5fzxMJPrPyjAdGk wJA2/IvTD40mTQudcx+Cs3LSEzN/bE5edidlNjuX8 X-Received: by 2002:a05:620a:8084:b0:93e:c12c:f12e with SMTP id af79cd13be357-93f6f830af0mr459214085a.73.1792772479137; Fri, 23 Oct 2026 09:21:19 -0700 (PDT) X-Received: by 2002:a05:620a:8084:b0:93e:c12c:f12e with SMTP id af79cd13be357-93f6f830af0mr459201585a.73.1792772477231; Fri, 23 Oct 2026 09:21:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 64/83] target/i386: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:12 +0200 Message-ID: <20261023161332.60153-65-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb8982 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=zqbdzdLRx8sci1EBtjIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX/pOpnGMDy2KG tXOmVhhXv6WeSrxblD9l+E7PAu9oQPYed8nbla5xUf+irt8cLsKgb3KF3puF+VFTEKsqyUC93tA pKSu+LpcwdjSsuKFonKzvk4HnS0X+7g= X-Proofpoint-GUID: km9G1dSIZO7wviBEp1z_UDgTjSaFgs46 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX0I+SE/Rb10B5 jE6KBa0KiRAeL7TckrNx7kyh8B6Malh2/GWIPk3QtilnRd10lKNNmpdRW7x4aWYpUp+q/gLJvru N4z59cE9iSQUe5GLPgHoC3zELos7KPeULu5LAhP6pI8Hl/vE+w3v+GZIxUTYTK8IkDMZHR4GF6U /E/Z76L5FI3lyfi1cQyoxcPZgXRBsd0upA4D32Gz8l/8VStgH18yQUxUZerhemmWadeZVvOQoTT UQVtRCG/WXyZ80hYdJ87B/jdl5HSYFiiF37nn99HTkHHRjBDOKn8ViO+JTIgezksi/XkPNWv8qo 5yF6Gpfll5yp+qF0zHcDcZCILfR/B9BshR/EmAqvrE4MKed3l6c47rr7syA1R8/wSFyMgU7F3qu h3CRAs5F4GAlIjNRgUvHtyUJQ9VuYiCObf1PrABosjCBADwBUIRfPQosHmMXbIBu7UmOmE+c06F 6Ob/Z0JQXaPLFFz031w== X-Proofpoint-ORIG-GUID: km9G1dSIZO7wviBEp1z_UDgTjSaFgs46 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772681529158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-6-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/ops_sse.h | 401 ++++++++++++++------------- target/i386/tcg/bpt_helper.c | 6 +- target/i386/tcg/cc_helper.c | 14 +- target/i386/tcg/excp_helper.c | 8 +- target/i386/tcg/fpu_helper.c | 182 ++++++------ target/i386/tcg/int_helper.c | 34 +-- target/i386/tcg/mem_helper.c | 4 +- target/i386/tcg/misc_helper.c | 16 +- target/i386/tcg/mpx_helper.c | 12 +- target/i386/tcg/seg_helper.c | 32 +-- target/i386/tcg/system/bpt_helper.c | 6 +- target/i386/tcg/system/misc_helper.c | 32 +-- target/i386/tcg/system/seg_helper.c | 4 +- target/i386/tcg/system/smm_helper.c | 12 +- target/i386/tcg/system/svm_helper.c | 16 +- target/i386/tcg/user/seg_helper.c | 4 +- 16 files changed, 392 insertions(+), 391 deletions(-) diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index 5176a9f9e35..b39fcde3539 100644 --- a/target/i386/ops_sse.h +++ b/target/i386/ops_sse.h @@ -54,7 +54,7 @@ #define FPSLL(x, c) ((x) << shift) #endif =20 -void glue(helper_psrlw, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(psrlw), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift; if (c->Q(0) > 15) { @@ -69,7 +69,7 @@ void glue(helper_psrlw, SUFFIX)(CPUX86State *env, Reg *d,= Reg *s, Reg *c) } } =20 -void glue(helper_psllw, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(psllw), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift; if (c->Q(0) > 15) { @@ -84,7 +84,7 @@ void glue(helper_psllw, SUFFIX)(CPUX86State *env, Reg *d,= Reg *s, Reg *c) } } =20 -void glue(helper_psraw, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(psraw), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift; if (c->Q(0) > 15) { @@ -97,7 +97,7 @@ void glue(helper_psraw, SUFFIX)(CPUX86State *env, Reg *d,= Reg *s, Reg *c) } } =20 -void glue(helper_psrld, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(psrld), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift; if (c->Q(0) > 31) { @@ -112,7 +112,7 @@ void glue(helper_psrld, SUFFIX)(CPUX86State *env, Reg *= d, Reg *s, Reg *c) } } =20 -void glue(helper_pslld, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(pslld), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift; if (c->Q(0) > 31) { @@ -127,7 +127,7 @@ void glue(helper_pslld, SUFFIX)(CPUX86State *env, Reg *= d, Reg *s, Reg *c) } } =20 -void glue(helper_psrad, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(psrad), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift; if (c->Q(0) > 31) { @@ -140,7 +140,7 @@ void glue(helper_psrad, SUFFIX)(CPUX86State *env, Reg *= d, Reg *s, Reg *c) } } =20 -void glue(helper_psrlq, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(psrlq), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift; if (c->Q(0) > 63) { @@ -155,7 +155,7 @@ void glue(helper_psrlq, SUFFIX)(CPUX86State *env, Reg *= d, Reg *s, Reg *c) } } =20 -void glue(helper_psllq, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(psllq), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift; if (c->Q(0) > 63) { @@ -171,7 +171,7 @@ void glue(helper_psllq, SUFFIX)(CPUX86State *env, Reg *= d, Reg *s, Reg *c) } =20 #if SHIFT >=3D 1 -void glue(helper_psrldq, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(psrldq), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift, i, j; =20 @@ -189,7 +189,7 @@ void glue(helper_psrldq, SUFFIX)(CPUX86State *env, Reg = *d, Reg *s, Reg *c) } } =20 -void glue(helper_pslldq, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) +void glue(HELPER(pslldq), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, Reg *c) { int shift, i, j; =20 @@ -306,11 +306,11 @@ static inline int satsw(int x) #define FAVG(a, b) (((a) + (b) + 1) >> 1) #endif =20 -SSE_HELPER_W(helper_pmulhuw, FMULHUW) -SSE_HELPER_W(helper_pmulhw, FMULHW) +SSE_HELPER_W(HELPER(pmulhuw), FMULHUW) +SSE_HELPER_W(HELPER(pmulhw), FMULHW) =20 #if SHIFT =3D=3D 0 -void glue(helper_pmulhrw, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(pmulhrw), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { d->W(0) =3D FMULHRW(d->W(0), s->W(0)); d->W(1) =3D FMULHRW(d->W(1), s->W(1)); @@ -319,10 +319,10 @@ void glue(helper_pmulhrw, SUFFIX)(CPUX86State *env, R= eg *d, Reg *s) } #endif =20 -SSE_HELPER_B(helper_pavgb, FAVG) -SSE_HELPER_W(helper_pavgw, FAVG) +SSE_HELPER_B(HELPER(pavgb), FAVG) +SSE_HELPER_W(HELPER(pavgw), FAVG) =20 -void glue(helper_pmuludq, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void glue(HELPER(pmuludq), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) { int i; =20 @@ -331,7 +331,7 @@ void glue(helper_pmuludq, SUFFIX)(CPUX86State *env, Reg= *d, Reg *v, Reg *s) } } =20 -void glue(helper_pmaddwd, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void glue(HELPER(pmaddwd), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) { int i; =20 @@ -351,7 +351,7 @@ static inline int abs1(int a) } } #endif -void glue(helper_psadbw, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void glue(HELPER(psadbw), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { int i; =20 @@ -370,7 +370,7 @@ void glue(helper_psadbw, SUFFIX)(CPUX86State *env, Reg = *d, Reg *v, Reg *s) } =20 #if SHIFT < 2 -void glue(helper_maskmov, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, +void glue(HELPER(maskmov), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, target_ulong a0) { int i; @@ -395,14 +395,14 @@ void glue(helper_maskmov, SUFFIX)(CPUX86State *env, R= eg *d, Reg *s, } while (0) =20 #if SHIFT =3D=3D 0 -void glue(helper_pshufw, SUFFIX)(Reg *d, Reg *s, int order) +void glue(HELPER(pshufw), SUFFIX)(Reg *d, Reg *s, int order) { uint16_t r0, r1, r2, r3; =20 SHUFFLE4(W, s, s, 0); } #else -void glue(helper_shufps, SUFFIX)(Reg *d, Reg *v, Reg *s, int order) +void glue(HELPER(shufps), SUFFIX)(Reg *d, Reg *v, Reg *s, int order) { uint32_t r0, r1, r2, r3; int i; @@ -412,7 +412,7 @@ void glue(helper_shufps, SUFFIX)(Reg *d, Reg *v, Reg *s= , int order) } } =20 -void glue(helper_shufpd, SUFFIX)(Reg *d, Reg *v, Reg *s, int order) +void glue(HELPER(shufpd), SUFFIX)(Reg *d, Reg *v, Reg *s, int order) { uint64_t r0, r1; int i; @@ -426,7 +426,7 @@ void glue(helper_shufpd, SUFFIX)(Reg *d, Reg *v, Reg *s= , int order) } } =20 -void glue(helper_pshufd, SUFFIX)(Reg *d, Reg *s, int order) +void glue(HELPER(pshufd), SUFFIX)(Reg *d, Reg *s, int order) { uint32_t r0, r1, r2, r3; int i; @@ -436,7 +436,7 @@ void glue(helper_pshufd, SUFFIX)(Reg *d, Reg *s, int or= der) } } =20 -void glue(helper_pshuflw, SUFFIX)(Reg *d, Reg *s, int order) +void glue(HELPER(pshuflw), SUFFIX)(Reg *d, Reg *s, int order) { uint16_t r0, r1, r2, r3; int i, j; @@ -447,7 +447,7 @@ void glue(helper_pshuflw, SUFFIX)(Reg *d, Reg *s, int o= rder) } } =20 -void glue(helper_pshufhw, SUFFIX)(Reg *d, Reg *s, int order) +void glue(HELPER(pshufhw), SUFFIX)(Reg *d, Reg *s, int order) { uint16_t r0, r1, r2, r3; int i, j; @@ -464,7 +464,7 @@ void glue(helper_pshufhw, SUFFIX)(Reg *d, Reg *s, int o= rder) /* XXX: not accurate */ =20 #define SSE_HELPER_P(name, F) \ - void glue(helper_ ## name ## ps, SUFFIX)(CPUX86State *env, \ + void HELPER(glue(name ## ps, SUFFIX))(CPUX86State *env, \ Reg *d, Reg *v, Reg *s) \ { \ int i; \ @@ -473,7 +473,7 @@ void glue(helper_pshufhw, SUFFIX)(Reg *d, Reg *s, int o= rder) } \ } \ \ - void glue(helper_ ## name ## pd, SUFFIX)(CPUX86State *env, \ + void HELPER(glue(name ## pd, SUFFIX))(CPUX86State *env, \ Reg *d, Reg *v, Reg *s) \ { \ int i; \ @@ -487,7 +487,7 @@ void glue(helper_pshufhw, SUFFIX)(Reg *d, Reg *s, int o= rder) #define SSE_HELPER_S(name, F) \ SSE_HELPER_P(name, F) \ \ - void helper_ ## name ## ss(CPUX86State *env, Reg *d, Reg *v, Reg *s)\ + void HELPER(name ## ss)(CPUX86State *env, Reg *d, Reg *v, Reg *s) \ { \ int i; \ d->ZMM_S(0) =3D F(32, v->ZMM_S(0), s->ZMM_S(0)); \ @@ -496,7 +496,7 @@ void glue(helper_pshufhw, SUFFIX)(Reg *d, Reg *s, int o= rder) } \ } \ \ - void helper_ ## name ## sd(CPUX86State *env, Reg *d, Reg *v, Reg *s)\ + void HELPER(name ## sd)(CPUX86State *env, Reg *d, Reg *v, Reg *s) \ { \ int i; \ d->ZMM_D(0) =3D F(64, v->ZMM_D(0), s->ZMM_D(0)); \ @@ -532,7 +532,7 @@ SSE_HELPER_S(div, FPU_DIV) SSE_HELPER_S(min, FPU_MIN) SSE_HELPER_S(max, FPU_MAX) =20 -void glue(helper_sqrtps, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(sqrtps), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { int i; for (i =3D 0; i < 2 << SHIFT; i++) { @@ -540,7 +540,7 @@ void glue(helper_sqrtps, SUFFIX)(CPUX86State *env, Reg = *d, Reg *s) } } =20 -void glue(helper_sqrtpd, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(sqrtpd), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { int i; for (i =3D 0; i < 1 << SHIFT; i++) { @@ -549,7 +549,7 @@ void glue(helper_sqrtpd, SUFFIX)(CPUX86State *env, Reg = *d, Reg *s) } =20 #if SHIFT =3D=3D 1 -void helper_sqrtss(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void HELPER(sqrtss)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { int i; d->ZMM_S(0) =3D float32_sqrt(s->ZMM_S(0), &env->sse_status); @@ -558,7 +558,7 @@ void helper_sqrtss(CPUX86State *env, Reg *d, Reg *v, Re= g *s) } } =20 -void helper_sqrtsd(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void HELPER(sqrtsd)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { int i; d->ZMM_D(0) =3D float64_sqrt(s->ZMM_D(0), &env->sse_status); @@ -569,7 +569,7 @@ void helper_sqrtsd(CPUX86State *env, Reg *d, Reg *v, Re= g *s) #endif =20 /* float to float conversions */ -void glue(helper_cvtps2pd, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(cvtps2pd), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { int i; for (i =3D 1 << SHIFT; --i >=3D 0; ) { @@ -577,7 +577,7 @@ void glue(helper_cvtps2pd, SUFFIX)(CPUX86State *env, Re= g *d, Reg *s) } } =20 -void glue(helper_cvtpd2ps, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(cvtpd2ps), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { int i; for (i =3D 0; i < 1 << SHIFT; i++) { @@ -589,7 +589,7 @@ void glue(helper_cvtpd2ps, SUFFIX)(CPUX86State *env, Re= g *d, Reg *s) } =20 #if SHIFT >=3D 1 -void glue(helper_cvtph2ps, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(cvtph2ps), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { int i; =20 @@ -598,7 +598,7 @@ void glue(helper_cvtph2ps, SUFFIX)(CPUX86State *env, Re= g *d, Reg *s) } } =20 -void glue(helper_cvtps2ph, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, int m= ode) +void glue(HELPER(cvtps2ph), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, int = mode) { int i; FloatRoundMode prev_rounding_mode =3D get_float_rounding_mode(&env->ss= e_status); @@ -618,7 +618,7 @@ void glue(helper_cvtps2ph, SUFFIX)(CPUX86State *env, Re= g *d, Reg *s, int mode) #endif =20 #if SHIFT =3D=3D 1 -void helper_cvtss2sd(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void HELPER(cvtss2sd)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { int i; d->ZMM_D(0) =3D float32_to_float64(s->ZMM_S(0), &env->sse_status); @@ -627,7 +627,7 @@ void helper_cvtss2sd(CPUX86State *env, Reg *d, Reg *v, = Reg *s) } } =20 -void helper_cvtsd2ss(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void HELPER(cvtsd2ss)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { int i; d->ZMM_S(0) =3D float64_to_float32(s->ZMM_D(0), &env->sse_status); @@ -638,7 +638,7 @@ void helper_cvtsd2ss(CPUX86State *env, Reg *d, Reg *v, = Reg *s) #endif =20 /* integer to float */ -void glue(helper_cvtdq2ps, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(cvtdq2ps), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { int i; for (i =3D 0; i < 2 << SHIFT; i++) { @@ -646,7 +646,7 @@ void glue(helper_cvtdq2ps, SUFFIX)(CPUX86State *env, Re= g *d, Reg *s) } } =20 -void glue(helper_cvtdq2pd, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(cvtdq2pd), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { int i; for (i =3D 1 << SHIFT; --i >=3D 0; ) { @@ -656,35 +656,35 @@ void glue(helper_cvtdq2pd, SUFFIX)(CPUX86State *env, = Reg *d, Reg *s) } =20 #if SHIFT =3D=3D 1 -void helper_cvtpi2ps(CPUX86State *env, ZMMReg *d, MMXReg *s) +void HELPER(cvtpi2ps)(CPUX86State *env, ZMMReg *d, MMXReg *s) { d->ZMM_S(0) =3D int32_to_float32(s->MMX_L(0), &env->sse_status); d->ZMM_S(1) =3D int32_to_float32(s->MMX_L(1), &env->sse_status); } =20 -void helper_cvtpi2pd(CPUX86State *env, ZMMReg *d, MMXReg *s) +void HELPER(cvtpi2pd)(CPUX86State *env, ZMMReg *d, MMXReg *s) { d->ZMM_D(0) =3D int32_to_float64(s->MMX_L(0), &env->sse_status); d->ZMM_D(1) =3D int32_to_float64(s->MMX_L(1), &env->sse_status); } =20 -void helper_cvtsi2ss(CPUX86State *env, ZMMReg *d, uint32_t val) +void HELPER(cvtsi2ss)(CPUX86State *env, ZMMReg *d, uint32_t val) { d->ZMM_S(0) =3D int32_to_float32(val, &env->sse_status); } =20 -void helper_cvtsi2sd(CPUX86State *env, ZMMReg *d, uint32_t val) +void HELPER(cvtsi2sd)(CPUX86State *env, ZMMReg *d, uint32_t val) { d->ZMM_D(0) =3D int32_to_float64(val, &env->sse_status); } =20 #ifdef TARGET_X86_64 -void helper_cvtsq2ss(CPUX86State *env, ZMMReg *d, uint64_t val) +void HELPER(cvtsq2ss)(CPUX86State *env, ZMMReg *d, uint64_t val) { d->ZMM_S(0) =3D int64_to_float32(val, &env->sse_status); } =20 -void helper_cvtsq2sd(CPUX86State *env, ZMMReg *d, uint64_t val) +void HELPER(cvtsq2sd)(CPUX86State *env, ZMMReg *d, uint64_t val) { d->ZMM_D(0) =3D int64_to_float64(val, &env->sse_status); } @@ -727,7 +727,7 @@ WRAP_FLOATCONV(int64_t, float64_to_int64, float64, INT6= 4_MIN) WRAP_FLOATCONV(int64_t, float64_to_int64_round_to_zero, float64, INT64_MIN) #endif =20 -void glue(helper_cvtps2dq, SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) +void glue(HELPER(cvtps2dq), SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) { int i; for (i =3D 0; i < 2 << SHIFT; i++) { @@ -735,7 +735,7 @@ void glue(helper_cvtps2dq, SUFFIX)(CPUX86State *env, ZM= MReg *d, ZMMReg *s) } } =20 -void glue(helper_cvtpd2dq, SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) +void glue(HELPER(cvtpd2dq), SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) { int i; for (i =3D 0; i < 1 << SHIFT; i++) { @@ -747,35 +747,35 @@ void glue(helper_cvtpd2dq, SUFFIX)(CPUX86State *env, = ZMMReg *d, ZMMReg *s) } =20 #if SHIFT =3D=3D 1 -void helper_cvtps2pi(CPUX86State *env, MMXReg *d, ZMMReg *s) +void HELPER(cvtps2pi)(CPUX86State *env, MMXReg *d, ZMMReg *s) { d->MMX_L(0) =3D x86_float32_to_int32(s->ZMM_S(0), &env->sse_status); d->MMX_L(1) =3D x86_float32_to_int32(s->ZMM_S(1), &env->sse_status); } =20 -void helper_cvtpd2pi(CPUX86State *env, MMXReg *d, ZMMReg *s) +void HELPER(cvtpd2pi)(CPUX86State *env, MMXReg *d, ZMMReg *s) { d->MMX_L(0) =3D x86_float64_to_int32(s->ZMM_D(0), &env->sse_status); d->MMX_L(1) =3D x86_float64_to_int32(s->ZMM_D(1), &env->sse_status); } =20 -int32_t helper_cvtss2si(CPUX86State *env, ZMMReg *s) +int32_t HELPER(cvtss2si)(CPUX86State *env, ZMMReg *s) { return x86_float32_to_int32(s->ZMM_S(0), &env->sse_status); } =20 -int32_t helper_cvtsd2si(CPUX86State *env, ZMMReg *s) +int32_t HELPER(cvtsd2si)(CPUX86State *env, ZMMReg *s) { return x86_float64_to_int32(s->ZMM_D(0), &env->sse_status); } =20 #ifdef TARGET_X86_64 -int64_t helper_cvtss2sq(CPUX86State *env, ZMMReg *s) +int64_t HELPER(cvtss2sq)(CPUX86State *env, ZMMReg *s) { return x86_float32_to_int64(s->ZMM_S(0), &env->sse_status); } =20 -int64_t helper_cvtsd2sq(CPUX86State *env, ZMMReg *s) +int64_t HELPER(cvtsd2sq)(CPUX86State *env, ZMMReg *s) { return x86_float64_to_int64(s->ZMM_D(0), &env->sse_status); } @@ -783,7 +783,7 @@ int64_t helper_cvtsd2sq(CPUX86State *env, ZMMReg *s) #endif =20 /* float to integer truncated */ -void glue(helper_cvttps2dq, SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) +void glue(HELPER(cvttps2dq), SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *= s) { int i; for (i =3D 0; i < 2 << SHIFT; i++) { @@ -792,7 +792,7 @@ void glue(helper_cvttps2dq, SUFFIX)(CPUX86State *env, Z= MMReg *d, ZMMReg *s) } } =20 -void glue(helper_cvttpd2dq, SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) +void glue(HELPER(cvttpd2dq), SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *= s) { int i; for (i =3D 0; i < 1 << SHIFT; i++) { @@ -805,42 +805,42 @@ void glue(helper_cvttpd2dq, SUFFIX)(CPUX86State *env,= ZMMReg *d, ZMMReg *s) } =20 #if SHIFT =3D=3D 1 -void helper_cvttps2pi(CPUX86State *env, MMXReg *d, ZMMReg *s) +void HELPER(cvttps2pi)(CPUX86State *env, MMXReg *d, ZMMReg *s) { d->MMX_L(0) =3D x86_float32_to_int32_round_to_zero(s->ZMM_S(0), &env->= sse_status); d->MMX_L(1) =3D x86_float32_to_int32_round_to_zero(s->ZMM_S(1), &env->= sse_status); } =20 -void helper_cvttpd2pi(CPUX86State *env, MMXReg *d, ZMMReg *s) +void HELPER(cvttpd2pi)(CPUX86State *env, MMXReg *d, ZMMReg *s) { d->MMX_L(0) =3D x86_float64_to_int32_round_to_zero(s->ZMM_D(0), &env->= sse_status); d->MMX_L(1) =3D x86_float64_to_int32_round_to_zero(s->ZMM_D(1), &env->= sse_status); } =20 -int32_t helper_cvttss2si(CPUX86State *env, ZMMReg *s) +int32_t HELPER(cvttss2si)(CPUX86State *env, ZMMReg *s) { return x86_float32_to_int32_round_to_zero(s->ZMM_S(0), &env->sse_statu= s); } =20 -int32_t helper_cvttsd2si(CPUX86State *env, ZMMReg *s) +int32_t HELPER(cvttsd2si)(CPUX86State *env, ZMMReg *s) { return x86_float64_to_int32_round_to_zero(s->ZMM_D(0), &env->sse_statu= s); } =20 #ifdef TARGET_X86_64 -int64_t helper_cvttss2sq(CPUX86State *env, ZMMReg *s) +int64_t HELPER(cvttss2sq)(CPUX86State *env, ZMMReg *s) { return x86_float32_to_int64_round_to_zero(s->ZMM_S(0), &env->sse_statu= s); } =20 -int64_t helper_cvttsd2sq(CPUX86State *env, ZMMReg *s) +int64_t HELPER(cvttsd2sq)(CPUX86State *env, ZMMReg *s) { return x86_float64_to_int64_round_to_zero(s->ZMM_D(0), &env->sse_statu= s); } #endif #endif =20 -void glue(helper_rsqrtps, SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) +void glue(HELPER(rsqrtps), SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) { int old_flags =3D get_float_exception_flags(&env->sse_status); int i; @@ -853,7 +853,7 @@ void glue(helper_rsqrtps, SUFFIX)(CPUX86State *env, ZMM= Reg *d, ZMMReg *s) } =20 #if SHIFT =3D=3D 1 -void helper_rsqrtss(CPUX86State *env, ZMMReg *d, ZMMReg *v, ZMMReg *s) +void HELPER(rsqrtss)(CPUX86State *env, ZMMReg *d, ZMMReg *v, ZMMReg *s) { int old_flags =3D get_float_exception_flags(&env->sse_status); int i; @@ -867,7 +867,7 @@ void helper_rsqrtss(CPUX86State *env, ZMMReg *d, ZMMReg= *v, ZMMReg *s) } #endif =20 -void glue(helper_rcpps, SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) +void glue(HELPER(rcpps), SUFFIX)(CPUX86State *env, ZMMReg *d, ZMMReg *s) { int old_flags =3D get_float_exception_flags(&env->sse_status); int i; @@ -878,7 +878,7 @@ void glue(helper_rcpps, SUFFIX)(CPUX86State *env, ZMMRe= g *d, ZMMReg *s) } =20 #if SHIFT =3D=3D 1 -void helper_rcpss(CPUX86State *env, ZMMReg *d, ZMMReg *v, ZMMReg *s) +void HELPER(rcpss)(CPUX86State *env, ZMMReg *d, ZMMReg *v, ZMMReg *s) { int old_flags =3D get_float_exception_flags(&env->sse_status); int i; @@ -903,12 +903,12 @@ static inline uint64_t helper_extrq(uint64_t src, int= shift, int len) return (src >> shift) & mask; } =20 -void helper_extrq_r(CPUX86State *env, ZMMReg *d, ZMMReg *s) +void HELPER(extrq_r)(CPUX86State *env, ZMMReg *d, ZMMReg *s) { d->ZMM_Q(0) =3D helper_extrq(d->ZMM_Q(0), s->ZMM_B(1) & 63, s->ZMM_B(0= ) & 63); } =20 -void helper_extrq_i(CPUX86State *env, ZMMReg *d, int index, int length) +void HELPER(extrq_i)(CPUX86State *env, ZMMReg *d, int index, int length) { d->ZMM_Q(0) =3D helper_extrq(d->ZMM_Q(0), index, length); } @@ -925,19 +925,20 @@ static inline uint64_t helper_insertq(uint64_t dest, = uint64_t src, int shift, in return (dest & ~(mask << shift)) | ((src & mask) << shift); } =20 -void helper_insertq_r(CPUX86State *env, ZMMReg *d, ZMMReg *s) +void HELPER(insertq_r)(CPUX86State *env, ZMMReg *d, ZMMReg *s) { d->ZMM_Q(0) =3D helper_insertq(d->ZMM_Q(0), s->ZMM_Q(0), s->ZMM_B(9) &= 63, s->ZMM_B(8) & 63); } =20 -void helper_insertq_i(CPUX86State *env, ZMMReg *d, ZMMReg *s, int index, i= nt length) +void HELPER(insertq_i)(CPUX86State *env, ZMMReg *d, ZMMReg *s, int index, + int length) { d->ZMM_Q(0) =3D helper_insertq(d->ZMM_Q(0), s->ZMM_Q(0), index, length= ); } #endif =20 #define SSE_HELPER_HPS(name, F) \ -void glue(helper_ ## name, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) \ +void HELPER(glue(name, SUFFIX))(CPUX86State *env, Reg *d, Reg *v, Reg *s) = \ { \ float32 r[2 << SHIFT]; \ int i, j, k; \ @@ -958,7 +959,7 @@ SSE_HELPER_HPS(haddps, float32_add) SSE_HELPER_HPS(hsubps, float32_sub) =20 #define SSE_HELPER_HPD(name, F) \ -void glue(helper_ ## name, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) \ +void HELPER(glue(name, SUFFIX))(CPUX86State *env, Reg *d, Reg *v, Reg *s) = \ { \ float64 r[1 << SHIFT]; \ int i, j, k; \ @@ -978,7 +979,7 @@ void glue(helper_ ## name, SUFFIX)(CPUX86State *env, Re= g *d, Reg *v, Reg *s) \ SSE_HELPER_HPD(haddpd, float64_add) SSE_HELPER_HPD(hsubpd, float64_sub) =20 -void glue(helper_addsubps, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) +void glue(HELPER(addsubps), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg = *s) { int i; for (i =3D 0; i < 2 << SHIFT; i +=3D 2) { @@ -987,7 +988,7 @@ void glue(helper_addsubps, SUFFIX)(CPUX86State *env, Re= g *d, Reg *v, Reg *s) } } =20 -void glue(helper_addsubpd, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) +void glue(HELPER(addsubpd), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg = *s) { int i; for (i =3D 0; i < 1 << SHIFT; i +=3D 2) { @@ -997,7 +998,7 @@ void glue(helper_addsubpd, SUFFIX)(CPUX86State *env, Re= g *d, Reg *v, Reg *s) } =20 #define SSE_HELPER_CMP_P(name, F, C) \ - void glue(helper_ ## name ## ps, SUFFIX)(CPUX86State *env, \ + void HELPER(glue(name ## ps, SUFFIX))(CPUX86State *env, \ Reg *d, Reg *v, Reg *s) \ { \ int i; \ @@ -1006,7 +1007,7 @@ void glue(helper_addsubpd, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) } \ } \ \ - void glue(helper_ ## name ## pd, SUFFIX)(CPUX86State *env, \ + void HELPER(glue(name ## pd, SUFFIX))(CPUX86State *env, \ Reg *d, Reg *v, Reg *s) \ { \ int i; \ @@ -1018,7 +1019,7 @@ void glue(helper_addsubpd, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) #if SHIFT =3D=3D 1 #define SSE_HELPER_CMP(name, F, C) = \ SSE_HELPER_CMP_P(name, F, C) = \ - void helper_ ## name ## ss(CPUX86State *env, Reg *d, Reg *v, Reg *s) = \ + void HELPER(name ## ss)(CPUX86State *env, Reg *d, Reg *v, Reg *s) = \ { = \ int i; = \ d->ZMM_L(0) =3D C(F(32, v->ZMM_S(0), s->ZMM_S(0))) ? -1 : 0; = \ @@ -1027,7 +1028,7 @@ void glue(helper_addsubpd, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) } = \ } = \ = \ - void helper_ ## name ## sd(CPUX86State *env, Reg *d, Reg *v, Reg *s) = \ + void HELPER(name ## sd)(CPUX86State *env, Reg *d, Reg *v, Reg *s) = \ { = \ int i; = \ d->ZMM_Q(0) =3D C(F(64, v->ZMM_D(0), s->ZMM_D(0))) ? -1 : 0; = \ @@ -1102,7 +1103,7 @@ SSE_HELPER_CMP(cmptrues, FPU_CMPS, !FPU_FALSE) #if SHIFT =3D=3D 1 static const int comis_eflags[4] =3D {CC_C, CC_Z, 0, CC_Z | CC_P | CC_C}; =20 -void helper_ucomiss(CPUX86State *env, Reg *d, Reg *s) +void HELPER(ucomiss)(CPUX86State *env, Reg *d, Reg *s) { FloatRelation ret; float32 s0, s1; @@ -1114,7 +1115,7 @@ void helper_ucomiss(CPUX86State *env, Reg *d, Reg *s) CC_OP =3D CC_OP_EFLAGS; } =20 -void helper_comiss(CPUX86State *env, Reg *d, Reg *s) +void HELPER(comiss)(CPUX86State *env, Reg *d, Reg *s) { FloatRelation ret; float32 s0, s1; @@ -1126,7 +1127,7 @@ void helper_comiss(CPUX86State *env, Reg *d, Reg *s) CC_OP =3D CC_OP_EFLAGS; } =20 -void helper_ucomisd(CPUX86State *env, Reg *d, Reg *s) +void HELPER(ucomisd)(CPUX86State *env, Reg *d, Reg *s) { FloatRelation ret; float64 d0, d1; @@ -1138,7 +1139,7 @@ void helper_ucomisd(CPUX86State *env, Reg *d, Reg *s) CC_OP =3D CC_OP_EFLAGS; } =20 -void helper_comisd(CPUX86State *env, Reg *d, Reg *s) +void HELPER(comisd)(CPUX86State *env, Reg *d, Reg *s) { FloatRelation ret; float64 d0, d1; @@ -1151,7 +1152,7 @@ void helper_comisd(CPUX86State *env, Reg *d, Reg *s) } #endif =20 -uint32_t glue(helper_movmskps, SUFFIX)(CPUX86State *env, Reg *s) +uint32_t glue(HELPER(movmskps), SUFFIX)(CPUX86State *env, Reg *s) { uint32_t mask; int i; @@ -1163,7 +1164,7 @@ uint32_t glue(helper_movmskps, SUFFIX)(CPUX86State *e= nv, Reg *s) return mask; } =20 -uint32_t glue(helper_movmskpd, SUFFIX)(CPUX86State *env, Reg *s) +uint32_t glue(HELPER(movmskpd), SUFFIX)(CPUX86State *env, Reg *s) { uint32_t mask; int i; @@ -1178,7 +1179,7 @@ uint32_t glue(helper_movmskpd, SUFFIX)(CPUX86State *e= nv, Reg *s) #endif =20 #define PACK_HELPER_B(name, F) \ -void glue(helper_pack ## name, SUFFIX)(CPUX86State *env, \ +void HELPER(glue(pack ## name, SUFFIX))(CPUX86State *env, \ Reg *d, Reg *v, Reg *s) \ { \ uint8_t r[PACK_WIDTH * 2]; \ @@ -1199,7 +1200,7 @@ void glue(helper_pack ## name, SUFFIX)(CPUX86State *e= nv, \ PACK_HELPER_B(sswb, satsb) PACK_HELPER_B(uswb, satub) =20 -void glue(helper_packssdw, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) +void glue(HELPER(packssdw), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg = *s) { uint16_t r[PACK_WIDTH]; int j, k; @@ -1219,7 +1220,7 @@ void glue(helper_packssdw, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) =20 #define UNPCK_OP(base_name, base) \ \ - void glue(helper_punpck ## base_name ## bw, SUFFIX)(CPUX86State *env,\ + void HELPER(glue(punpck ## base_name ## bw, SUFFIX))(CPUX86State *env,= \ Reg *d, Reg *v, Reg *s) \ { \ uint8_t r[PACK_WIDTH * 2]; \ @@ -1237,7 +1238,7 @@ void glue(helper_packssdw, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) } \ } \ \ - void glue(helper_punpck ## base_name ## wd, SUFFIX)(CPUX86State *env,\ + void HELPER(glue(punpck ## base_name ## wd, SUFFIX))(CPUX86State *env,= \ Reg *d, Reg *v, Reg *s) \ { \ uint16_t r[PACK_WIDTH]; \ @@ -1255,7 +1256,7 @@ void glue(helper_packssdw, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) } \ } \ \ - void glue(helper_punpck ## base_name ## dq, SUFFIX)(CPUX86State *env,\ + void HELPER(glue(punpck ## base_name ## dq, SUFFIX))(CPUX86State *env,= \ Reg *d, Reg *v, Reg *s) \ { \ uint32_t r[PACK_WIDTH / 2]; \ @@ -1274,7 +1275,7 @@ void glue(helper_packssdw, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) } \ \ XMM_ONLY( \ - void glue(helper_punpck ## base_name ## qdq, SUFFIX)( \ + void HELPER(glue(punpck ## base_name ## qdq, SUFFIX))( \ CPUX86State *env, Reg *d, Reg *v, Reg *s) \ { \ uint64_t r[2]; \ @@ -1299,25 +1300,25 @@ UNPCK_OP(h, 1) =20 /* 3DNow! float ops */ #if SHIFT =3D=3D 0 -void helper_pi2fd(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pi2fd)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_S(0) =3D int32_to_float32(s->MMX_L(0), &env->mmx_status); d->MMX_S(1) =3D int32_to_float32(s->MMX_L(1), &env->mmx_status); } =20 -void helper_pi2fw(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pi2fw)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_S(0) =3D int32_to_float32((int16_t)s->MMX_W(0), &env->mmx_statu= s); d->MMX_S(1) =3D int32_to_float32((int16_t)s->MMX_W(2), &env->mmx_statu= s); } =20 -void helper_pf2id(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pf2id)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_L(0) =3D float32_to_int32_round_to_zero(s->MMX_S(0), &env->mmx_= status); d->MMX_L(1) =3D float32_to_int32_round_to_zero(s->MMX_S(1), &env->mmx_= status); } =20 -void helper_pf2iw(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pf2iw)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_L(0) =3D satsw(float32_to_int32_round_to_zero(s->MMX_S(0), &env->mmx_status)); @@ -1325,7 +1326,7 @@ void helper_pf2iw(CPUX86State *env, MMXReg *d, MMXReg= *s) &env->mmx_status)); } =20 -void helper_pfacc(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfacc)(CPUX86State *env, MMXReg *d, MMXReg *s) { float32 r; =20 @@ -1334,13 +1335,13 @@ void helper_pfacc(CPUX86State *env, MMXReg *d, MMXR= eg *s) d->MMX_S(0) =3D r; } =20 -void helper_pfadd(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfadd)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_S(0) =3D float32_add(d->MMX_S(0), s->MMX_S(0), &env->mmx_status= ); d->MMX_S(1) =3D float32_add(d->MMX_S(1), s->MMX_S(1), &env->mmx_status= ); } =20 -void helper_pfcmpeq(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfcmpeq)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_L(0) =3D float32_eq_quiet(d->MMX_S(0), s->MMX_S(0), &env->mmx_status) ? -1 : 0; @@ -1348,7 +1349,7 @@ void helper_pfcmpeq(CPUX86State *env, MMXReg *d, MMXR= eg *s) &env->mmx_status) ? -1 : 0; } =20 -void helper_pfcmpge(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfcmpge)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_L(0) =3D float32_le(s->MMX_S(0), d->MMX_S(0), &env->mmx_status) ? -1 : 0; @@ -1356,7 +1357,7 @@ void helper_pfcmpge(CPUX86State *env, MMXReg *d, MMXR= eg *s) &env->mmx_status) ? -1 : 0; } =20 -void helper_pfcmpgt(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfcmpgt)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_L(0) =3D float32_lt(s->MMX_S(0), d->MMX_S(0), &env->mmx_status) ? -1 : 0; @@ -1364,7 +1365,7 @@ void helper_pfcmpgt(CPUX86State *env, MMXReg *d, MMXR= eg *s) &env->mmx_status) ? -1 : 0; } =20 -void helper_pfmax(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfmax)(CPUX86State *env, MMXReg *d, MMXReg *s) { if (float32_lt(d->MMX_S(0), s->MMX_S(0), &env->mmx_status)) { d->MMX_S(0) =3D s->MMX_S(0); @@ -1374,7 +1375,7 @@ void helper_pfmax(CPUX86State *env, MMXReg *d, MMXReg= *s) } } =20 -void helper_pfmin(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfmin)(CPUX86State *env, MMXReg *d, MMXReg *s) { if (float32_lt(s->MMX_S(0), d->MMX_S(0), &env->mmx_status)) { d->MMX_S(0) =3D s->MMX_S(0); @@ -1384,13 +1385,13 @@ void helper_pfmin(CPUX86State *env, MMXReg *d, MMXR= eg *s) } } =20 -void helper_pfmul(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfmul)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_S(0) =3D float32_mul(d->MMX_S(0), s->MMX_S(0), &env->mmx_status= ); d->MMX_S(1) =3D float32_mul(d->MMX_S(1), s->MMX_S(1), &env->mmx_status= ); } =20 -void helper_pfnacc(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfnacc)(CPUX86State *env, MMXReg *d, MMXReg *s) { float32 r; =20 @@ -1399,7 +1400,7 @@ void helper_pfnacc(CPUX86State *env, MMXReg *d, MMXRe= g *s) d->MMX_S(0) =3D r; } =20 -void helper_pfpnacc(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfpnacc)(CPUX86State *env, MMXReg *d, MMXReg *s) { float32 r; =20 @@ -1408,13 +1409,13 @@ void helper_pfpnacc(CPUX86State *env, MMXReg *d, MM= XReg *s) d->MMX_S(0) =3D r; } =20 -void helper_pfrcp(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfrcp)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_S(0) =3D float32_div(float32_one, s->MMX_S(0), &env->mmx_status= ); d->MMX_S(1) =3D d->MMX_S(0); } =20 -void helper_pfrsqrt(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfrsqrt)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_L(1) =3D s->MMX_L(0) & 0x7fffffff; d->MMX_S(1) =3D float32_div(float32_one, @@ -1424,19 +1425,19 @@ void helper_pfrsqrt(CPUX86State *env, MMXReg *d, MM= XReg *s) d->MMX_L(0) =3D d->MMX_L(1); } =20 -void helper_pfsub(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfsub)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_S(0) =3D float32_sub(d->MMX_S(0), s->MMX_S(0), &env->mmx_status= ); d->MMX_S(1) =3D float32_sub(d->MMX_S(1), s->MMX_S(1), &env->mmx_status= ); } =20 -void helper_pfsubr(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pfsubr)(CPUX86State *env, MMXReg *d, MMXReg *s) { d->MMX_S(0) =3D float32_sub(s->MMX_S(0), d->MMX_S(0), &env->mmx_status= ); d->MMX_S(1) =3D float32_sub(s->MMX_S(1), d->MMX_S(1), &env->mmx_status= ); } =20 -void helper_pswapd(CPUX86State *env, MMXReg *d, MMXReg *s) +void HELPER(pswapd)(CPUX86State *env, MMXReg *d, MMXReg *s) { uint32_t r; =20 @@ -1447,7 +1448,7 @@ void helper_pswapd(CPUX86State *env, MMXReg *d, MMXRe= g *s) #endif =20 /* SSSE3 op helpers */ -void glue(helper_pshufb, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void glue(HELPER(pshufb), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { int i; #if SHIFT =3D=3D 0 @@ -1473,7 +1474,7 @@ void glue(helper_pshufb, SUFFIX)(CPUX86State *env, Re= g *d, Reg *v, Reg *s) } =20 #define SSE_HELPER_HW(name, F) \ -void glue(helper_ ## name, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) \ +void HELPER(glue(name, SUFFIX))(CPUX86State *env, Reg *d, Reg *v, Reg *s) = \ { \ uint16_t r[4 << SHIFT]; \ int i, j, k; \ @@ -1491,7 +1492,7 @@ void glue(helper_ ## name, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) \ } =20 #define SSE_HELPER_HL(name, F) \ -void glue(helper_ ## name, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) \ +void HELPER(glue(name, SUFFIX))(CPUX86State *env, Reg *d, Reg *v, Reg *s) = \ { \ uint32_t r[2 << SHIFT]; \ int i, j, k; \ @@ -1518,7 +1519,7 @@ SSE_HELPER_HL(phsubd, FSUB) #undef SSE_HELPER_HW #undef SSE_HELPER_HL =20 -void glue(helper_pmaddubsw, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg = *s) +void glue(HELPER(pmaddubsw), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg= *s) { int i; for (i =3D 0; i < 4 << SHIFT; i++) { @@ -1528,16 +1529,16 @@ void glue(helper_pmaddubsw, SUFFIX)(CPUX86State *en= v, Reg *d, Reg *v, Reg *s) } =20 #define FMULHRSW(d, s) (((int16_t) d * (int16_t)s + 0x4000) >> 15) -SSE_HELPER_W(helper_pmulhrsw, FMULHRSW) +SSE_HELPER_W(HELPER(pmulhrsw), FMULHRSW) =20 #define FSIGNB(d, s) (s <=3D INT8_MAX ? s ? d : 0 : -(int8_t)d) #define FSIGNW(d, s) (s <=3D INT16_MAX ? s ? d : 0 : -(int16_t)d) #define FSIGNL(d, s) (s <=3D INT32_MAX ? s ? d : 0 : -(int32_t)d) -SSE_HELPER_B(helper_psignb, FSIGNB) -SSE_HELPER_W(helper_psignw, FSIGNW) -SSE_HELPER_L(helper_psignd, FSIGNL) +SSE_HELPER_B(HELPER(psignb), FSIGNB) +SSE_HELPER_W(HELPER(psignw), FSIGNW) +SSE_HELPER_L(HELPER(psignd), FSIGNL) =20 -void glue(helper_palignr, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, +void glue(HELPER(palignr), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s, uint32_t imm) { int i; @@ -1600,11 +1601,11 @@ void glue(helper_palignr, SUFFIX)(CPUX86State *env,= Reg *d, Reg *v, Reg *s, #define FBLENDVB(v, s, m) ((m & 0x80) ? s : v) #define FBLENDVPS(v, s, m) ((m & 0x80000000) ? s : v) #define FBLENDVPD(v, s, m) ((m & 0x8000000000000000LL) ? s : v) -SSE_HELPER_V(helper_pblendvb, B, 8 << SHIFT, FBLENDVB) -SSE_HELPER_V(helper_blendvps, L, 2 << SHIFT, FBLENDVPS) -SSE_HELPER_V(helper_blendvpd, Q, 1 << SHIFT, FBLENDVPD) +SSE_HELPER_V(HELPER(pblendvb), B, 8 << SHIFT, FBLENDVB) +SSE_HELPER_V(HELPER(blendvps), L, 2 << SHIFT, FBLENDVPS) +SSE_HELPER_V(HELPER(blendvpd), Q, 1 << SHIFT, FBLENDVPD) =20 -void glue(helper_ptest, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(ptest), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { uint64_t zf =3D 0, cf =3D 0; int i; @@ -1631,24 +1632,24 @@ void glue(helper_ptest, SUFFIX)(CPUX86State *env, R= eg *d, Reg *s) } =20 #if SHIFT > 0 -SSE_HELPER_F(helper_pmovsxbw, W, 4 << SHIFT, (int8_t) s->B) -SSE_HELPER_F(helper_pmovsxbd, L, 2 << SHIFT, (int8_t) s->B) -SSE_HELPER_F(helper_pmovsxbq, Q, 1 << SHIFT, (int8_t) s->B) -SSE_HELPER_F(helper_pmovsxwd, L, 2 << SHIFT, (int16_t) s->W) -SSE_HELPER_F(helper_pmovsxwq, Q, 1 << SHIFT, (int16_t) s->W) -SSE_HELPER_F(helper_pmovsxdq, Q, 1 << SHIFT, (int32_t) s->L) -SSE_HELPER_F(helper_pmovzxbw, W, 4 << SHIFT, s->B) -SSE_HELPER_F(helper_pmovzxbd, L, 2 << SHIFT, s->B) -SSE_HELPER_F(helper_pmovzxbq, Q, 1 << SHIFT, s->B) -SSE_HELPER_F(helper_pmovzxwd, L, 2 << SHIFT, s->W) -SSE_HELPER_F(helper_pmovzxwq, Q, 1 << SHIFT, s->W) -SSE_HELPER_F(helper_pmovzxdq, Q, 1 << SHIFT, s->L) -SSE_HELPER_F(helper_pmovsldup, L, 2 << SHIFT, FMOVSLDUP) -SSE_HELPER_F(helper_pmovshdup, L, 2 << SHIFT, FMOVSHDUP) -SSE_HELPER_F(helper_pmovdldup, Q, 1 << SHIFT, FMOVDLDUP) +SSE_HELPER_F(HELPER(pmovsxbw), W, 4 << SHIFT, (int8_t) s->B) +SSE_HELPER_F(HELPER(pmovsxbd), L, 2 << SHIFT, (int8_t) s->B) +SSE_HELPER_F(HELPER(pmovsxbq), Q, 1 << SHIFT, (int8_t) s->B) +SSE_HELPER_F(HELPER(pmovsxwd), L, 2 << SHIFT, (int16_t) s->W) +SSE_HELPER_F(HELPER(pmovsxwq), Q, 1 << SHIFT, (int16_t) s->W) +SSE_HELPER_F(HELPER(pmovsxdq), Q, 1 << SHIFT, (int32_t) s->L) +SSE_HELPER_F(HELPER(pmovzxbw), W, 4 << SHIFT, s->B) +SSE_HELPER_F(HELPER(pmovzxbd), L, 2 << SHIFT, s->B) +SSE_HELPER_F(HELPER(pmovzxbq), Q, 1 << SHIFT, s->B) +SSE_HELPER_F(HELPER(pmovzxwd), L, 2 << SHIFT, s->W) +SSE_HELPER_F(HELPER(pmovzxwq), Q, 1 << SHIFT, s->W) +SSE_HELPER_F(HELPER(pmovzxdq), Q, 1 << SHIFT, s->L) +SSE_HELPER_F(HELPER(pmovsldup), L, 2 << SHIFT, FMOVSLDUP) +SSE_HELPER_F(HELPER(pmovshdup), L, 2 << SHIFT, FMOVSHDUP) +SSE_HELPER_F(HELPER(pmovdldup), Q, 1 << SHIFT, FMOVDLDUP) #endif =20 -void glue(helper_pmuldq, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void glue(HELPER(pmuldq), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { int i; =20 @@ -1657,7 +1658,7 @@ void glue(helper_pmuldq, SUFFIX)(CPUX86State *env, Re= g *d, Reg *v, Reg *s) } } =20 -void glue(helper_packusdw, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s) +void glue(HELPER(packusdw), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg = *s) { uint16_t r[8]; int i, j, k; @@ -1678,7 +1679,7 @@ void glue(helper_packusdw, SUFFIX)(CPUX86State *env, = Reg *d, Reg *v, Reg *s) } =20 #if SHIFT =3D=3D 1 -void glue(helper_phminposuw, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(phminposuw), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { int idx =3D 0; =20 @@ -1711,7 +1712,7 @@ void glue(helper_phminposuw, SUFFIX)(CPUX86State *env= , Reg *d, Reg *s) } #endif =20 -void glue(helper_roundps, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, +void glue(HELPER(roundps), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, uint32_t mode) { int old_flags =3D get_float_exception_flags(&env->sse_status); @@ -1734,7 +1735,7 @@ void glue(helper_roundps, SUFFIX)(CPUX86State *env, R= eg *d, Reg *s, set_float_rounding_mode(prev_rounding_mode, &env->sse_status); } =20 -void glue(helper_roundpd, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, +void glue(HELPER(roundpd), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, uint32_t mode) { int old_flags =3D get_float_exception_flags(&env->sse_status); @@ -1758,7 +1759,7 @@ void glue(helper_roundpd, SUFFIX)(CPUX86State *env, R= eg *d, Reg *s, } =20 #if SHIFT =3D=3D 1 -void glue(helper_roundss, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, +void glue(HELPER(roundss), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s, uint32_t mode) { int old_flags =3D get_float_exception_flags(&env->sse_status); @@ -1782,7 +1783,7 @@ void glue(helper_roundss, SUFFIX)(CPUX86State *env, R= eg *d, Reg *v, Reg *s, set_float_rounding_mode(prev_rounding_mode, &env->sse_status); } =20 -void glue(helper_roundsd, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, +void glue(HELPER(roundsd), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s, uint32_t mode) { int old_flags =3D get_float_exception_flags(&env->sse_status); @@ -1808,11 +1809,11 @@ void glue(helper_roundsd, SUFFIX)(CPUX86State *env,= Reg *d, Reg *v, Reg *s, #endif =20 #define FBLENDP(v, s, m) (m ? s : v) -SSE_HELPER_I(helper_blendps, L, 2 << SHIFT, FBLENDP) -SSE_HELPER_I(helper_blendpd, Q, 1 << SHIFT, FBLENDP) -SSE_HELPER_I(helper_pblendw, W, 4 << SHIFT, FBLENDP) +SSE_HELPER_I(HELPER(blendps), L, 2 << SHIFT, FBLENDP) +SSE_HELPER_I(HELPER(blendpd), Q, 1 << SHIFT, FBLENDP) +SSE_HELPER_I(HELPER(pblendw), W, 4 << SHIFT, FBLENDP) =20 -void glue(helper_dpps, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, +void glue(HELPER(dpps), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, uint32_t mask) { float32 prod1, prod2, temp2, temp3, temp4; @@ -1856,7 +1857,7 @@ void glue(helper_dpps, SUFFIX)(CPUX86State *env, Reg = *d, Reg *v, Reg *s, =20 #if SHIFT =3D=3D 1 /* Oddly, there is no ymm version of dppd */ -void glue(helper_dppd, SUFFIX)(CPUX86State *env, +void glue(HELPER(dppd), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, uint32_t mask) { float64 prod1, prod2, temp2; @@ -1877,7 +1878,7 @@ void glue(helper_dppd, SUFFIX)(CPUX86State *env, } #endif =20 -void glue(helper_mpsadbw, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, +void glue(HELPER(mpsadbw), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *= s, uint32_t offset) { int i, j; @@ -2033,7 +2034,7 @@ static inline unsigned pcmpxstrx(CPUX86State *env, Re= g *d, Reg *s, return res; } =20 -void glue(helper_pcmpestri, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, +void glue(HELPER(pcmpestri), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, uint32_t ctrl) { unsigned int res =3D pcmpxstrx(env, d, s, ctrl, @@ -2047,7 +2048,7 @@ void glue(helper_pcmpestri, SUFFIX)(CPUX86State *env,= Reg *d, Reg *s, } } =20 -void glue(helper_pcmpestrm, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, +void glue(HELPER(pcmpestrm), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, uint32_t ctrl) { int i; @@ -2071,7 +2072,7 @@ void glue(helper_pcmpestrm, SUFFIX)(CPUX86State *env,= Reg *d, Reg *s, } } =20 -void glue(helper_pcmpistri, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, +void glue(HELPER(pcmpistri), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, uint32_t ctrl) { unsigned int res =3D pcmpxstrx(env, d, s, ctrl, @@ -2085,7 +2086,7 @@ void glue(helper_pcmpistri, SUFFIX)(CPUX86State *env,= Reg *d, Reg *s, } } =20 -void glue(helper_pcmpistrm, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, +void glue(HELPER(pcmpistrm), SUFFIX)(CPUX86State *env, Reg *d, Reg *s, uint32_t ctrl) { int i; @@ -2111,7 +2112,7 @@ void glue(helper_pcmpistrm, SUFFIX)(CPUX86State *env,= Reg *d, Reg *s, =20 #define CRCPOLY 0x1edc6f41 #define CRCPOLY_BITREV 0x82f63b78 -target_ulong helper_crc32(uint32_t crc1, target_ulong msg, uint32_t len) +target_ulong HELPER(crc32)(uint32_t crc1, target_ulong msg, uint32_t len) { target_ulong crc =3D (msg & ((target_ulong) -1 >> (TARGET_LONG_BITS - len))) ^ crc1; @@ -2125,7 +2126,7 @@ target_ulong helper_crc32(uint32_t crc1, target_ulong= msg, uint32_t len) =20 #endif =20 -void glue(helper_pclmulqdq, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg = *s, +void glue(HELPER(pclmulqdq), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg= *s, uint32_t ctrl) { int a_idx =3D (ctrl & 1) !=3D 0; @@ -2140,7 +2141,7 @@ void glue(helper_pclmulqdq, SUFFIX)(CPUX86State *env,= Reg *d, Reg *v, Reg *s, } } =20 -void glue(helper_aesdec, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void glue(HELPER(aesdec), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { for (int i =3D 0; i < SHIFT; i++) { AESState *ad =3D (AESState *)&d->ZMM_X(i); @@ -2151,7 +2152,7 @@ void glue(helper_aesdec, SUFFIX)(CPUX86State *env, Re= g *d, Reg *v, Reg *s) } } =20 -void glue(helper_aesdeclast, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg= *s) +void glue(HELPER(aesdeclast), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Re= g *s) { for (int i =3D 0; i < SHIFT; i++) { AESState *ad =3D (AESState *)&d->ZMM_X(i); @@ -2162,7 +2163,7 @@ void glue(helper_aesdeclast, SUFFIX)(CPUX86State *env= , Reg *d, Reg *v, Reg *s) } } =20 -void glue(helper_aesenc, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) +void glue(HELPER(aesenc), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { for (int i =3D 0; i < SHIFT; i++) { AESState *ad =3D (AESState *)&d->ZMM_X(i); @@ -2173,7 +2174,7 @@ void glue(helper_aesenc, SUFFIX)(CPUX86State *env, Re= g *d, Reg *v, Reg *s) } } =20 -void glue(helper_aesenclast, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg= *s) +void glue(HELPER(aesenclast), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Re= g *s) { for (int i =3D 0; i < SHIFT; i++) { AESState *ad =3D (AESState *)&d->ZMM_X(i); @@ -2185,7 +2186,7 @@ void glue(helper_aesenclast, SUFFIX)(CPUX86State *env= , Reg *d, Reg *v, Reg *s) } =20 #if SHIFT =3D=3D 1 -void glue(helper_aesimc, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(aesimc), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { AESState *ad =3D (AESState *)&d->ZMM_X(0); AESState *st =3D (AESState *)&s->ZMM_X(0); @@ -2193,7 +2194,7 @@ void glue(helper_aesimc, SUFFIX)(CPUX86State *env, Re= g *d, Reg *s) aesdec_IMC(ad, st, false); } =20 -void glue(helper_aeskeygenassist, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, +void glue(HELPER(aeskeygenassist), SUFFIX)(CPUX86State *env, Reg *d, Reg *= s, uint32_t ctrl) { int i; @@ -2210,7 +2211,7 @@ void glue(helper_aeskeygenassist, SUFFIX)(CPUX86State= *env, Reg *d, Reg *s, #endif =20 #if SHIFT >=3D 1 -void glue(helper_vpermilpd, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg = *s) +void glue(HELPER(vpermilpd), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg= *s) { uint64_t r0, r1; int i; @@ -2223,7 +2224,7 @@ void glue(helper_vpermilpd, SUFFIX)(CPUX86State *env,= Reg *d, Reg *v, Reg *s) } } =20 -void glue(helper_vpermilps, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg = *s) +void glue(HELPER(vpermilps), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg= *s) { uint32_t r0, r1, r2, r3; int i; @@ -2240,7 +2241,7 @@ void glue(helper_vpermilps, SUFFIX)(CPUX86State *env,= Reg *d, Reg *v, Reg *s) } } =20 -void glue(helper_vpermilpd_imm, SUFFIX)(Reg *d, Reg *s, uint32_t order) +void glue(HELPER(vpermilpd_imm), SUFFIX)(Reg *d, Reg *s, uint32_t order) { uint64_t r0, r1; int i; @@ -2255,7 +2256,7 @@ void glue(helper_vpermilpd_imm, SUFFIX)(Reg *d, Reg *= s, uint32_t order) } } =20 -void glue(helper_vpermilps_imm, SUFFIX)(Reg *d, Reg *s, uint32_t order) +void glue(HELPER(vpermilps_imm), SUFFIX)(Reg *d, Reg *s, uint32_t order) { uint32_t r0, r1, r2, r3; int i; @@ -2281,15 +2282,15 @@ void glue(helper_vpermilps_imm, SUFFIX)(Reg *d, Reg= *s, uint32_t order) #define FPSLLVQ(x, c) (c < 64 ? ((x) << c) : 0) #endif =20 -SSE_HELPER_L(helper_vpsrlvd, FPSRLVD) -SSE_HELPER_L(helper_vpsravd, FPSRAVD) -SSE_HELPER_L(helper_vpsllvd, FPSLLVD) +SSE_HELPER_L(HELPER(vpsrlvd), FPSRLVD) +SSE_HELPER_L(HELPER(vpsravd), FPSRAVD) +SSE_HELPER_L(HELPER(vpsllvd), FPSLLVD) =20 -SSE_HELPER_Q(helper_vpsrlvq, FPSRLVQ) -SSE_HELPER_Q(helper_vpsravq, FPSRAVQ) -SSE_HELPER_Q(helper_vpsllvq, FPSLLVQ) +SSE_HELPER_Q(HELPER(vpsrlvq), FPSRLVQ) +SSE_HELPER_Q(HELPER(vpsravq), FPSRAVQ) +SSE_HELPER_Q(HELPER(vpsllvq), FPSLLVQ) =20 -void glue(helper_vtestps, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(vtestps), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { uint32_t zf =3D 0, cf =3D 0; int i; @@ -2302,7 +2303,7 @@ void glue(helper_vtestps, SUFFIX)(CPUX86State *env, R= eg *d, Reg *s) CC_OP =3D CC_OP_EFLAGS; } =20 -void glue(helper_vtestpd, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) +void glue(HELPER(vtestpd), SUFFIX)(CPUX86State *env, Reg *d, Reg *s) { uint64_t zf =3D 0, cf =3D 0; int i; @@ -2315,7 +2316,7 @@ void glue(helper_vtestpd, SUFFIX)(CPUX86State *env, R= eg *d, Reg *s) CC_OP =3D CC_OP_EFLAGS; } =20 -void glue(helper_vpmaskmovd_st, SUFFIX)(CPUX86State *env, +void glue(HELPER(vpmaskmovd_st), SUFFIX)(CPUX86State *env, Reg *v, Reg *s, target_ulong a0) { int i; @@ -2327,7 +2328,7 @@ void glue(helper_vpmaskmovd_st, SUFFIX)(CPUX86State *= env, } } =20 -void glue(helper_vpmaskmovq_st, SUFFIX)(CPUX86State *env, +void glue(HELPER(vpmaskmovq_st), SUFFIX)(CPUX86State *env, Reg *v, Reg *s, target_ulong a0) { int i; @@ -2339,7 +2340,7 @@ void glue(helper_vpmaskmovq_st, SUFFIX)(CPUX86State *= env, } } =20 -void glue(helper_vpmaskmovd, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg= *s) +void glue(HELPER(vpmaskmovd), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Re= g *s) { int i; =20 @@ -2348,7 +2349,7 @@ void glue(helper_vpmaskmovd, SUFFIX)(CPUX86State *env= , Reg *d, Reg *v, Reg *s) } } =20 -void glue(helper_vpmaskmovq, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg= *s) +void glue(HELPER(vpmaskmovq), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Re= g *s) { int i; =20 @@ -2357,7 +2358,7 @@ void glue(helper_vpmaskmovq, SUFFIX)(CPUX86State *env= , Reg *d, Reg *v, Reg *s) } } =20 -void glue(helper_vpgatherdd, SUFFIX)(CPUX86State *env, +void glue(HELPER(vpgatherdd), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, target_ulong a0, unsigned scale, target_ul= ong amask) { int i; @@ -2371,7 +2372,7 @@ void glue(helper_vpgatherdd, SUFFIX)(CPUX86State *env, } } =20 -void glue(helper_vpgatherdq, SUFFIX)(CPUX86State *env, +void glue(HELPER(vpgatherdq), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, target_ulong a0, unsigned scale, target_ul= ong amask) { int i; @@ -2385,7 +2386,7 @@ void glue(helper_vpgatherdq, SUFFIX)(CPUX86State *env, } } =20 -void glue(helper_vpgatherqd, SUFFIX)(CPUX86State *env, +void glue(HELPER(vpgatherqd), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, target_ulong a0, unsigned scale, target_ul= ong amask) { int i; @@ -2403,7 +2404,7 @@ void glue(helper_vpgatherqd, SUFFIX)(CPUX86State *env, } } =20 -void glue(helper_vpgatherqq, SUFFIX)(CPUX86State *env, +void glue(HELPER(vpgatherqq), SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, target_ulong a0, unsigned scale, target_ul= ong amask) { int i; @@ -2419,7 +2420,7 @@ void glue(helper_vpgatherqq, SUFFIX)(CPUX86State *env, #endif =20 #if SHIFT >=3D 2 -void helper_vpermdq_ymm(Reg *d, Reg *v, Reg *s, uint32_t order) +void HELPER(vpermdq_ymm)(Reg *d, Reg *v, Reg *s, uint32_t order) { uint64_t r0, r1, r2, r3; =20 @@ -2477,7 +2478,7 @@ void helper_vpermdq_ymm(Reg *d, Reg *v, Reg *s, uint3= 2_t order) } } =20 -void helper_vpermq_ymm(Reg *d, Reg *s, uint32_t order) +void HELPER(vpermq_ymm)(Reg *d, Reg *s, uint32_t order) { uint64_t r0, r1, r2, r3; r0 =3D s->Q(order & 3); @@ -2490,7 +2491,7 @@ void helper_vpermq_ymm(Reg *d, Reg *s, uint32_t order) d->Q(3) =3D r3; } =20 -void helper_vpermd_ymm(Reg *d, Reg *v, Reg *s) +void HELPER(vpermd_ymm)(Reg *d, Reg *v, Reg *s) { uint32_t r[8]; int i; @@ -2522,13 +2523,13 @@ void helper_vpermd_ymm(Reg *d, Reg *v, Reg *s) } = \ } =20 -SSE_HELPER_FMAS(helper_fma4ss, ZMM_S, float32_muladd) -SSE_HELPER_FMAS(helper_fma4sd, ZMM_D, float64_muladd) +SSE_HELPER_FMAS(HELPER(fma4ss), ZMM_S, float32_muladd) +SSE_HELPER_FMAS(HELPER(fma4sd), ZMM_D, float64_muladd) #endif =20 #if SHIFT >=3D 1 -SSE_HELPER_FMAP(helper_fma4ps, ZMM_S, 2 << SHIFT, float32_muladd) -SSE_HELPER_FMAP(helper_fma4pd, ZMM_D, 1 << SHIFT, float64_muladd) +SSE_HELPER_FMAP(HELPER(fma4ps), ZMM_S, 2 << SHIFT, float32_muladd) +SSE_HELPER_FMAP(HELPER(fma4pd), ZMM_D, 1 << SHIFT, float64_muladd) #endif =20 #if SHIFT =3D=3D 1 @@ -2562,12 +2563,12 @@ SSE_HELPER_FMAP(helper_fma4pd, ZMM_D, 1 << SHIFT, = float64_muladd) #define SHA1_F1(b, c, d) ((b) ^ (c) ^ (d)) #define SHA1_F2(b, c, d) (((b) & (c)) ^ ((b) & (d)) ^ ((c) & (d))) =20 -SSE_HELPER_SHA1RNDS4(helper_sha1rnds4_f0, SHA1_F0, 0x5A827999) -SSE_HELPER_SHA1RNDS4(helper_sha1rnds4_f1, SHA1_F1, 0x6ED9EBA1) -SSE_HELPER_SHA1RNDS4(helper_sha1rnds4_f2, SHA1_F2, 0x8F1BBCDC) -SSE_HELPER_SHA1RNDS4(helper_sha1rnds4_f3, SHA1_F1, 0xCA62C1D6) +SSE_HELPER_SHA1RNDS4(HELPER(sha1rnds4_f0), SHA1_F0, 0x5A827999) +SSE_HELPER_SHA1RNDS4(HELPER(sha1rnds4_f1), SHA1_F1, 0x6ED9EBA1) +SSE_HELPER_SHA1RNDS4(HELPER(sha1rnds4_f2), SHA1_F2, 0x8F1BBCDC) +SSE_HELPER_SHA1RNDS4(HELPER(sha1rnds4_f3), SHA1_F1, 0xCA62C1D6) =20 -void helper_sha1nexte(Reg *d, Reg *a, Reg *b) +void HELPER(sha1nexte)(Reg *d, Reg *a, Reg *b) { d->L(3) =3D b->L(3) + rol32(a->L(3), 30); d->L(2) =3D b->L(2); @@ -2575,7 +2576,7 @@ void helper_sha1nexte(Reg *d, Reg *a, Reg *b) d->L(0) =3D b->L(0); } =20 -void helper_sha1msg1(Reg *d, Reg *a, Reg *b) +void HELPER(sha1msg1)(Reg *d, Reg *a, Reg *b) { /* These could be overwritten by the first two assignments, save them.= */ uint32_t b3 =3D b->L(3); @@ -2587,7 +2588,7 @@ void helper_sha1msg1(Reg *d, Reg *a, Reg *b) d->L(0) =3D a->L(0) ^ b2; } =20 -void helper_sha1msg2(Reg *d, Reg *a, Reg *b) +void HELPER(sha1msg2)(Reg *d, Reg *a, Reg *b) { d->L(3) =3D rol32(a->L(3) ^ b->L(2), 1); d->L(2) =3D rol32(a->L(2) ^ b->L(1), 1); @@ -2603,7 +2604,7 @@ void helper_sha1msg2(Reg *d, Reg *a, Reg *b) #define SHA256_MSGS0(w) (ror32((w), 7) ^ ror32((w), 18) ^ ((w) >> 3)) #define SHA256_MSGS1(w) (ror32((w), 17) ^ ror32((w), 19) ^ ((w) >> 10)) =20 -void helper_sha256rnds2(Reg *d, Reg *a, Reg *b, uint32_t wk0, uint32_t wk1) +void HELPER(sha256rnds2)(Reg *d, Reg *a, Reg *b, uint32_t wk0, uint32_t wk= 1) { uint32_t t, AA, EE; =20 @@ -2637,7 +2638,7 @@ void helper_sha256rnds2(Reg *d, Reg *a, Reg *b, uint3= 2_t wk0, uint32_t wk1) d->L(1) =3D EE; } =20 -void helper_sha256msg1(Reg *d, Reg *a, Reg *b) +void HELPER(sha256msg1)(Reg *d, Reg *a, Reg *b) { /* b->L(0) could be overwritten by the first assignment, save it. */ uint32_t b0 =3D b->L(0); @@ -2648,7 +2649,7 @@ void helper_sha256msg1(Reg *d, Reg *a, Reg *b) d->L(3) =3D a->L(3) + SHA256_MSGS0(b0); } =20 -void helper_sha256msg2(Reg *d, Reg *a, Reg *b) +void HELPER(sha256msg2)(Reg *d, Reg *a, Reg *b) { /* Earlier assignments cannot overwrite any of the two operands. */ d->L(0) =3D a->L(0) + SHA256_MSGS1(b->L(2)); diff --git a/target/i386/tcg/bpt_helper.c b/target/i386/tcg/bpt_helper.c index bc34ac27fea..573f74bcb45 100644 --- a/target/i386/tcg/bpt_helper.c +++ b/target/i386/tcg/bpt_helper.c @@ -22,7 +22,7 @@ #include "exec/helper-proto.h" #include "helper-tcg.h" =20 -G_NORETURN void helper_single_step(CPUX86State *env) +G_NORETURN void HELPER(single_step)(CPUX86State *env) { #ifndef CONFIG_USER_ONLY check_hw_breakpoints(env, true); @@ -31,9 +31,9 @@ G_NORETURN void helper_single_step(CPUX86State *env) raise_exception(env, EXCP01_DB); } =20 -void helper_rechecking_single_step(CPUX86State *env) +void HELPER(rechecking_single_step)(CPUX86State *env) { if ((env->eflags & TF_MASK) !=3D 0) { - helper_single_step(env); + HELPER(single_step)(env); } } diff --git a/target/i386/tcg/cc_helper.c b/target/i386/tcg/cc_helper.c index b868ef2949f..d9fcd2d9203 100644 --- a/target/i386/tcg/cc_helper.c +++ b/target/i386/tcg/cc_helper.c @@ -60,7 +60,7 @@ static target_ulong compute_all_adcox(target_ulong dst, t= arget_ulong src1, return (src1 & ~(CC_C | CC_O)) | (dst * CC_C) | (src2 * CC_O); } =20 -target_ulong helper_cc_compute_nz(target_ulong dst, target_ulong src1, +target_ulong HELPER(cc_compute_nz)(target_ulong dst, target_ulong src1, int op) { if (CC_OP_HAS_EFLAGS(op)) { @@ -86,7 +86,7 @@ static inline uint32_t compute_aco_mul(target_long src1) return cf + af + of; } =20 -target_ulong helper_cc_compute_all(target_ulong dst, target_ulong src1, +target_ulong HELPER(cc_compute_all)(target_ulong dst, target_ulong src1, target_ulong src2, int op) { uint32_t flags =3D 0; @@ -300,10 +300,10 @@ psz_q: =20 uint32_t cpu_cc_compute_all(CPUX86State *env) { - return helper_cc_compute_all(CC_DST, CC_SRC, CC_SRC2, CC_OP); + return HELPER(cc_compute_all)(CC_DST, CC_SRC, CC_SRC2, CC_OP); } =20 -target_ulong helper_cc_compute_c(target_ulong dst, target_ulong src1, +target_ulong HELPER(cc_compute_c)(target_ulong dst, target_ulong src1, target_ulong src2, int op) { switch (op) { @@ -418,13 +418,13 @@ target_ulong helper_cc_compute_c(target_ulong dst, ta= rget_ulong src1, } } =20 -void helper_write_eflags(CPUX86State *env, target_ulong t0, +void HELPER(write_eflags)(CPUX86State *env, target_ulong t0, uint32_t update_mask) { cpu_load_eflags(env, t0, update_mask); } =20 -target_ulong helper_read_eflags(CPUX86State *env) +target_ulong HELPER(read_eflags)(CPUX86State *env) { uint32_t eflags; =20 @@ -436,7 +436,7 @@ target_ulong helper_read_eflags(CPUX86State *env) return eflags; } =20 -void helper_clts(CPUX86State *env) +void HELPER(clts)(CPUX86State *env) { env->cr[0] &=3D ~CR0_TS_MASK; env->hflags &=3D ~HF_TS_MASK; diff --git a/target/i386/tcg/excp_helper.c b/target/i386/tcg/excp_helper.c index f1b9b188ecd..1df380d53a9 100644 --- a/target/i386/tcg/excp_helper.c +++ b/target/i386/tcg/excp_helper.c @@ -26,18 +26,18 @@ #include "helper-tcg.h" #include "qemu/plugin.h" =20 -G_NORETURN void helper_raise_interrupt(CPUX86State *env, int intno, +G_NORETURN void HELPER(raise_interrupt)(CPUX86State *env, int intno, int next_eip_addend) { raise_interrupt(env, intno, next_eip_addend); } =20 -G_NORETURN void helper_raise_exception(CPUX86State *env, int exception_ind= ex) +G_NORETURN void HELPER(raise_exception)(CPUX86State *env, int exception_in= dex) { raise_exception(env, exception_index); } =20 -G_NORETURN void helper_raise_gpf(CPUX86State *env) +G_NORETURN void HELPER(raise_gpf)(CPUX86State *env) { raise_exception_err_ra(env, EXCP0D_GPF, 0, GETPC()); } @@ -151,7 +151,7 @@ G_NORETURN void raise_exception_ra(CPUX86State *env, in= t exception_index, raise_interrupt2(env, exception_index, 0, 0, 0, retaddr); } =20 -G_NORETURN void helper_icebp(CPUX86State *env) +G_NORETURN void HELPER(icebp)(CPUX86State *env) { CPUState *cs =3D env_cpu(env); =20 diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 4bbac996326..ef4ca2a0c46 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -238,7 +238,7 @@ static void fpu_raise_exception(CPUX86State *env, uintp= tr_t retaddr) #endif } =20 -void helper_flds_FT0(CPUX86State *env, uint32_t val) +void HELPER(flds_FT0)(CPUX86State *env, uint32_t val) { int old_flags =3D save_exception_flags(env); union { @@ -251,7 +251,7 @@ void helper_flds_FT0(CPUX86State *env, uint32_t val) merge_exception_flags(env, old_flags); } =20 -void helper_fldl_FT0(CPUX86State *env, uint64_t val) +void HELPER(fldl_FT0)(CPUX86State *env, uint64_t val) { int old_flags =3D save_exception_flags(env); union { @@ -264,12 +264,12 @@ void helper_fldl_FT0(CPUX86State *env, uint64_t val) merge_exception_flags(env, old_flags); } =20 -void helper_fildl_FT0(CPUX86State *env, int32_t val) +void HELPER(fildl_FT0)(CPUX86State *env, int32_t val) { FT0 =3D int32_to_floatx80(val, &env->fp_status); } =20 -void helper_flds_ST0(CPUX86State *env, uint32_t val) +void HELPER(flds_ST0)(CPUX86State *env, uint32_t val) { int old_flags =3D save_exception_flags(env); int new_fpstt; @@ -286,7 +286,7 @@ void helper_flds_ST0(CPUX86State *env, uint32_t val) merge_exception_flags(env, old_flags); } =20 -void helper_fldl_ST0(CPUX86State *env, uint64_t val) +void HELPER(fldl_ST0)(CPUX86State *env, uint64_t val) { int old_flags =3D save_exception_flags(env); int new_fpstt; @@ -310,7 +310,7 @@ static FloatX80RoundPrec tmp_maximise_precision(float_s= tatus *st) return old; } =20 -void helper_fildl_ST0(CPUX86State *env, int32_t val) +void HELPER(fildl_ST0)(CPUX86State *env, int32_t val) { int new_fpstt; FloatX80RoundPrec old =3D tmp_maximise_precision(&env->fp_status); @@ -323,7 +323,7 @@ void helper_fildl_ST0(CPUX86State *env, int32_t val) set_floatx80_rounding_precision(old, &env->fp_status); } =20 -void helper_fildll_ST0(CPUX86State *env, int64_t val) +void HELPER(fildll_ST0)(CPUX86State *env, int64_t val) { int new_fpstt; FloatX80RoundPrec old =3D tmp_maximise_precision(&env->fp_status); @@ -336,7 +336,7 @@ void helper_fildll_ST0(CPUX86State *env, int64_t val) set_floatx80_rounding_precision(old, &env->fp_status); } =20 -uint32_t helper_fsts_ST0(CPUX86State *env) +uint32_t HELPER(fsts_ST0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); union { @@ -349,7 +349,7 @@ uint32_t helper_fsts_ST0(CPUX86State *env) return u.i; } =20 -uint64_t helper_fstl_ST0(CPUX86State *env) +uint64_t HELPER(fstl_ST0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); union { @@ -362,7 +362,7 @@ uint64_t helper_fstl_ST0(CPUX86State *env) return u.i; } =20 -int32_t helper_fist_ST0(CPUX86State *env) +int32_t HELPER(fist_ST0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); int32_t val; @@ -376,7 +376,7 @@ int32_t helper_fist_ST0(CPUX86State *env) return val; } =20 -int32_t helper_fistl_ST0(CPUX86State *env) +int32_t HELPER(fistl_ST0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); int32_t val; @@ -389,7 +389,7 @@ int32_t helper_fistl_ST0(CPUX86State *env) return val; } =20 -int64_t helper_fistll_ST0(CPUX86State *env) +int64_t HELPER(fistll_ST0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); int64_t val; @@ -402,7 +402,7 @@ int64_t helper_fistll_ST0(CPUX86State *env) return val; } =20 -int32_t helper_fistt_ST0(CPUX86State *env) +int32_t HELPER(fistt_ST0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); int32_t val; @@ -416,7 +416,7 @@ int32_t helper_fistt_ST0(CPUX86State *env) return val; } =20 -int32_t helper_fisttl_ST0(CPUX86State *env) +int32_t HELPER(fisttl_ST0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); int32_t val; @@ -429,7 +429,7 @@ int32_t helper_fisttl_ST0(CPUX86State *env) return val; } =20 -int64_t helper_fisttll_ST0(CPUX86State *env) +int64_t HELPER(fisttll_ST0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); int64_t val; @@ -442,7 +442,7 @@ int64_t helper_fisttll_ST0(CPUX86State *env) return val; } =20 -void helper_fldt_ST0(CPUX86State *env, target_ulong ptr) +void HELPER(fldt_ST0)(CPUX86State *env, target_ulong ptr) { int new_fpstt; X86Access ac; @@ -455,7 +455,7 @@ void helper_fldt_ST0(CPUX86State *env, target_ulong ptr) env->fptags[new_fpstt] =3D 0; /* validate stack entry */ } =20 -void helper_fstt_ST0(CPUX86State *env, target_ulong ptr) +void HELPER(fstt_ST0)(CPUX86State *env, target_ulong ptr) { X86Access ac; =20 @@ -463,23 +463,23 @@ void helper_fstt_ST0(CPUX86State *env, target_ulong p= tr) do_fstt(&ac, ptr, ST0); } =20 -void helper_fpush(CPUX86State *env) +void HELPER(fpush)(CPUX86State *env) { fpush(env); } =20 -void helper_fpop(CPUX86State *env) +void HELPER(fpop)(CPUX86State *env) { fpop(env); } =20 -void helper_fdecstp(CPUX86State *env) +void HELPER(fdecstp)(CPUX86State *env) { env->fpstt =3D (env->fpstt - 1) & 7; env->fpus &=3D ~0x4700; } =20 -void helper_fincstp(CPUX86State *env) +void HELPER(fincstp)(CPUX86State *env) { env->fpstt =3D (env->fpstt + 1) & 7; env->fpus &=3D ~0x4700; @@ -487,33 +487,33 @@ void helper_fincstp(CPUX86State *env) =20 /* FPU move */ =20 -void helper_ffree_STN(CPUX86State *env, int st_index) +void HELPER(ffree_STN)(CPUX86State *env, int st_index) { env->fptags[(env->fpstt + st_index) & 7] =3D 1; } =20 -void helper_fmov_ST0_FT0(CPUX86State *env) +void HELPER(fmov_ST0_FT0)(CPUX86State *env) { ST0 =3D FT0; } =20 -void helper_fmov_FT0_STN(CPUX86State *env, int st_index) +void HELPER(fmov_FT0_STN)(CPUX86State *env, int st_index) { FT0 =3D ST(st_index); } =20 -void helper_fmov_ST0_STN(CPUX86State *env, int st_index) +void HELPER(fmov_ST0_STN)(CPUX86State *env, int st_index) { ST0 =3D ST(st_index); } =20 -void helper_fmov_STN_ST0(CPUX86State *env, int st_index) +void HELPER(fmov_STN_ST0)(CPUX86State *env, int st_index) { ST(st_index) =3D ST0; env->fptags[(env->fpstt + st_index) & 7] =3D 0; } =20 -void helper_fxchg_ST0_STN(CPUX86State *env, int st_index) +void HELPER(fxchg_ST0_STN)(CPUX86State *env, int st_index) { floatx80 tmp; =20 @@ -532,7 +532,7 @@ void helper_fxchg_ST0_STN(CPUX86State *env, int st_inde= x) =20 static const int fcom_ccval[4] =3D {0x0100, 0x4000, 0x0000, 0x4500}; =20 -void helper_fcom_ST0_FT0(CPUX86State *env) +void HELPER(fcom_ST0_FT0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); FloatRelation ret; @@ -543,7 +543,7 @@ void helper_fcom_ST0_FT0(CPUX86State *env) merge_exception_flags(env, old_flags); } =20 -void helper_fucom_ST0_FT0(CPUX86State *env) +void HELPER(fucom_ST0_FT0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); FloatRelation ret; @@ -556,7 +556,7 @@ void helper_fucom_ST0_FT0(CPUX86State *env) =20 static const int fcomi_ccval[4] =3D {CC_C, CC_Z, 0, CC_Z | CC_P | CC_C}; =20 -void helper_fcomi_ST0_FT0(CPUX86State *env) +void HELPER(fcomi_ST0_FT0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); FloatRelation ret; @@ -568,7 +568,7 @@ void helper_fcomi_ST0_FT0(CPUX86State *env) merge_exception_flags(env, old_flags); } =20 -void helper_fucomi_ST0_FT0(CPUX86State *env) +void HELPER(fucomi_ST0_FT0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); FloatRelation ret; @@ -580,75 +580,75 @@ void helper_fucomi_ST0_FT0(CPUX86State *env) merge_exception_flags(env, old_flags); } =20 -void helper_fadd_ST0_FT0(CPUX86State *env) +void HELPER(fadd_ST0_FT0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); ST0 =3D floatx80_add(ST0, FT0, &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fmul_ST0_FT0(CPUX86State *env) +void HELPER(fmul_ST0_FT0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); ST0 =3D floatx80_mul(ST0, FT0, &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fsub_ST0_FT0(CPUX86State *env) +void HELPER(fsub_ST0_FT0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); ST0 =3D floatx80_sub(ST0, FT0, &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fsubr_ST0_FT0(CPUX86State *env) +void HELPER(fsubr_ST0_FT0)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); ST0 =3D floatx80_sub(FT0, ST0, &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fdiv_ST0_FT0(CPUX86State *env) +void HELPER(fdiv_ST0_FT0)(CPUX86State *env) { ST0 =3D helper_fdiv(env, ST0, FT0); } =20 -void helper_fdivr_ST0_FT0(CPUX86State *env) +void HELPER(fdivr_ST0_FT0)(CPUX86State *env) { ST0 =3D helper_fdiv(env, FT0, ST0); } =20 /* fp operations between STN and ST0 */ =20 -void helper_fadd_STN_ST0(CPUX86State *env, int st_index) +void HELPER(fadd_STN_ST0)(CPUX86State *env, int st_index) { int old_flags =3D save_exception_flags(env); ST(st_index) =3D floatx80_add(ST(st_index), ST0, &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fmul_STN_ST0(CPUX86State *env, int st_index) +void HELPER(fmul_STN_ST0)(CPUX86State *env, int st_index) { int old_flags =3D save_exception_flags(env); ST(st_index) =3D floatx80_mul(ST(st_index), ST0, &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fsub_STN_ST0(CPUX86State *env, int st_index) +void HELPER(fsub_STN_ST0)(CPUX86State *env, int st_index) { int old_flags =3D save_exception_flags(env); ST(st_index) =3D floatx80_sub(ST(st_index), ST0, &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fsubr_STN_ST0(CPUX86State *env, int st_index) +void HELPER(fsubr_STN_ST0)(CPUX86State *env, int st_index) { int old_flags =3D save_exception_flags(env); ST(st_index) =3D floatx80_sub(ST0, ST(st_index), &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fdiv_STN_ST0(CPUX86State *env, int st_index) +void HELPER(fdiv_STN_ST0)(CPUX86State *env, int st_index) { floatx80 *p; =20 @@ -656,7 +656,7 @@ void helper_fdiv_STN_ST0(CPUX86State *env, int st_index) *p =3D helper_fdiv(env, *p, ST0); } =20 -void helper_fdivr_STN_ST0(CPUX86State *env, int st_index) +void HELPER(fdivr_STN_ST0)(CPUX86State *env, int st_index) { floatx80 *p; =20 @@ -665,22 +665,22 @@ void helper_fdivr_STN_ST0(CPUX86State *env, int st_in= dex) } =20 /* misc FPU operations */ -void helper_fchs_ST0(CPUX86State *env) +void HELPER(fchs_ST0)(CPUX86State *env) { ST0 =3D floatx80_chs(ST0); } =20 -void helper_fabs_ST0(CPUX86State *env) +void HELPER(fabs_ST0)(CPUX86State *env) { ST0 =3D floatx80_abs(ST0); } =20 -void helper_fld1_ST0(CPUX86State *env) +void HELPER(fld1_ST0)(CPUX86State *env) { ST0 =3D floatx80_one; } =20 -void helper_fldl2t_ST0(CPUX86State *env) +void HELPER(fldl2t_ST0)(CPUX86State *env) { switch (env->fpuc & FPU_RC_MASK) { case FPU_RC_UP: @@ -692,7 +692,7 @@ void helper_fldl2t_ST0(CPUX86State *env) } } =20 -void helper_fldl2e_ST0(CPUX86State *env) +void HELPER(fldl2e_ST0)(CPUX86State *env) { switch (env->fpuc & FPU_RC_MASK) { case FPU_RC_DOWN: @@ -705,7 +705,7 @@ void helper_fldl2e_ST0(CPUX86State *env) } } =20 -void helper_fldpi_ST0(CPUX86State *env) +void HELPER(fldpi_ST0)(CPUX86State *env) { switch (env->fpuc & FPU_RC_MASK) { case FPU_RC_DOWN: @@ -718,7 +718,7 @@ void helper_fldpi_ST0(CPUX86State *env) } } =20 -void helper_fldlg2_ST0(CPUX86State *env) +void HELPER(fldlg2_ST0)(CPUX86State *env) { switch (env->fpuc & FPU_RC_MASK) { case FPU_RC_DOWN: @@ -731,7 +731,7 @@ void helper_fldlg2_ST0(CPUX86State *env) } } =20 -void helper_fldln2_ST0(CPUX86State *env) +void HELPER(fldln2_ST0)(CPUX86State *env) { switch (env->fpuc & FPU_RC_MASK) { case FPU_RC_DOWN: @@ -744,22 +744,22 @@ void helper_fldln2_ST0(CPUX86State *env) } } =20 -void helper_fldz_ST0(CPUX86State *env) +void HELPER(fldz_ST0)(CPUX86State *env) { ST0 =3D floatx80_zero; } =20 -void helper_fldz_FT0(CPUX86State *env) +void HELPER(fldz_FT0)(CPUX86State *env) { FT0 =3D floatx80_zero; } =20 -uint32_t helper_fnstsw(CPUX86State *env) +uint32_t HELPER(fnstsw)(CPUX86State *env) { return (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; } =20 -uint32_t helper_fnstcw(CPUX86State *env) +uint32_t HELPER(fnstcw)(CPUX86State *env) { return env->fpuc; } @@ -800,17 +800,17 @@ void update_fp_status(CPUX86State *env) set_floatx80_rounding_precision(rnd_prec, &env->fp_status); } =20 -void helper_fldcw(CPUX86State *env, uint32_t val) +void HELPER(fldcw)(CPUX86State *env, uint32_t val) { cpu_set_fpuc(env, val); } =20 -void helper_fclex(CPUX86State *env) +void HELPER(fclex)(CPUX86State *env) { env->fpus &=3D 0x7f00; } =20 -void helper_fwait(CPUX86State *env) +void HELPER(fwait)(CPUX86State *env) { if (env->fpus & FPUS_SE) { fpu_raise_exception(env, GETPC()); @@ -836,14 +836,14 @@ static void do_fninit(CPUX86State *env) env->fptags[7] =3D 1; } =20 -void helper_fninit(CPUX86State *env) +void HELPER(fninit)(CPUX86State *env) { do_fninit(env); } =20 /* BCD ops */ =20 -void helper_fbld_ST0(CPUX86State *env, target_ulong ptr) +void HELPER(fbld_ST0)(CPUX86State *env, target_ulong ptr) { X86Access ac; floatx80 tmp; @@ -866,7 +866,7 @@ void helper_fbld_ST0(CPUX86State *env, target_ulong ptr) ST0 =3D tmp; } =20 -void helper_fbst_ST0(CPUX86State *env, target_ulong ptr) +void HELPER(fbst_ST0)(CPUX86State *env, target_ulong ptr) { int old_flags =3D save_exception_flags(env); int v; @@ -1141,7 +1141,7 @@ static const struct f2xm1_data f2xm1_table[65] =3D { make_floatx80_init(0x3fff, 0x8000000000000000ULL) }, }; =20 -void helper_f2xm1(CPUX86State *env) +void HELPER(f2xm1)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); uint64_t sig =3D extractFloatx80Frac(ST0); @@ -1302,7 +1302,7 @@ void helper_f2xm1(CPUX86State *env) merge_exception_flags(env, old_flags); } =20 -void helper_fptan(CPUX86State *env) +void HELPER(fptan)(CPUX86State *env) { double fptemp =3D floatx80_to_double(env, ST0); =20 @@ -1374,7 +1374,7 @@ static const struct fpatan_data fpatan_table[9] =3D { make_floatx80_init(0xbfbc, 0xece675d1fc8f8cbcULL) }, }; =20 -void helper_fpatan(CPUX86State *env) +void HELPER(fpatan)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); uint64_t arg0_sig =3D extractFloatx80Frac(ST0); @@ -1821,7 +1821,7 @@ static inline void fpush_fxtract(CPUX86State *env) env->fptags[(env->fpstt + 1) & 7] =3D 0; } =20 -void helper_fxtract(CPUX86State *env) +void HELPER(fxtract)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); CPU_LDoubleU temp; @@ -1921,12 +1921,12 @@ static void helper_fprem_common(CPUX86State *env, b= ool mod) merge_exception_flags(env, old_flags); } =20 -void helper_fprem1(CPUX86State *env) +void HELPER(fprem1)(CPUX86State *env) { helper_fprem_common(env, false); } =20 -void helper_fprem(CPUX86State *env) +void HELPER(fprem)(CPUX86State *env) { helper_fprem_common(env, true); } @@ -2066,7 +2066,7 @@ static void helper_fyl2x_common(CPUX86State *env, flo= atx80 arg, int32_t *exp, *sig1 =3D asig1; } =20 -void helper_fyl2xp1(CPUX86State *env) +void HELPER(fyl2xp1)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); uint64_t arg0_sig =3D extractFloatx80Frac(ST0); @@ -2164,7 +2164,7 @@ void helper_fyl2xp1(CPUX86State *env) merge_exception_flags(env, old_flags); } =20 -void helper_fyl2x(CPUX86State *env) +void HELPER(fyl2x)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); uint64_t arg0_sig =3D extractFloatx80Frac(ST0); @@ -2311,7 +2311,7 @@ void helper_fyl2x(CPUX86State *env) merge_exception_flags(env, old_flags); } =20 -void helper_fsqrt(CPUX86State *env) +void HELPER(fsqrt)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); if (floatx80_is_neg(ST0)) { @@ -2322,7 +2322,7 @@ void helper_fsqrt(CPUX86State *env) merge_exception_flags(env, old_flags); } =20 -void helper_fsincos(CPUX86State *env) +void HELPER(fsincos)(CPUX86State *env) { double fptemp =3D floatx80_to_double(env, ST0); =20 @@ -2337,14 +2337,14 @@ void helper_fsincos(CPUX86State *env) } } =20 -void helper_frndint(CPUX86State *env) +void HELPER(frndint)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); ST0 =3D floatx80_round_to_int(ST0, &env->fp_status); merge_exception_flags(env, old_flags); } =20 -void helper_fscale(CPUX86State *env) +void HELPER(fscale)(CPUX86State *env) { int old_flags =3D save_exception_flags(env); if (floatx80_invalid_encoding(ST1, &env->fp_status) || @@ -2395,7 +2395,7 @@ void helper_fscale(CPUX86State *env) merge_exception_flags(env, old_flags); } =20 -void helper_fsin(CPUX86State *env) +void HELPER(fsin)(CPUX86State *env) { double fptemp =3D floatx80_to_double(env, ST0); =20 @@ -2408,7 +2408,7 @@ void helper_fsin(CPUX86State *env) } } =20 -void helper_fcos(CPUX86State *env) +void HELPER(fcos)(CPUX86State *env) { double fptemp =3D floatx80_to_double(env, ST0); =20 @@ -2421,7 +2421,7 @@ void helper_fcos(CPUX86State *env) } } =20 -void helper_fxam_ST0(CPUX86State *env) +void HELPER(fxam_ST0)(CPUX86State *env) { CPU_LDoubleU temp; int expdif; @@ -2504,7 +2504,7 @@ static void do_fstenv(X86Access *ac, target_ulong ptr= , int data32) } } =20 -void helper_fstenv(CPUX86State *env, target_ulong ptr, int data32) +void HELPER(fstenv)(CPUX86State *env, target_ulong ptr, int data32) { X86Access ac; =20 @@ -2544,7 +2544,7 @@ static void do_fldenv(X86Access *ac, target_ulong ptr= , int data32) } } =20 -void helper_fldenv(CPUX86State *env, target_ulong ptr, int data32) +void HELPER(fldenv)(CPUX86State *env, target_ulong ptr, int data32) { X86Access ac; =20 @@ -2570,7 +2570,7 @@ static void do_fsave(X86Access *ac, target_ulong ptr,= int data32) } } =20 -void helper_fsave(CPUX86State *env, target_ulong ptr, int data32) +void HELPER(fsave)(CPUX86State *env, target_ulong ptr, int data32) { int size =3D (14 << data32) + 80; X86Access ac; @@ -2594,7 +2594,7 @@ static void do_frstor(X86Access *ac, target_ulong ptr= , int data32) } } =20 -void helper_frstor(CPUX86State *env, target_ulong ptr, int data32) +void HELPER(frstor)(CPUX86State *env, target_ulong ptr, int data32) { int size =3D (14 << data32) + 80; X86Access ac; @@ -2741,7 +2741,7 @@ static void do_fxsave(X86Access *ac, target_ulong ptr) } } =20 -void helper_fxsave(CPUX86State *env, target_ulong ptr) +void HELPER(fxsave)(CPUX86State *env, target_ulong ptr) { uintptr_t ra =3D GETPC(); X86Access ac; @@ -2839,12 +2839,12 @@ static void do_xsave(CPUX86State *env, target_ulong= ptr, uint64_t rfbm, do_xsave_access(&ac, ptr, rfbm, inuse, opt); } =20 -void helper_xsave(CPUX86State *env, target_ulong ptr, uint64_t rfbm) +void HELPER(xsave)(CPUX86State *env, target_ulong ptr, uint64_t rfbm) { do_xsave(env, ptr, rfbm, get_xinuse(env), rfbm, GETPC()); } =20 -void helper_xsaveopt(CPUX86State *env, target_ulong ptr, uint64_t rfbm) +void HELPER(xsaveopt)(CPUX86State *env, target_ulong ptr, uint64_t rfbm) { uint64_t inuse =3D get_xinuse(env); do_xsave(env, ptr, rfbm, inuse, inuse, GETPC()); @@ -3018,7 +3018,7 @@ static void do_clear_apx(X86Access *ac) } #endif =20 -void helper_fxrstor(CPUX86State *env, target_ulong ptr) +void HELPER(fxrstor)(CPUX86State *env, target_ulong ptr) { uintptr_t ra =3D GETPC(); X86Access ac; @@ -3129,7 +3129,7 @@ static void do_xrstor(X86Access *ac, target_ulong ptr, =20 #undef XO =20 -void helper_xrstor(CPUX86State *env, target_ulong ptr, uint64_t rfbm) +void HELPER(xrstor)(CPUX86State *env, target_ulong ptr, uint64_t rfbm) { uintptr_t ra =3D GETPC(); X86Access ac; @@ -3251,7 +3251,7 @@ bool cpu_x86_xrstor(CPUX86State *env, void *host, siz= e_t len, uint64_t rfbm) } #endif =20 -uint64_t helper_xgetbv(CPUX86State *env, uint32_t ecx) +uint64_t HELPER(xgetbv)(CPUX86State *env, uint32_t ecx) { /* The OS must have enabled XSAVE. */ if (!(env->cr[4] & CR4_OSXSAVE_MASK)) { @@ -3270,7 +3270,7 @@ uint64_t helper_xgetbv(CPUX86State *env, uint32_t ecx) raise_exception_ra(env, EXCP0D_GPF, GETPC()); } =20 -void helper_xsetbv(CPUX86State *env, uint32_t ecx, uint64_t mask) +void HELPER(xsetbv)(CPUX86State *env, uint32_t ecx, uint64_t mask) { uint32_t dummy, ena_lo, ena_hi; uint64_t ena; @@ -3359,24 +3359,24 @@ void update_mxcsr_from_sse_status(CPUX86State *env) 0)); } =20 -void helper_update_mxcsr(CPUX86State *env) +void HELPER(update_mxcsr)(CPUX86State *env) { update_mxcsr_from_sse_status(env); } =20 -void helper_ldmxcsr(CPUX86State *env, uint32_t val) +void HELPER(ldmxcsr)(CPUX86State *env, uint32_t val) { cpu_set_mxcsr(env, val); } =20 -void helper_enter_mmx(CPUX86State *env) +void HELPER(enter_mmx)(CPUX86State *env) { env->fpstt =3D 0; *(uint32_t *)(env->fptags) =3D 0; *(uint32_t *)(env->fptags + 4) =3D 0; } =20 -void helper_emms(CPUX86State *env) +void HELPER(emms)(CPUX86State *env) { /* set to empty state */ *(uint32_t *)(env->fptags) =3D 0x01010101; diff --git a/target/i386/tcg/int_helper.c b/target/i386/tcg/int_helper.c index 46741d9f68a..772e6adcc86 100644 --- a/target/i386/tcg/int_helper.c +++ b/target/i386/tcg/int_helper.c @@ -30,7 +30,7 @@ =20 /* division, flags are undefined */ =20 -void helper_divb_AL(CPUX86State *env, target_ulong t0) +void HELPER(divb_AL)(CPUX86State *env, target_ulong t0) { unsigned int num, den, q, r; =20 @@ -48,7 +48,7 @@ void helper_divb_AL(CPUX86State *env, target_ulong t0) env->regs[R_EAX] =3D (env->regs[R_EAX] & ~0xffff) | (r << 8) | q; } =20 -void helper_idivb_AL(CPUX86State *env, target_ulong t0) +void HELPER(idivb_AL)(CPUX86State *env, target_ulong t0) { int num, den, q, r; =20 @@ -66,7 +66,7 @@ void helper_idivb_AL(CPUX86State *env, target_ulong t0) env->regs[R_EAX] =3D (env->regs[R_EAX] & ~0xffff) | (r << 8) | q; } =20 -void helper_divw_AX(CPUX86State *env, target_ulong t0) +void HELPER(divw_AX)(CPUX86State *env, target_ulong t0) { unsigned int num, den, q, r; =20 @@ -85,7 +85,7 @@ void helper_divw_AX(CPUX86State *env, target_ulong t0) env->regs[R_EDX] =3D (env->regs[R_EDX] & ~0xffff) | r; } =20 -void helper_idivw_AX(CPUX86State *env, target_ulong t0) +void HELPER(idivw_AX)(CPUX86State *env, target_ulong t0) { int num, den, q, r; =20 @@ -104,7 +104,7 @@ void helper_idivw_AX(CPUX86State *env, target_ulong t0) env->regs[R_EDX] =3D (env->regs[R_EDX] & ~0xffff) | r; } =20 -void helper_divl_EAX(CPUX86State *env, target_ulong t0) +void HELPER(divl_EAX)(CPUX86State *env, target_ulong t0) { unsigned int den, r; uint64_t num, q; @@ -123,7 +123,7 @@ void helper_divl_EAX(CPUX86State *env, target_ulong t0) env->regs[R_EDX] =3D (uint32_t)r; } =20 -void helper_idivl_EAX(CPUX86State *env, target_ulong t0) +void HELPER(idivl_EAX)(CPUX86State *env, target_ulong t0) { int den, r; int64_t num, q; @@ -144,7 +144,7 @@ void helper_idivl_EAX(CPUX86State *env, target_ulong t0) =20 /* bcd */ =20 -target_ulong helper_aam(target_ulong al, target_ulong base) +target_ulong HELPER(aam)(target_ulong al, target_ulong base) { int ah; =20 @@ -154,7 +154,7 @@ target_ulong helper_aam(target_ulong al, target_ulong b= ase) return al | (ah << 8); } =20 -target_ulong helper_aad(target_ulong ax, target_ulong base) +target_ulong HELPER(aad)(target_ulong ax, target_ulong base) { int al, ah; =20 @@ -164,7 +164,7 @@ target_ulong helper_aad(target_ulong ax, target_ulong b= ase) return al; } =20 -void helper_aaa(CPUX86State *env) +void HELPER(aaa)(CPUX86State *env) { int icarry; int al, ah, af; @@ -189,7 +189,7 @@ void helper_aaa(CPUX86State *env) CC_OP =3D CC_OP_EFLAGS; } =20 -void helper_aas(CPUX86State *env) +void HELPER(aas)(CPUX86State *env) { int icarry; int al, ah, af; @@ -214,7 +214,7 @@ void helper_aas(CPUX86State *env) CC_OP =3D CC_OP_EFLAGS; } =20 -void helper_daa(CPUX86State *env) +void HELPER(daa)(CPUX86State *env) { int old_al, al, af, cf; int eflags; @@ -242,7 +242,7 @@ void helper_daa(CPUX86State *env) CC_OP =3D CC_OP_EFLAGS; } =20 -void helper_das(CPUX86State *env) +void HELPER(das)(CPUX86State *env) { int al, al1, af, cf; int eflags; @@ -364,7 +364,7 @@ static int idiv64(uint64_t *plow, uint64_t *phigh, int6= 4_t b) return 0; } =20 -void helper_divq_EAX(CPUX86State *env, target_ulong t0) +void HELPER(divq_EAX)(CPUX86State *env, target_ulong t0) { uint64_t r0, r1; =20 @@ -380,7 +380,7 @@ void helper_divq_EAX(CPUX86State *env, target_ulong t0) env->regs[R_EDX] =3D r1; } =20 -void helper_idivq_EAX(CPUX86State *env, target_ulong t0) +void HELPER(idivq_EAX)(CPUX86State *env, target_ulong t0) { uint64_t r0, r1; =20 @@ -405,7 +405,7 @@ void helper_idivq_EAX(CPUX86State *env, target_ulong t0) # define clztl clz64 #endif =20 -target_ulong helper_pdep(target_ulong src, target_ulong mask) +target_ulong HELPER(pdep)(target_ulong src, target_ulong mask) { target_ulong dest =3D 0; int i, o; @@ -418,7 +418,7 @@ target_ulong helper_pdep(target_ulong src, target_ulong= mask) return dest; } =20 -target_ulong helper_pext(target_ulong src, target_ulong mask) +target_ulong HELPER(pext)(target_ulong src, target_ulong mask) { target_ulong dest =3D 0; int i, o; @@ -434,7 +434,7 @@ target_ulong helper_pext(target_ulong src, target_ulong= mask) /* Test that BIT is enabled in CR4. If not, raise an illegal opcode exception. This reduces the requirements for rare CR4 bits being mapped into HFLAGS. */ -void helper_cr4_testbit(CPUX86State *env, uint32_t bit) +void HELPER(cr4_testbit)(CPUX86State *env, uint32_t bit) { if (unlikely((env->cr[4] & bit) =3D=3D 0)) { raise_exception_ra(env, EXCP06_ILLOP, GETPC()); diff --git a/target/i386/tcg/mem_helper.c b/target/i386/tcg/mem_helper.c index c15a32d60ad..1ed75a34920 100644 --- a/target/i386/tcg/mem_helper.c +++ b/target/i386/tcg/mem_helper.c @@ -26,7 +26,7 @@ #include "tcg/tcg.h" #include "helper-tcg.h" =20 -void helper_boundw(CPUX86State *env, target_ulong a0, int v) +void HELPER(boundw)(CPUX86State *env, target_ulong a0, int v) { int low, high; =20 @@ -41,7 +41,7 @@ void helper_boundw(CPUX86State *env, target_ulong a0, int= v) } } =20 -void helper_boundl(CPUX86State *env, target_ulong a0, int v) +void HELPER(boundl)(CPUX86State *env, target_ulong a0, int v) { int low, high; =20 diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c index f7342871ded..7c1f15953ac 100644 --- a/target/i386/tcg/misc_helper.c +++ b/target/i386/tcg/misc_helper.c @@ -38,7 +38,7 @@ void cpu_load_eflags(CPUX86State *env, int eflags, int up= date_mask) (eflags & update_mask) | 0x2; } =20 -void helper_into(CPUX86State *env, int next_eip_addend) +void HELPER(into)(CPUX86State *env, int next_eip_addend) { int eflags; =20 @@ -48,7 +48,7 @@ void helper_into(CPUX86State *env, int next_eip_addend) } } =20 -void helper_cpuid(CPUX86State *env) +void HELPER(cpuid)(CPUX86State *env) { uint32_t eax, ebx, ecx, edx; =20 @@ -62,7 +62,7 @@ void helper_cpuid(CPUX86State *env) env->regs[R_EDX] =3D edx; } =20 -void helper_rdtsc(CPUX86State *env) +void HELPER(rdtsc)(CPUX86State *env) { uint64_t val; =20 @@ -76,7 +76,7 @@ void helper_rdtsc(CPUX86State *env) env->regs[R_EDX] =3D (uint32_t)(val >> 32); } =20 -G_NORETURN void helper_rdpmc(CPUX86State *env) +G_NORETURN void HELPER(rdpmc)(CPUX86State *env) { if (((env->cr[4] & CR4_PCE_MASK) =3D=3D 0 ) && ((env->hflags & HF_CPL_MASK) !=3D 0)) { @@ -89,20 +89,20 @@ G_NORETURN void helper_rdpmc(CPUX86State *env) raise_exception_err(env, EXCP06_ILLOP, 0); } =20 -G_NORETURN void helper_pause(CPUX86State *env) +G_NORETURN void HELPER(pause)(CPUX86State *env) { CPUState *cs =3D env_cpu(env); =20 /* Do gen_eob() tasks before going back to the main loop. */ do_end_instruction(env); - helper_rechecking_single_step(env); + HELPER(rechecking_single_step)(env); =20 /* Just let another CPU run. */ cs->exception_index =3D EXCP_INTERRUPT; cpu_loop_exit(cs); } =20 -uint64_t helper_rdpkru(CPUX86State *env, uint32_t ecx) +uint64_t HELPER(rdpkru)(CPUX86State *env, uint32_t ecx) { if ((env->cr[4] & CR4_PKE_MASK) =3D=3D 0) { raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC()); @@ -114,7 +114,7 @@ uint64_t helper_rdpkru(CPUX86State *env, uint32_t ecx) return env->pkru; } =20 -void helper_wrpkru(CPUX86State *env, uint32_t ecx, uint64_t val) +void HELPER(wrpkru)(CPUX86State *env, uint32_t ecx, uint64_t val) { CPUState *cs =3D env_cpu(env); =20 diff --git a/target/i386/tcg/mpx_helper.c b/target/i386/tcg/mpx_helper.c index 73d33bf5e4a..bbe2c824be2 100644 --- a/target/i386/tcg/mpx_helper.c +++ b/target/i386/tcg/mpx_helper.c @@ -25,7 +25,7 @@ #include "helper-tcg.h" =20 =20 -void helper_bndck(CPUX86State *env, uint32_t fail) +void HELPER(bndck)(CPUX86State *env, uint32_t fail) { if (unlikely(fail)) { env->bndcs_regs.sts =3D 1; @@ -73,7 +73,7 @@ static uint32_t lookup_bte32(CPUX86State *env, uint32_t b= ase, uintptr_t ra) return (extract32(base, 2, 10) << 4) + (bt & ~3); } =20 -uint64_t helper_bndldx64(CPUX86State *env, target_ulong base, target_ulong= ptr) +uint64_t HELPER(bndldx64)(CPUX86State *env, target_ulong base, target_ulon= g ptr) { uintptr_t ra =3D GETPC(); uint64_t bte, lb, ub, pt; @@ -90,7 +90,7 @@ uint64_t helper_bndldx64(CPUX86State *env, target_ulong b= ase, target_ulong ptr) return lb; } =20 -uint64_t helper_bndldx32(CPUX86State *env, target_ulong base, target_ulong= ptr) +uint64_t HELPER(bndldx32)(CPUX86State *env, target_ulong base, target_ulon= g ptr) { uintptr_t ra =3D GETPC(); uint32_t bte, lb, ub, pt; @@ -106,7 +106,7 @@ uint64_t helper_bndldx32(CPUX86State *env, target_ulong= base, target_ulong ptr) return ((uint64_t)ub << 32) | lb; } =20 -void helper_bndstx64(CPUX86State *env, target_ulong base, target_ulong ptr, +void HELPER(bndstx64)(CPUX86State *env, target_ulong base, target_ulong pt= r, uint64_t lb, uint64_t ub) { uintptr_t ra =3D GETPC(); @@ -118,7 +118,7 @@ void helper_bndstx64(CPUX86State *env, target_ulong bas= e, target_ulong ptr, cpu_stq_le_data_ra(env, bte + 16, ptr, ra); } =20 -void helper_bndstx32(CPUX86State *env, target_ulong base, target_ulong ptr, +void HELPER(bndstx32)(CPUX86State *env, target_ulong base, target_ulong pt= r, uint64_t lb, uint64_t ub) { uintptr_t ra =3D GETPC(); @@ -130,7 +130,7 @@ void helper_bndstx32(CPUX86State *env, target_ulong bas= e, target_ulong ptr, cpu_stl_le_data_ra(env, bte + 8, ptr, ra); } =20 -void helper_bnd_jmp(CPUX86State *env) +void HELPER(bnd_jmp)(CPUX86State *env) { if (!(env->hflags2 & HF2_MPX_PR_MASK)) { memset(env->bnd_regs, 0, sizeof(env->bnd_regs)); diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c index d75ee54f9e8..45bffcd7380 100644 --- a/target/i386/tcg/seg_helper.c +++ b/target/i386/tcg/seg_helper.c @@ -1082,7 +1082,7 @@ static void do_interrupt64(CPUX86State *env, int intn= o, int is_int, } #endif /* TARGET_X86_64 */ =20 -void helper_sysret(CPUX86State *env, int dflag) +void HELPER(sysret)(CPUX86State *env, int dflag) { int cpl, selector; =20 @@ -1288,7 +1288,7 @@ void do_interrupt_x86_hardirq(CPUX86State *env, int i= ntno, int is_hw) do_interrupt_all(env_archcpu(env), intno, 0, 0, 0, is_hw); } =20 -void helper_lldt(CPUX86State *env, int selector) +void HELPER(lldt)(CPUX86State *env, int selector) { SegmentCache *dt; uint32_t e1, e2; @@ -1342,7 +1342,7 @@ void helper_lldt(CPUX86State *env, int selector) env->ldt.selector =3D selector; } =20 -void helper_ltr(CPUX86State *env, int selector) +void HELPER(ltr)(CPUX86State *env, int selector) { SegmentCache *dt; uint32_t e1, e2; @@ -1406,7 +1406,7 @@ void helper_ltr(CPUX86State *env, int selector) } =20 /* only works if protected mode and not VM86. seg_reg must be !=3D R_CS */ -void helper_load_seg(CPUX86State *env, int seg_reg, int selector) +void HELPER(load_seg)(CPUX86State *env, int seg_reg, int selector) { uint32_t e1, e2; int cpl, dpl, rpl; @@ -1494,7 +1494,7 @@ void helper_load_seg(CPUX86State *env, int seg_reg, i= nt selector) } =20 /* protected mode jump */ -void helper_ljmp_protected(CPUX86State *env, int new_cs, target_ulong new_= eip, +void HELPER(ljmp_protected)(CPUX86State *env, int new_cs, target_ulong new= _eip, target_ulong next_eip) { int gate_cs, type; @@ -1635,7 +1635,7 @@ void helper_ljmp_protected(CPUX86State *env, int new_= cs, target_ulong new_eip, } =20 /* real mode call */ -void helper_lcall_real(CPUX86State *env, uint32_t new_cs, uint32_t new_eip, +void HELPER(lcall_real)(CPUX86State *env, uint32_t new_cs, uint32_t new_ei= p, int shift, uint32_t next_eip) { StackAccess sa; @@ -1662,7 +1662,7 @@ void helper_lcall_real(CPUX86State *env, uint32_t new= _cs, uint32_t new_eip, } =20 /* protected mode call */ -void helper_lcall_protected(CPUX86State *env, int new_cs, target_ulong new= _eip, +void HELPER(lcall_protected)(CPUX86State *env, int new_cs, target_ulong ne= w_eip, int shift, target_ulong next_eip) { int new_stack, i; @@ -1969,7 +1969,7 @@ void helper_lcall_protected(CPUX86State *env, int new= _cs, target_ulong new_eip, } =20 /* real and vm86 mode iret */ -void helper_iret_real(CPUX86State *env, int shift) +void HELPER(iret_real)(CPUX86State *env, int shift) { uint32_t new_cs, new_eip, new_eflags; int eflags_mask; @@ -2261,7 +2261,7 @@ static inline void helper_ret_protected(CPUX86State *= env, int shift, env->regs[R_ESP] =3D new_esp; } =20 -void helper_iret_protected(CPUX86State *env, int shift, int next_eip) +void HELPER(iret_protected)(CPUX86State *env, int shift, int next_eip) { int tss_selector, type; uint32_t e1, e2; @@ -2293,12 +2293,12 @@ void helper_iret_protected(CPUX86State *env, int sh= ift, int next_eip) env->hflags2 &=3D ~HF2_NMI_MASK; } =20 -void helper_lret_protected(CPUX86State *env, int shift, int addend) +void HELPER(lret_protected)(CPUX86State *env, int shift, int addend) { helper_ret_protected(env, shift, 0, addend, GETPC()); } =20 -void helper_sysenter(CPUX86State *env) +void HELPER(sysenter)(CPUX86State *env) { if (env->sysenter_cs =3D=3D 0) { raise_exception_err_ra(env, EXCP0D_GPF, 0, GETPC()); @@ -2331,7 +2331,7 @@ void helper_sysenter(CPUX86State *env) env->eip =3D env->sysenter_eip; } =20 -void helper_sysexit(CPUX86State *env, int dflag) +void HELPER(sysexit)(CPUX86State *env, int dflag) { int cpl; =20 @@ -2370,7 +2370,7 @@ void helper_sysexit(CPUX86State *env, int dflag) env->eip =3D env->regs[R_EDX]; } =20 -target_ulong helper_lsl(CPUX86State *env, target_ulong selector1) +target_ulong HELPER(lsl)(CPUX86State *env, target_ulong selector1) { unsigned int limit; uint32_t e1, e2, selector; @@ -2418,7 +2418,7 @@ target_ulong helper_lsl(CPUX86State *env, target_ulon= g selector1) return limit; } =20 -target_ulong helper_lar(CPUX86State *env, target_ulong selector1) +target_ulong HELPER(lar)(CPUX86State *env, target_ulong selector1) { uint32_t e1, e2, selector; int rpl, dpl, cpl, type; @@ -2467,7 +2467,7 @@ target_ulong helper_lar(CPUX86State *env, target_ulon= g selector1) return e2 & 0x00f0ff00; } =20 -void helper_verr(CPUX86State *env, target_ulong selector1) +void HELPER(verr)(CPUX86State *env, target_ulong selector1) { uint32_t e1, e2, eflags, selector; int rpl, dpl, cpl; @@ -2505,7 +2505,7 @@ void helper_verr(CPUX86State *env, target_ulong selec= tor1) CC_OP =3D CC_OP_EFLAGS; } =20 -void helper_verw(CPUX86State *env, target_ulong selector1) +void HELPER(verw)(CPUX86State *env, target_ulong selector1) { uint32_t e1, e2, eflags, selector; int rpl, dpl, cpl; diff --git a/target/i386/tcg/system/bpt_helper.c b/target/i386/tcg/system/b= pt_helper.c index 2feea69c8a1..5ea229d3b32 100644 --- a/target/i386/tcg/system/bpt_helper.c +++ b/target/i386/tcg/system/bpt_helper.c @@ -235,7 +235,7 @@ void breakpoint_handler(CPUState *cs) } } =20 -target_ulong helper_get_dr(CPUX86State *env, int reg) +target_ulong HELPER(get_dr)(CPUX86State *env, int reg) { if (reg >=3D 4 && reg < 6) { if (env->cr[4] & CR4_DE_MASK) { @@ -254,7 +254,7 @@ target_ulong helper_get_dr(CPUX86State *env, int reg) return env->dr[reg]; } =20 -void helper_set_dr(CPUX86State *env, int reg, target_ulong t0) +void HELPER(set_dr)(CPUX86State *env, int reg, target_ulong t0) { if (reg >=3D 4 && reg < 6) { if (env->cr[4] & CR4_DE_MASK) { @@ -292,7 +292,7 @@ void helper_set_dr(CPUX86State *env, int reg, target_ul= ong t0) } =20 /* Check if Port I/O is trapped by a breakpoint. */ -void helper_bpt_io(CPUX86State *env, uint32_t port, +void HELPER(bpt_io)(CPUX86State *env, uint32_t port, uint32_t size, target_ulong next_eip) { target_ulong dr7 =3D env->dr[7]; diff --git a/target/i386/tcg/system/misc_helper.c b/target/i386/tcg/system/= misc_helper.c index 2998b1aae75..a77da599da8 100644 --- a/target/i386/tcg/system/misc_helper.c +++ b/target/i386/tcg/system/misc_helper.c @@ -29,43 +29,43 @@ #include "tcg/helper-tcg.h" #include "hw/i386/apic.h" =20 -void helper_outb(CPUX86State *env, uint32_t port, uint32_t data) +void HELPER(outb)(CPUX86State *env, uint32_t port, uint32_t data) { address_space_stb(&address_space_io, port, data, cpu_get_mem_attrs(env), NULL); } =20 -target_ulong helper_inb(CPUX86State *env, uint32_t port) +target_ulong HELPER(inb)(CPUX86State *env, uint32_t port) { return address_space_ldub(&address_space_io, port, cpu_get_mem_attrs(env), NULL); } =20 -void helper_outw(CPUX86State *env, uint32_t port, uint32_t data) +void HELPER(outw)(CPUX86State *env, uint32_t port, uint32_t data) { address_space_stw_le(&address_space_io, port, data, cpu_get_mem_attrs(env), NULL); } =20 -target_ulong helper_inw(CPUX86State *env, uint32_t port) +target_ulong HELPER(inw)(CPUX86State *env, uint32_t port) { return address_space_lduw_le(&address_space_io, port, cpu_get_mem_attrs(env), NULL); } =20 -void helper_outl(CPUX86State *env, uint32_t port, uint32_t data) +void HELPER(outl)(CPUX86State *env, uint32_t port, uint32_t data) { address_space_stl_le(&address_space_io, port, data, cpu_get_mem_attrs(env), NULL); } =20 -target_ulong helper_inl(CPUX86State *env, uint32_t port) +target_ulong HELPER(inl)(CPUX86State *env, uint32_t port) { return address_space_ldl_le(&address_space_io, port, cpu_get_mem_attrs(env), NULL); } =20 -target_ulong helper_read_cr8(CPUX86State *env) +target_ulong HELPER(read_cr8)(CPUX86State *env) { if (!(env->hflags2 & HF2_VINTR_MASK)) { return cpu_get_apic_tpr(env_archcpu(env)->apic_state); @@ -74,7 +74,7 @@ target_ulong helper_read_cr8(CPUX86State *env) } } =20 -void helper_write_crN(CPUX86State *env, int reg, target_ulong t0) +void HELPER(write_crN)(CPUX86State *env, int reg, target_ulong t0) { switch (reg) { case 0: @@ -130,7 +130,7 @@ void helper_write_crN(CPUX86State *env, int reg, target= _ulong t0) } } =20 -void helper_wrmsr(CPUX86State *env) +void HELPER(wrmsr)(CPUX86State *env) { uint64_t val; CPUState *cs =3D env_cpu(env); @@ -327,7 +327,7 @@ error: raise_exception_err_ra(env, EXCP0D_GPF, 0, GETPC()); } =20 -void helper_rdmsr(CPUX86State *env) +void HELPER(rdmsr)(CPUX86State *env) { X86CPU *x86_cpu =3D env_archcpu(env); uint64_t val; @@ -502,12 +502,12 @@ void helper_rdmsr(CPUX86State *env) env->regs[R_EDX] =3D (uint32_t)(val >> 32); } =20 -void helper_flush_page(CPUX86State *env, target_ulong addr) +void HELPER(flush_page)(CPUX86State *env, target_ulong addr) { tlb_flush_page(env_cpu(env), addr); } =20 -G_NORETURN void helper_hlt(CPUX86State *env) +G_NORETURN void HELPER(hlt)(CPUX86State *env) { CPUState *cs =3D env_cpu(env); =20 @@ -517,7 +517,7 @@ G_NORETURN void helper_hlt(CPUX86State *env) cpu_loop_exit(cs); } =20 -void helper_monitor(CPUX86State *env, target_ulong ptr) +void HELPER(monitor)(CPUX86State *env, target_ulong ptr) { if ((uint32_t)env->regs[R_ECX] !=3D 0) { raise_exception_ra(env, EXCP0D_GPF, GETPC()); @@ -526,7 +526,7 @@ void helper_monitor(CPUX86State *env, target_ulong ptr) cpu_svm_check_intercept_param(env, SVM_EXIT_MONITOR, 0, GETPC()); } =20 -G_NORETURN void helper_mwait(CPUX86State *env, int next_eip_addend) +G_NORETURN void HELPER(mwait)(CPUX86State *env, int next_eip_addend) { CPUState *cs =3D env_cpu(env); =20 @@ -538,8 +538,8 @@ G_NORETURN void helper_mwait(CPUX86State *env, int next= _eip_addend) =20 /* XXX: not complete but not completely erroneous */ if (cs->cpu_index !=3D 0 || CPU_NEXT(cs) !=3D NULL) { - helper_pause(env); + HELPER(pause)(env); } else { - helper_hlt(env); + HELPER(hlt)(env); } } diff --git a/target/i386/tcg/system/seg_helper.c b/target/i386/tcg/system/s= eg_helper.c index e24d01000ad..f45906b4899 100644 --- a/target/i386/tcg/system/seg_helper.c +++ b/target/i386/tcg/system/seg_helper.c @@ -27,7 +27,7 @@ #include "tcg/helper-tcg.h" #include "../seg_helper.h" =20 -void helper_syscall(CPUX86State *env, int next_eip_addend) +void HELPER(syscall)(CPUX86State *env, int next_eip_addend) { int selector; =20 @@ -230,7 +230,7 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int interrupt= _request) } =20 /* check if Port I/O is allowed in TSS */ -void helper_check_io(CPUX86State *env, uint32_t addr, uint32_t size) +void HELPER(check_io)(CPUX86State *env, uint32_t addr, uint32_t size) { uintptr_t retaddr =3D GETPC(); uint32_t io_offset, val, mask; diff --git a/target/i386/tcg/system/smm_helper.c b/target/i386/tcg/system/s= mm_helper.c index 4bbe18a86fb..ae705752632 100644 --- a/target/i386/tcg/system/smm_helper.c +++ b/target/i386/tcg/system/smm_helper.c @@ -178,7 +178,7 @@ void do_smm_enter(X86CPU *cpu) env->cr[0] & ~(CR0_PE_MASK | CR0_EM_MASK | CR0_TS_M= ASK | CR0_PG_MASK)); cpu_x86_update_cr4(env, 0); - helper_set_dr(env, 7, 0x00000400); + HELPER(set_dr)(env, 7, 0x00000400); =20 cpu_x86_load_seg_cache(env, R_CS, (env->smbase >> 4) & 0xffff, env->sm= base, 0xffffffff, @@ -243,8 +243,8 @@ static void rsm_load_regs_64(CPUX86State *env) env->eip =3D x86_ldq_phys(cs, sm_state + 0x7f78); cpu_load_eflags(env, x86_ldl_phys(cs, sm_state + 0x7f70), ~(CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C | DF_MASK)); - helper_set_dr(env, 6, x86_ldl_phys(cs, sm_state + 0x7f68)); - helper_set_dr(env, 7, x86_ldl_phys(cs, sm_state + 0x7f60)); + HELPER(set_dr)(env, 6, x86_ldl_phys(cs, sm_state + 0x7f68)); + HELPER(set_dr)(env, 7, x86_ldl_phys(cs, sm_state + 0x7f60)); =20 cpu_x86_update_cr4(env, x86_ldl_phys(cs, sm_state + 0x7f48)); cpu_x86_update_cr3(env, x86_ldq_phys(cs, sm_state + 0x7f50)); @@ -291,8 +291,8 @@ static void rsm_load_regs_32(CPUX86State *env) env->regs[R_EDX] =3D x86_ldl_phys(cs, sm_state + 0x7fd8); env->regs[R_ECX] =3D x86_ldl_phys(cs, sm_state + 0x7fd4); env->regs[R_EAX] =3D x86_ldl_phys(cs, sm_state + 0x7fd0); - helper_set_dr(env, 6, x86_ldl_phys(cs, sm_state + 0x7fcc)); - helper_set_dr(env, 7, x86_ldl_phys(cs, sm_state + 0x7fc8)); + HELPER(set_dr)(env, 6, x86_ldl_phys(cs, sm_state + 0x7fcc)); + HELPER(set_dr)(env, 7, x86_ldl_phys(cs, sm_state + 0x7fc8)); =20 env->tr.selector =3D x86_ldl_phys(cs, sm_state + 0x7fc4) & 0xffff; env->tr.base =3D x86_ldl_phys(cs, sm_state + 0x7f64); @@ -332,7 +332,7 @@ static void rsm_load_regs_32(CPUX86State *env) } } =20 -void helper_rsm(CPUX86State *env) +void HELPER(rsm)(CPUX86State *env) { X86CPU *cpu =3D env_archcpu(env); =20 diff --git a/target/i386/tcg/system/svm_helper.c b/target/i386/tcg/system/s= vm_helper.c index 52a234e7fac..9c040422c1f 100644 --- a/target/i386/tcg/system/svm_helper.c +++ b/target/i386/tcg/system/svm_helper.c @@ -153,7 +153,7 @@ static inline bool virtual_gif_set(CPUX86State *env) return !virtual_gif_enabled(env) || (env->int_ctl & V_GIF_MASK); } =20 -void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend) +void HELPER(vmrun)(CPUX86State *env, int aflag, int next_eip_addend) { CPUState *cs =3D env_cpu(env); X86CPU *cpu =3D env_archcpu(env); @@ -469,13 +469,13 @@ void helper_vmrun(CPUX86State *env, int aflag, int ne= xt_eip_addend) } } =20 -void helper_vmmcall(CPUX86State *env) +void HELPER(vmmcall)(CPUX86State *env) { cpu_svm_check_intercept_param(env, SVM_EXIT_VMMCALL, 0, GETPC()); raise_exception(env, EXCP06_ILLOP); } =20 -void helper_vmload(CPUX86State *env, int aflag) +void HELPER(vmload)(CPUX86State *env, int aflag) { int mmu_idx =3D MMU_PHYS_IDX; target_ulong addr; @@ -539,7 +539,7 @@ void helper_vmload(CPUX86State *env, int aflag) mmu_idx, 0); } =20 -void helper_vmsave(CPUX86State *env, int aflag) +void HELPER(vmsave)(CPUX86State *env, int aflag) { int mmu_idx =3D MMU_PHYS_IDX; target_ulong addr; @@ -590,7 +590,7 @@ void helper_vmsave(CPUX86State *env, int aflag) env->sysenter_eip, mmu_idx, 0); } =20 -void helper_stgi(CPUX86State *env) +void HELPER(stgi)(CPUX86State *env) { cpu_svm_check_intercept_param(env, SVM_EXIT_STGI, 0, GETPC()); =20 @@ -602,7 +602,7 @@ void helper_stgi(CPUX86State *env) } } =20 -void helper_clgi(CPUX86State *env) +void HELPER(clgi)(CPUX86State *env) { cpu_svm_check_intercept_param(env, SVM_EXIT_CLGI, 0, GETPC()); =20 @@ -701,12 +701,12 @@ void cpu_svm_check_intercept_param(CPUX86State *env, = uint32_t type, cpu_vmexit(env, type, param, retaddr); } =20 -void helper_svm_check_intercept(CPUX86State *env, uint32_t type) +void HELPER(svm_check_intercept)(CPUX86State *env, uint32_t type) { cpu_svm_check_intercept_param(env, type, 0, GETPC()); } =20 -void helper_svm_check_io(CPUX86State *env, uint32_t port, uint32_t param, +void HELPER(svm_check_io)(CPUX86State *env, uint32_t port, uint32_t param, uint32_t next_eip_addend) { CPUState *cs =3D env_cpu(env); diff --git a/target/i386/tcg/user/seg_helper.c b/target/i386/tcg/user/seg_h= elper.c index 3a4a6d5a745..d085b5709b1 100644 --- a/target/i386/tcg/user/seg_helper.c +++ b/target/i386/tcg/user/seg_helper.c @@ -26,7 +26,7 @@ #include "tcg/helper-tcg.h" #include "tcg/seg_helper.h" =20 -void helper_syscall(CPUX86State *env, int next_eip_addend) +void HELPER(syscall)(CPUX86State *env, int next_eip_addend) { CPUState *cs =3D env_cpu(env); =20 @@ -102,6 +102,6 @@ void cpu_x86_load_seg(CPUX86State *env, X86Seg seg_reg,= int selector) DESC_P_MASK | DESC_S_MASK | DESC_W_MASK | DESC_A_MASK | (dpl << DESC_DPL_SHIFT)); } else { - helper_load_seg(env, seg_reg, selector); + HELPER(load_seg)(env, seg_reg, selector); } } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772510; cv=none; d=zohomail.com; s=zohoarc; b=FeNUQ2VBgIrXa6x99Fxek/MZUvW0e1QXTVDavrOw+TKa1M5fHE15Mcv2QFqlslEar/mAGKOCxAJi/OLnCzGpB0jZBnfcYKiHSChjm8/i4626jlFyunRFywnYdA5UhAl/J0Uwv3Sso4mltycZRJ7fJWMPeJ22b4UwwlwZqoKrROY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772510; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=8e4oPz4EfoU3x+glKCwLlowOkYZVL0c9YQwOk10UYaU=; b=QEIBZ4ZDWfqmL+RQ7RjfKxYuVnu8SUqsS5TKbEg/W4j4d90aRujtCO2XIg2yctXipQ7AoKr4gPyXCh4GS4eeW9Ou6tNpuvre2XpVkLooMqB4pev5Sv9E9goeHiZ+xPIDY90jl/HA/56axy9witSHWL5MPgFH7KvZVj24U01F5eg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772510177908.1721136940347; Fri, 23 Oct 2026 09:21:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI1Y-0002Ra-2s; Fri, 23 Oct 2026 12:21:44 -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 1xKI1R-0002Bk-Cj for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:38 -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 1xKI1K-00032o-Cq for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:36 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5s9L4072757 for ; Fri, 23 Oct 2026 16:21:27 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7bw0xm2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:21:27 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93e92aad34aso211959685a.0 for ; Fri, 23 Oct 2026 09:21:27 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3ee6b2sm645344f8f.13.2026.10.23.09.21.23 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 8e4oPz4EfoU3x+glKCwLlowOkYZVL0c9YQwOk10UYaU=; b=FEz0pFzmwmQcgT8r SPnudPSBZA5V0LfWM7unJOl0U5pkUjHOyT9Vs8wQ2OpIZUV67u79mNOss1KcWs6C N6C1bVGrzqyAgIOG9RO5iVx3vSCxEc/gMSt6F4kblLpT+x21m8TR4VkbupMcY2QP 6ZusZJDOyjsnaLTctnbRHKZfUzdrMzcQEDaD/mEnZ7s9zsPJTbKmX3HmaNI/BNr+ 7Csimx39yQ2Hihkdu42G9StwfXhFu2ooKX81lKDQQah693CtRzzoKE632at6oCKh 5Oksb3l1vSfNMdpfCcyZ5jnMfM3XMhFDhPtLZVY7GYdpcxhTZUtcreq9m7pIJlUM BVOCNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772486; x=1793377286; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8e4oPz4EfoU3x+glKCwLlowOkYZVL0c9YQwOk10UYaU=; b=EFGyHB6pPnLi9I9YF66ww1cEqic4Md1fYDx4Y1wWJxVcx4XUkUygkavl8dSysvjyGA SgkjDOxq7+1xr49eKrcwMRpVlDyhJFi86IHAl0bjWhKoAMsT8ZwXxnHE36uHQgSKTNHF k2xy1JcVzDFQrMRELvaELLlUjs0l/mK1xHtw96KV2CGAcmRZ6gbCNsAwzvQZzhLLm6zD Fosq4xGMo9onfEpWTo+6k5TNV+KNTf0PSLZojF9+6Gs+1WA0zVsSi/Q2X5wtGrYBWZRE r0/IQY0iADuVnKPK6K6LiVbwFNS7eBx3AKiBnsb5zEfE3QKxUznIvpveO/TLPsLQRHDc JhuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772486; x=1793377286; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8e4oPz4EfoU3x+glKCwLlowOkYZVL0c9YQwOk10UYaU=; b=2q00RzNnCQkJfxQmmb9Y5WzFVi2Tdobqz+Z9XwliHGAh1hwgjPmI69XvLamJuX4Oz2 LYeIsewyTJr38WWH9R6IahEbmHb2G5OP+sd+Djn4Ij/Btx1AdbYAkunAGVaf/0MLmJNw UAbK2knZ6cMebNbXW/u15cmodZpJ6n699wflOQ/hYuttdQonXrK+HPWhZrY9cwHskwpK wu+7YOhhS6YcjR3wWAl6E7oIdxs3MnQH+nkYdDt0QsLYsFIr1Yq5pr7+wJPB6J6w3zEt oheurSsKL87CFpd10+QGYWPLs60b0ztTc+eCiO7pebVj1wzh5W1LOdF/WP951n7ox2A5 REAQ== X-Gm-Message-State: AFq9FYLocY1PtQ5QConP6kSt4ayWWbjbhIiUZITM3G/Lt/q4pGD4ob+X mL1yjU47Y8RehUhWL2tkZQOJgnZ3LTwUyOH6X98Psabi2cWrh03dRLYIDXmBY5JjzTHkFBYDdHL j3EoAHTQagi1hyWxKULG5LPBumO7SEguGMw0S/vm9mtxAcqMMoFAkZE1AC+MYWAkbC+ux X-Gm-Gg: AYBFou30QcgcR3K6p3y7Z76ktK9l/30bD6Ta8L6/Z7fQ/eheSLCmo1U50+qhpVLWkjV s2NX/GSqX8ajFqrz1S3YqjdHRzIrQuuoGSXL+9w8WlaNvOgpKq5wqC6FjAeiVCwHvd7nDCK/6l4 M2uI6e1BcDYSwEefJPjn7gokqJwpDai64CuYyJuXT+HJg6SRMj/i/20q5BAnT8h/9FEh3koxLr3 ExGfIsYG7J3JWw89eoiHWdxul0nURI6uZIfTaRwx4OqgxcAPaVttz4kY15hl2lM7HbO0gwv1Cqp yhYDBaNTjhvqI5jBz+PfmOqqRNMBKy+Wg1CpqHGSy3ruPa0NiFlCAFNzQt55jOhi0TN/P3VyKdy BxGhrjBQSrVOTJRJ8cKpgCpbtIHDA5P4kHSqmY/9Y X-Received: by 2002:a05:620a:2b4e:b0:93f:228c:5301 with SMTP id af79cd13be357-93f6f85ede5mr487622585a.64.1792772485729; Fri, 23 Oct 2026 09:21:25 -0700 (PDT) X-Received: by 2002:a05:620a:2b4e:b0:93f:228c:5301 with SMTP id af79cd13be357-93f6f85ede5mr487613085a.64.1792772484630; Fri, 23 Oct 2026 09:21:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 65/83] target/loongarch: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:13 +0200 Message-ID: <20261023161332.60153-66-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: 63ydEZrSrRzcui9vcmAFkByYF2nQA6Vv X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX7l5/7JJWl8Xq oN/KZir7ZqpAciqImsBwDoGfx6Va/oX74OEOPXd9/bclK0QIjoecHpvYr5c5AcbiCw8taeo11M0 D/7++jxEiLDfQDBeS4WmiBvIY3F+nog= X-Authority-Analysis: v=2.4 cv=QdTzLcbv c=1 sm=1 tr=0 ts=6adb8987 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=SQnn4VcWqfzk9PnhchsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: 63ydEZrSrRzcui9vcmAFkByYF2nQA6Vv X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX1IiQ3DYCTIYJ EbJhwE3EO7NCYEZT3LAQ8wvcFRrVQ0+KTC1mckz040YZznO6o9b7StlwQH9byxz7qOctDryxcmP S/HC3Din5EWI+cT14absBmU5yeu+tBxNSMX3YS6bzJEdIHLnZMA3sobECUIDntBj00U/j50Zla0 CZ2cEdiUerXI83gNQGp7nQvh2qfvYRHwxc3blw/d75Va0E7rhDW2UpLGt6OEq05ak+TrbKy0V+w LkCqsoBddCE4WGvaKCh0vz12JLkvfPbOF5x/Wt6IEONIelVKYuADtM+Fa4PG4AvwAZHb68RGzsV eNYfLeLEnC3EXD80bnKj1gqP1B3Mq/b/hUeIvKtx0XprwVOSuf9H0aZuLIvJWMcMl4A63kzze2R 6DeWGJxZY3kVHTvEs+3+Ymb5jci9/GSyUMfToJD9RfzIxyDpmsB58o6LCpp0gEfc9IIUXn7etpi 23UnzPLZSYHU05MQpJQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772512425158501 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-7-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/tcg/csr_helper.c | 22 ++--- target/loongarch/tcg/fpu_helper.c | 126 ++++++++++++++-------------- target/loongarch/tcg/iocsr_helper.c | 16 ++-- target/loongarch/tcg/op_helper.c | 18 ++-- target/loongarch/tcg/tlb_helper.c | 26 +++--- target/loongarch/tcg/vec_helper.c | 4 +- 6 files changed, 106 insertions(+), 106 deletions(-) diff --git a/target/loongarch/tcg/csr_helper.c b/target/loongarch/tcg/csr_h= elper.c index 1a6919417fc..7cba8035df4 100644 --- a/target/loongarch/tcg/csr_helper.c +++ b/target/loongarch/tcg/csr_helper.c @@ -18,7 +18,7 @@ #include "cpu-csr.h" #include "cpu-mmu.h" =20 -target_ulong helper_csrwr_stlbps(CPULoongArchState *env, target_ulong val) +target_ulong HELPER(csrwr_stlbps)(CPULoongArchState *env, target_ulong val) { CPUSysState *sys =3D env_sys(env); int64_t old_v =3D sys->CSR_STLBPS; @@ -40,7 +40,7 @@ target_ulong helper_csrwr_stlbps(CPULoongArchState *env, = target_ulong val) return old_v; } =20 -target_ulong helper_csrrd_pgd(CPULoongArchState *env) +target_ulong HELPER(csrrd_pgd)(CPULoongArchState *env) { int64_t v; CPUSysState *sys =3D env_sys(env); @@ -60,7 +60,7 @@ target_ulong helper_csrrd_pgd(CPULoongArchState *env) return v; } =20 -target_ulong helper_csrrd_cpuid(CPULoongArchState *env) +target_ulong HELPER(csrrd_cpuid)(CPULoongArchState *env) { LoongArchCPU *lac =3D env_archcpu(env); CPUSysState *sys =3D env_sys(env); @@ -70,12 +70,12 @@ target_ulong helper_csrrd_cpuid(CPULoongArchState *env) return sys->CSR_CPUID; } =20 -target_ulong helper_csrrd_tval(CPULoongArchState *env) +target_ulong HELPER(csrrd_tval)(CPULoongArchState *env) { return cpu_loongarch_get_timer_ticks(env_timer(env)); } =20 -target_ulong helper_csrrd_msgir(CPULoongArchState *env) +target_ulong HELPER(csrrd_msgir)(CPULoongArchState *env) { int irq, new; CPUSysState *sys =3D env_sys(env); @@ -97,7 +97,7 @@ target_ulong helper_csrrd_msgir(CPULoongArchState *env) return irq; } =20 -target_ulong helper_csrwr_estat(CPULoongArchState *env, target_ulong val) +target_ulong HELPER(csrwr_estat)(CPULoongArchState *env, target_ulong val) { CPUSysState *sys =3D env_sys(env); int64_t old_v =3D sys->CSR_ESTAT; @@ -118,7 +118,7 @@ target_ulong helper_csrwr_estat(CPULoongArchState *env,= target_ulong val) return old_v; } =20 -target_ulong helper_csrwr_asid(CPULoongArchState *env, target_ulong val) +target_ulong HELPER(csrwr_asid)(CPULoongArchState *env, target_ulong val) { CPUSysState *sys =3D env_sys(env); int64_t old_v =3D sys->CSR_ASID; @@ -131,7 +131,7 @@ target_ulong helper_csrwr_asid(CPULoongArchState *env, = target_ulong val) return old_v; } =20 -target_ulong helper_csrwr_tcfg(CPULoongArchState *env, target_ulong val) +target_ulong HELPER(csrwr_tcfg)(CPULoongArchState *env, target_ulong val) { CPUTimerState *timer =3D env_timer(env); CPUSysState *sys =3D container_of(timer, CPUSysState, timer_state); @@ -142,7 +142,7 @@ target_ulong helper_csrwr_tcfg(CPULoongArchState *env, = target_ulong val) return old_v; } =20 -target_ulong helper_csrwr_ticlr(CPULoongArchState *env, target_ulong val) +target_ulong HELPER(csrwr_ticlr)(CPULoongArchState *env, target_ulong val) { CPUTimerState *timer =3D env_timer(env); int64_t old_v =3D 0; @@ -155,7 +155,7 @@ target_ulong helper_csrwr_ticlr(CPULoongArchState *env,= target_ulong val) return old_v; } =20 -target_ulong helper_csrwr_pwcl(CPULoongArchState *env, target_ulong val) +target_ulong HELPER(csrwr_pwcl)(CPULoongArchState *env, target_ulong val) { uint8_t shift, ptbase; CPUSysState *sys =3D env_sys(env); @@ -180,7 +180,7 @@ target_ulong helper_csrwr_pwcl(CPULoongArchState *env, = target_ulong val) return old_v; } =20 -target_ulong helper_csrwr_pwch(CPULoongArchState *env, target_ulong val) +target_ulong HELPER(csrwr_pwch)(CPULoongArchState *env, target_ulong val) { uint8_t has_ptw; CPUSysState *sys =3D env_sys(env); diff --git a/target/loongarch/tcg/fpu_helper.c b/target/loongarch/tcg/fpu_h= elper.c index fc9c64c20a8..cf7c77b1b05 100644 --- a/target/loongarch/tcg/fpu_helper.c +++ b/target/loongarch/tcg/fpu_helper.c @@ -90,7 +90,7 @@ static void update_fcsr0(CPULoongArchState *env, uintptr_= t pc) update_fcsr0_mask(env, pc, 0); } =20 -uint64_t helper_fadd_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fadd_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -99,7 +99,7 @@ uint64_t helper_fadd_s(CPULoongArchState *env, uint64_t f= j, uint64_t fk) return fd; } =20 -uint64_t helper_fadd_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fadd_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -108,7 +108,7 @@ uint64_t helper_fadd_d(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fsub_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fsub_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -117,7 +117,7 @@ uint64_t helper_fsub_s(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fsub_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fsub_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -126,7 +126,7 @@ uint64_t helper_fsub_d(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmul_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmul_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -135,7 +135,7 @@ uint64_t helper_fmul_s(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmul_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmul_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -144,7 +144,7 @@ uint64_t helper_fmul_d(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fdiv_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fdiv_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -153,7 +153,7 @@ uint64_t helper_fdiv_s(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fdiv_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fdiv_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -162,7 +162,7 @@ uint64_t helper_fdiv_d(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmax_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmax_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -171,7 +171,7 @@ uint64_t helper_fmax_s(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmax_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmax_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -180,7 +180,7 @@ uint64_t helper_fmax_d(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmin_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmin_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -189,7 +189,7 @@ uint64_t helper_fmin_s(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmin_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmin_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -198,7 +198,7 @@ uint64_t helper_fmin_d(CPULoongArchState *env, uint64_t= fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmaxa_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmaxa_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -208,7 +208,7 @@ uint64_t helper_fmaxa_s(CPULoongArchState *env, uint64_= t fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmaxa_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmaxa_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -217,7 +217,7 @@ uint64_t helper_fmaxa_d(CPULoongArchState *env, uint64_= t fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmina_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmina_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -227,7 +227,7 @@ uint64_t helper_fmina_s(CPULoongArchState *env, uint64_= t fj, uint64_t fk) return fd; } =20 -uint64_t helper_fmina_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fmina_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk) { uint64_t fd; =20 @@ -236,7 +236,7 @@ uint64_t helper_fmina_d(CPULoongArchState *env, uint64_= t fj, uint64_t fk) return fd; } =20 -uint64_t helper_fscaleb_s(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fscaleb_s)(CPULoongArchState *env, uint64_t fj, uint64_t f= k) { uint64_t fd; int32_t n =3D (int32_t)fk; @@ -249,7 +249,7 @@ uint64_t helper_fscaleb_s(CPULoongArchState *env, uint6= 4_t fj, uint64_t fk) return fd; } =20 -uint64_t helper_fscaleb_d(CPULoongArchState *env, uint64_t fj, uint64_t fk) +uint64_t HELPER(fscaleb_d)(CPULoongArchState *env, uint64_t fj, uint64_t f= k) { uint64_t fd; int64_t n =3D (int64_t)fk; @@ -262,7 +262,7 @@ uint64_t helper_fscaleb_d(CPULoongArchState *env, uint6= 4_t fj, uint64_t fk) return fd; } =20 -uint64_t helper_fsqrt_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(fsqrt_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -271,7 +271,7 @@ uint64_t helper_fsqrt_s(CPULoongArchState *env, uint64_= t fj) return fd; } =20 -uint64_t helper_fsqrt_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(fsqrt_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -280,7 +280,7 @@ uint64_t helper_fsqrt_d(CPULoongArchState *env, uint64_= t fj) return fd; } =20 -uint64_t helper_frecip_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(frecip_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -289,7 +289,7 @@ uint64_t helper_frecip_s(CPULoongArchState *env, uint64= _t fj) return fd; } =20 -uint64_t helper_frecip_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(frecip_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -298,7 +298,7 @@ uint64_t helper_frecip_d(CPULoongArchState *env, uint64= _t fj) return fd; } =20 -uint64_t helper_frsqrt_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(frsqrt_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; uint32_t fp; @@ -309,7 +309,7 @@ uint64_t helper_frsqrt_s(CPULoongArchState *env, uint64= _t fj) return fd; } =20 -uint64_t helper_frsqrt_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(frsqrt_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fp, fd; =20 @@ -319,7 +319,7 @@ uint64_t helper_frsqrt_d(CPULoongArchState *env, uint64= _t fj) return fd; } =20 -uint64_t helper_flogb_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(flogb_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; uint32_t fp; @@ -334,7 +334,7 @@ uint64_t helper_flogb_s(CPULoongArchState *env, uint64_= t fj) return fd; } =20 -uint64_t helper_flogb_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(flogb_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; float_status *status =3D &env->fp_status; @@ -348,7 +348,7 @@ uint64_t helper_flogb_d(CPULoongArchState *env, uint64_= t fj) return fd; } =20 -uint64_t helper_fclass_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(fclass_s)(CPULoongArchState *env, uint64_t fj) { float32 f =3D fj; bool sign =3D float32_is_neg(f); @@ -366,7 +366,7 @@ uint64_t helper_fclass_s(CPULoongArchState *env, uint64= _t fj) } } =20 -uint64_t helper_fclass_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(fclass_d)(CPULoongArchState *env, uint64_t fj) { float64 f =3D fj; bool sign =3D float64_is_neg(f); @@ -384,7 +384,7 @@ uint64_t helper_fclass_d(CPULoongArchState *env, uint64= _t fj) } } =20 -uint64_t helper_fmuladd_s(CPULoongArchState *env, uint64_t fj, +uint64_t HELPER(fmuladd_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk, uint64_t fa, uint32_t flag) { uint64_t fd; @@ -395,7 +395,7 @@ uint64_t helper_fmuladd_s(CPULoongArchState *env, uint6= 4_t fj, return fd; } =20 -uint64_t helper_fmuladd_d(CPULoongArchState *env, uint64_t fj, +uint64_t HELPER(fmuladd_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk, uint64_t fa, uint32_t flag) { uint64_t fd; @@ -432,7 +432,7 @@ static uint64_t fcmp_common(CPULoongArchState *env, Flo= atRelation cmp, } =20 /* fcmp_cXXX_s */ -uint64_t helper_fcmp_c_s(CPULoongArchState *env, uint64_t fj, +uint64_t HELPER(fcmp_c_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk, uint32_t flags) { FloatRelation cmp =3D float32_compare_quiet((uint32_t)fj, @@ -441,7 +441,7 @@ uint64_t helper_fcmp_c_s(CPULoongArchState *env, uint64= _t fj, } =20 /* fcmp_sXXX_s */ -uint64_t helper_fcmp_s_s(CPULoongArchState *env, uint64_t fj, +uint64_t HELPER(fcmp_s_s)(CPULoongArchState *env, uint64_t fj, uint64_t fk, uint32_t flags) { FloatRelation cmp =3D float32_compare((uint32_t)fj, @@ -450,7 +450,7 @@ uint64_t helper_fcmp_s_s(CPULoongArchState *env, uint64= _t fj, } =20 /* fcmp_cXXX_d */ -uint64_t helper_fcmp_c_d(CPULoongArchState *env, uint64_t fj, +uint64_t HELPER(fcmp_c_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk, uint32_t flags) { FloatRelation cmp =3D float64_compare_quiet(fj, fk, &env->fp_status); @@ -458,7 +458,7 @@ uint64_t helper_fcmp_c_d(CPULoongArchState *env, uint64= _t fj, } =20 /* fcmp_sXXX_d */ -uint64_t helper_fcmp_s_d(CPULoongArchState *env, uint64_t fj, +uint64_t HELPER(fcmp_s_d)(CPULoongArchState *env, uint64_t fj, uint64_t fk, uint32_t flags) { FloatRelation cmp =3D float64_compare(fj, fk, &env->fp_status); @@ -466,7 +466,7 @@ uint64_t helper_fcmp_s_d(CPULoongArchState *env, uint64= _t fj, } =20 /* floating point conversion */ -uint64_t helper_fcvt_s_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(fcvt_s_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -475,7 +475,7 @@ uint64_t helper_fcvt_s_d(CPULoongArchState *env, uint64= _t fj) return fd; } =20 -uint64_t helper_fcvt_d_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(fcvt_d_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -484,7 +484,7 @@ uint64_t helper_fcvt_d_s(CPULoongArchState *env, uint64= _t fj) return fd; } =20 -uint64_t helper_ffint_s_w(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ffint_s_w)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -493,7 +493,7 @@ uint64_t helper_ffint_s_w(CPULoongArchState *env, uint6= 4_t fj) return fd; } =20 -uint64_t helper_ffint_s_l(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ffint_s_l)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -502,7 +502,7 @@ uint64_t helper_ffint_s_l(CPULoongArchState *env, uint6= 4_t fj) return fd; } =20 -uint64_t helper_ffint_d_w(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ffint_d_w)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -511,7 +511,7 @@ uint64_t helper_ffint_d_w(CPULoongArchState *env, uint6= 4_t fj) return fd; } =20 -uint64_t helper_ffint_d_l(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ffint_d_l)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -520,7 +520,7 @@ uint64_t helper_ffint_d_l(CPULoongArchState *env, uint6= 4_t fj) return fd; } =20 -uint64_t helper_frint_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(frint_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -529,7 +529,7 @@ uint64_t helper_frint_s(CPULoongArchState *env, uint64_= t fj) return fd; } =20 -uint64_t helper_frint_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(frint_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -538,7 +538,7 @@ uint64_t helper_frint_d(CPULoongArchState *env, uint64_= t fj) return fd; } =20 -uint64_t helper_ftintrm_l_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrm_l_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -556,7 +556,7 @@ uint64_t helper_ftintrm_l_d(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrm_l_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrm_l_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -574,7 +574,7 @@ uint64_t helper_ftintrm_l_s(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrm_w_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrm_w_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -592,7 +592,7 @@ uint64_t helper_ftintrm_w_d(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrm_w_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrm_w_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -610,7 +610,7 @@ uint64_t helper_ftintrm_w_s(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrp_l_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrp_l_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -628,7 +628,7 @@ uint64_t helper_ftintrp_l_d(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrp_l_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrp_l_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -646,7 +646,7 @@ uint64_t helper_ftintrp_l_s(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrp_w_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrp_w_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -664,7 +664,7 @@ uint64_t helper_ftintrp_w_d(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrp_w_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrp_w_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -682,7 +682,7 @@ uint64_t helper_ftintrp_w_s(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrz_l_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrz_l_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -699,7 +699,7 @@ uint64_t helper_ftintrz_l_d(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrz_l_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrz_l_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -716,7 +716,7 @@ uint64_t helper_ftintrz_l_s(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrz_w_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrz_w_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -733,7 +733,7 @@ uint64_t helper_ftintrz_w_d(CPULoongArchState *env, uin= t64_t fj) return fd; } =20 -uint64_t helper_ftintrz_w_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrz_w_s)(CPULoongArchState *env, uint64_t fj) { uint32_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -750,7 +750,7 @@ uint64_t helper_ftintrz_w_s(CPULoongArchState *env, uin= t64_t fj) return (uint64_t)fd; } =20 -uint64_t helper_ftintrne_l_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrne_l_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -768,7 +768,7 @@ uint64_t helper_ftintrne_l_d(CPULoongArchState *env, ui= nt64_t fj) return fd; } =20 -uint64_t helper_ftintrne_l_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrne_l_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -786,7 +786,7 @@ uint64_t helper_ftintrne_l_s(CPULoongArchState *env, ui= nt64_t fj) return fd; } =20 -uint64_t helper_ftintrne_w_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrne_w_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -804,7 +804,7 @@ uint64_t helper_ftintrne_w_d(CPULoongArchState *env, ui= nt64_t fj) return fd; } =20 -uint64_t helper_ftintrne_w_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftintrne_w_s)(CPULoongArchState *env, uint64_t fj) { uint32_t fd; FloatRoundMode old_mode =3D get_float_rounding_mode(&env->fp_status); @@ -822,7 +822,7 @@ uint64_t helper_ftintrne_w_s(CPULoongArchState *env, ui= nt64_t fj) return (uint64_t)fd; } =20 -uint64_t helper_ftint_l_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftint_l_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -836,7 +836,7 @@ uint64_t helper_ftint_l_d(CPULoongArchState *env, uint6= 4_t fj) return fd; } =20 -uint64_t helper_ftint_l_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftint_l_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -850,7 +850,7 @@ uint64_t helper_ftint_l_s(CPULoongArchState *env, uint6= 4_t fj) return fd; } =20 -uint64_t helper_ftint_w_s(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftint_w_s)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -864,7 +864,7 @@ uint64_t helper_ftint_w_s(CPULoongArchState *env, uint6= 4_t fj) return fd; } =20 -uint64_t helper_ftint_w_d(CPULoongArchState *env, uint64_t fj) +uint64_t HELPER(ftint_w_d)(CPULoongArchState *env, uint64_t fj) { uint64_t fd; =20 @@ -878,7 +878,7 @@ uint64_t helper_ftint_w_d(CPULoongArchState *env, uint6= 4_t fj) return fd; } =20 -void helper_set_rounding_mode(CPULoongArchState *env) +void HELPER(set_rounding_mode)(CPULoongArchState *env) { set_float_rounding_mode(ieee_rm[(env->fcsr0 >> FCSR0_RM) & 0x3], &env->fp_status); diff --git a/target/loongarch/tcg/iocsr_helper.c b/target/loongarch/tcg/ioc= sr_helper.c index b0f171608bc..be705cebbb1 100644 --- a/target/loongarch/tcg/iocsr_helper.c +++ b/target/loongarch/tcg/iocsr_helper.c @@ -14,52 +14,52 @@ #define GET_MEMTXATTRS(cas) \ ((MemTxAttrs){.requester_id =3D env_cpu(cas)->cpu_index}) =20 -uint64_t helper_iocsrrd_b(CPULoongArchState *env, target_ulong r_addr) +uint64_t HELPER(iocsrrd_b)(CPULoongArchState *env, target_ulong r_addr) { return address_space_ldub(env->address_space_iocsr, r_addr, GET_MEMTXATTRS(env), NULL); } =20 -uint64_t helper_iocsrrd_h(CPULoongArchState *env, target_ulong r_addr) +uint64_t HELPER(iocsrrd_h)(CPULoongArchState *env, target_ulong r_addr) { return address_space_lduw_le(env->address_space_iocsr, r_addr, GET_MEMTXATTRS(env), NULL); } =20 -uint64_t helper_iocsrrd_w(CPULoongArchState *env, target_ulong r_addr) +uint64_t HELPER(iocsrrd_w)(CPULoongArchState *env, target_ulong r_addr) { return address_space_ldl_le(env->address_space_iocsr, r_addr, GET_MEMTXATTRS(env), NULL); } =20 -uint64_t helper_iocsrrd_d(CPULoongArchState *env, target_ulong r_addr) +uint64_t HELPER(iocsrrd_d)(CPULoongArchState *env, target_ulong r_addr) { return address_space_ldq_le(env->address_space_iocsr, r_addr, GET_MEMTXATTRS(env), NULL); } =20 -void helper_iocsrwr_b(CPULoongArchState *env, target_ulong w_addr, +void HELPER(iocsrwr_b)(CPULoongArchState *env, target_ulong w_addr, target_ulong val) { address_space_stb(env->address_space_iocsr, w_addr, val, GET_MEMTXATTRS(env), NULL); } =20 -void helper_iocsrwr_h(CPULoongArchState *env, target_ulong w_addr, +void HELPER(iocsrwr_h)(CPULoongArchState *env, target_ulong w_addr, target_ulong val) { address_space_stw_le(env->address_space_iocsr, w_addr, val, GET_MEMTXATTRS(env), NULL); } =20 -void helper_iocsrwr_w(CPULoongArchState *env, target_ulong w_addr, +void HELPER(iocsrwr_w)(CPULoongArchState *env, target_ulong w_addr, target_ulong val) { address_space_stl_le(env->address_space_iocsr, w_addr, val, GET_MEMTXATTRS(env), NULL); } =20 -void helper_iocsrwr_d(CPULoongArchState *env, target_ulong w_addr, +void HELPER(iocsrwr_d)(CPULoongArchState *env, target_ulong w_addr, target_ulong val) { address_space_stq_le(env->address_space_iocsr, w_addr, diff --git a/target/loongarch/tcg/op_helper.c b/target/loongarch/tcg/op_hel= per.c index f98fe4d4a16..44772d03a4b 100644 --- a/target/loongarch/tcg/op_helper.c +++ b/target/loongarch/tcg/op_helper.c @@ -17,13 +17,13 @@ #include "cpu-csr.h" =20 /* Exceptions helpers */ -void helper_raise_exception(CPULoongArchState *env, uint32_t exception) +void HELPER(raise_exception)(CPULoongArchState *env, uint32_t exception) { do_raise_exception(env, exception, GETPC()); } =20 /* loongarch assert op */ -void helper_asrtle_d(CPULoongArchState *env, target_ulong rj, target_ulong= rk) +void HELPER(asrtle_d)(CPULoongArchState *env, target_ulong rj, target_ulon= g rk) { CPUSysState *sys =3D env_sys(env); =20 @@ -33,7 +33,7 @@ void helper_asrtle_d(CPULoongArchState *env, target_ulong= rj, target_ulong rk) } } =20 -void helper_asrtgt_d(CPULoongArchState *env, target_ulong rj, target_ulong= rk) +void HELPER(asrtgt_d)(CPULoongArchState *env, target_ulong rj, target_ulon= g rk) { CPUSysState *sys =3D env_sys(env); =20 @@ -43,7 +43,7 @@ void helper_asrtgt_d(CPULoongArchState *env, target_ulong= rj, target_ulong rk) } } =20 -target_ulong helper_crc32(target_ulong val, target_ulong m, uint64_t sz) +target_ulong HELPER(crc32)(target_ulong val, target_ulong m, uint64_t sz) { uint8_t buf[8]; target_ulong mask =3D ((sz * 8) =3D=3D 64) ? -1ULL : ((1ULL << (sz * 8= )) - 1); @@ -53,7 +53,7 @@ target_ulong helper_crc32(target_ulong val, target_ulong = m, uint64_t sz) return (int32_t) (crc32(val ^ 0xffffffff, buf, sz) ^ 0xffffffff); } =20 -target_ulong helper_crc32c(target_ulong val, target_ulong m, uint64_t sz) +target_ulong HELPER(crc32c)(target_ulong val, target_ulong m, uint64_t sz) { uint8_t buf[8]; target_ulong mask =3D ((sz * 8) =3D=3D 64) ? -1ULL : ((1ULL << (sz * 8= )) - 1); @@ -62,12 +62,12 @@ target_ulong helper_crc32c(target_ulong val, target_ulo= ng m, uint64_t sz) return (int32_t) (crc32c(val, buf, sz) ^ 0xffffffff); } =20 -target_ulong helper_cpucfg(CPULoongArchState *env, target_ulong rj) +target_ulong HELPER(cpucfg)(CPULoongArchState *env, target_ulong rj) { return rj >=3D ARRAY_SIZE(env->cpucfg) ? 0 : env->cpucfg[rj]; } =20 -uint64_t helper_rdtime_d(CPULoongArchState *env) +uint64_t HELPER(rdtime_d)(CPULoongArchState *env) { #ifdef CONFIG_USER_ONLY return cpu_get_host_ticks(); @@ -86,7 +86,7 @@ uint64_t helper_rdtime_d(CPULoongArchState *env) } =20 #ifndef CONFIG_USER_ONLY -void helper_ertn(CPULoongArchState *env) +void HELPER(ertn)(CPULoongArchState *env) { uint64_t csr_pplv, csr_pie; CPUSysState *sys =3D env_sys(env); @@ -115,7 +115,7 @@ void helper_ertn(CPULoongArchState *env) env->lladdr =3D 1; } =20 -void helper_idle(CPULoongArchState *env) +void HELPER(idle)(CPULoongArchState *env) { CPUState *cs =3D env_cpu(env); =20 diff --git a/target/loongarch/tcg/tlb_helper.c b/target/loongarch/tcg/tlb_h= elper.c index 40cc0764248..479c0b208d6 100644 --- a/target/loongarch/tcg/tlb_helper.c +++ b/target/loongarch/tcg/tlb_helper.c @@ -310,7 +310,7 @@ static bool loongarch_tlb_search(CPULoongArchState *env= , vaddr vaddr, return false; } =20 -void helper_tlbsrch(CPULoongArchState *env) +void HELPER(tlbsrch)(CPULoongArchState *env) { int index, match; CPUSysState *sys =3D env_sys(env); @@ -330,7 +330,7 @@ void helper_tlbsrch(CPULoongArchState *env) sys->CSR_TLBIDX =3D FIELD_DP64(sys->CSR_TLBIDX, CSR_TLBIDX, NE, 1); } =20 -void helper_tlbrd(CPULoongArchState *env) +void HELPER(tlbrd)(CPULoongArchState *env) { LoongArchTLB *tlb; int index; @@ -389,7 +389,7 @@ static void update_tlb_index(CPULoongArchState *env, MM= UContext *context, *old =3D new; } =20 -void helper_tlbwr(CPULoongArchState *env) +void HELPER(tlbwr)(CPULoongArchState *env) { CPUSysState *sys =3D env_sys(env); int index =3D FIELD_EX64(sys->CSR_TLBIDX, CSR_TLBIDX, INDEX); @@ -469,7 +469,7 @@ static int get_tlb_random_index(CPULoongArchState *env,= vaddr addr, return index; } =20 -void helper_tlbfill(CPULoongArchState *env) +void HELPER(tlbfill)(CPULoongArchState *env) { vaddr entryhi; int index, pagesize; @@ -492,7 +492,7 @@ void helper_tlbfill(CPULoongArchState *env) fill_tlb_entry(env, env->tlb + index, &context); } =20 -void helper_tlbclr(CPULoongArchState *env) +void HELPER(tlbclr)(CPULoongArchState *env) { LoongArchTLB *tlb; int i, index; @@ -527,7 +527,7 @@ void helper_tlbclr(CPULoongArchState *env) tlb_flush(env_cpu(env)); } =20 -void helper_tlbflush(CPULoongArchState *env) +void HELPER(tlbflush)(CPULoongArchState *env) { int i, index; CPUSysState *sys =3D env_sys(env); @@ -552,7 +552,7 @@ void helper_tlbflush(CPULoongArchState *env) tlb_flush(env_cpu(env)); } =20 -void helper_invtlb_all(CPULoongArchState *env) +void HELPER(invtlb_all)(CPULoongArchState *env) { for (int i =3D 0; i < LOONGARCH_TLB_MAX; i++) { env->tlb[i].tlb_misc =3D FIELD_DP64(env->tlb[i].tlb_misc, @@ -561,7 +561,7 @@ void helper_invtlb_all(CPULoongArchState *env) tlb_flush(env_cpu(env)); } =20 -void helper_invtlb_all_g(CPULoongArchState *env, uint32_t g) +void HELPER(invtlb_all_g)(CPULoongArchState *env, uint32_t g) { for (int i =3D 0; i < LOONGARCH_TLB_MAX; i++) { LoongArchTLB *tlb =3D &env->tlb[i]; @@ -574,7 +574,7 @@ void helper_invtlb_all_g(CPULoongArchState *env, uint32= _t g) tlb_flush(env_cpu(env)); } =20 -void helper_invtlb_all_asid(CPULoongArchState *env, target_ulong info) +void HELPER(invtlb_all_asid)(CPULoongArchState *env, target_ulong info) { uint16_t asid =3D info & R_CSR_ASID_ASID_MASK; =20 @@ -590,7 +590,7 @@ void helper_invtlb_all_asid(CPULoongArchState *env, tar= get_ulong info) tlb_flush(env_cpu(env)); } =20 -void helper_invtlb_page_asid(CPULoongArchState *env, target_ulong info, +void HELPER(invtlb_page_asid)(CPULoongArchState *env, target_ulong info, target_ulong addr) { int asid =3D info & 0x3ff; @@ -604,7 +604,7 @@ void helper_invtlb_page_asid(CPULoongArchState *env, ta= rget_ulong info, } } =20 -void helper_invtlb_page_asid_or_g(CPULoongArchState *env, +void HELPER(invtlb_page_asid_or_g)(CPULoongArchState *env, target_ulong info, target_ulong addr) { int asid =3D info & 0x3ff; @@ -718,7 +718,7 @@ static inline uint64_t loongarch_sanitize_hw_pte(CPULoo= ngArchState *env, return (pte & ~ppn_mask) | ((pte & ppn_mask) & palen_mask); } =20 -target_ulong helper_lddir(CPULoongArchState *env, target_ulong base, +target_ulong HELPER(lddir)(CPULoongArchState *env, target_ulong base, uint32_t level, uint32_t mem_idx) { CPUState *cs =3D env_cpu(env); @@ -759,7 +759,7 @@ target_ulong helper_lddir(CPULoongArchState *env, targe= t_ulong base, return val & palen_mask; } =20 -void helper_ldpte(CPULoongArchState *env, target_ulong base, target_ulong = odd, +void HELPER(ldpte)(CPULoongArchState *env, target_ulong base, target_ulong= odd, uint32_t mem_idx) { CPUState *cs =3D env_cpu(env); diff --git a/target/loongarch/tcg/vec_helper.c b/target/loongarch/tcg/vec_h= elper.c index a270998e638..3ada636cd9f 100644 --- a/target/loongarch/tcg/vec_helper.c +++ b/target/loongarch/tcg/vec_helper.c @@ -2511,8 +2511,8 @@ void HELPER(NAME)(void *vd, void *vj, = \ } \ } =20 -FCLASS(vfclass_s, 32, UW, helper_fclass_s) -FCLASS(vfclass_d, 64, UD, helper_fclass_d) +FCLASS(vfclass_s, 32, UW, HELPER(fclass_s)) +FCLASS(vfclass_d, 64, UD, HELPER(fclass_d)) =20 #define FSQRT(BIT, T) \ static T do_fsqrt_## BIT(CPULoongArchState *env, T fj) \ --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772679; cv=none; d=zohomail.com; s=zohoarc; b=BSj0cCfWe9qNRnSSb7+A9+p/yVg+KlXVlaa3lrf4FgjItUNjDaSeZG/yqF6kKaVKwE2np2MqmS1f2VbpHnLEkTeXz/KvUP2N5DqztPDW4jvZ3zOAgOXY7+umfxdRii1MjDE9FHjdgKAWYp4D9u0h8VTB/py+6oQteizCgu1xPHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772679; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=k5TUrT7aocWpW3v8fq3cGIu0S7N3wPDqhm4F1tDApd8=; b=ck2ANpjxGRVRsTZCqDdcC7gC3cNbQDUpT0NZg55LE3QxEZMgEDT/3C1mTWSnC7hG1j37+j6Alv5LjX2S5MZ4muv4hL01WSSc7N6NXcyJ+bZ40J86UkIet4mfxm3x9G9sf842W7fNbKUkuoBvb6TW7DEVxgLm8PL04L5atVa1Gh0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772679527941.8399567806747; Fri, 23 Oct 2026 09:24:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI1c-00031n-QF; Fri, 23 Oct 2026 12:21:48 -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 1xKI1S-0002FL-FD for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:38 -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 1xKI1Q-00033D-7T for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:38 -0400 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5xla2109294 for ; Fri, 23 Oct 2026 16:21:33 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqms4gxw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:21:33 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93f568dee56so218438485a.0 for ; Fri, 23 Oct 2026 09:21:33 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2b061ceb7sm14315195e9.6.2026.10.23.09.21.30 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= k5TUrT7aocWpW3v8fq3cGIu0S7N3wPDqhm4F1tDApd8=; b=MCkrI7uzDXpHRCI2 DQU7PDo8tqoEMs8UjxhhMjPrGNqj7cjXot/5l2qQoXXfMXF1C+vKX67/TI0YZD9M O8CfGXnjzkUtAR4U1fglxtK3yB24j+nm9TXbz0v5pQPDlCg1HuNFQvwdhBJAOuin xDJtmpP8EXpveevj9e3YWz370mhv0o6jEnd0VztqjdVEaGOhgtn+eVgp3phQ7gLX l+2cv/AgbH2+nUb+mVrFUhxE3+6c1XIX1fPaG18M5WLxKk0VTlqVDjp3Hyh25E26 GQbPlu3j55yAVC8HWi+0iagj2lA7WKr1OshBh88NQZHyxrKEHeQYNAPrxYSrlHda i0rmqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772492; x=1793377292; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=k5TUrT7aocWpW3v8fq3cGIu0S7N3wPDqhm4F1tDApd8=; b=C94wvQufWK7joNO353XS9h5/chJYDHbAF584G4JrN5pZF8CT9wgEjotDppuiam16Ju 39FjkDQJZac53D6WKuqhPmJ2LN4YbMsO9LkEzMrKoy16I40SxJ2LJqGMmZaDrG0jrMGn yFK9Xnzpn5YCA8o+07otomn3KghkgKY+tHTkZVcQ28G1bov4NC+ti2SAvUj/CzTu0+Gc OIa1DQ0ZEVmxyOx7IWsFeiNWMY9IWEy+w6O9kmHY4rb7EcumuS24eDHFA5BfayqAilgp z3AL9lP6R+rk8tz7GkHcvRE5cbQ7gZQkG6OEdeJR5+Lj/5eIS/6/hwTXMRqagbGW2Ibe D56Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772492; x=1793377292; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=k5TUrT7aocWpW3v8fq3cGIu0S7N3wPDqhm4F1tDApd8=; b=CEEzv64d85u5o5ivdKaR2Adi1tl17SzPrNRrAzXAAfM6cGRn4ewbpqpIUoFhuGOH7f u0bBb9vu3RdsLl7NIaILt3v4/I0L0fl9yd0PQd1f+7ca9KB2BUuUnw2m7Bddk2S/dBY0 77h3AAHyYCo7UgklZ1z0xr0sOYMdfVWFWcZxm9qvQ65btHpfssG/taOLZWG8k8U4m4JC FmAZHzJ0ZG/2AI7njAabzrfuVXXWexMJbU3AMeSC69div2ZOnYB87aKJsx+tuqWOjF5M uoB03nzFm70l6Rd4AnrGUBhXdpzALRArbzR9qnTfm3WPeMHPkZJeG2aQhOHLA8Hi+JZS 94kw== X-Gm-Message-State: AFq9FYLOfmarqnC5NdqHw55TZ1F+h39bmBblJ7ChYDYdW5dGh4e+CHfa 4czL3TwYZ+pHEC3BdMFfTIo5eIFPmTOBgrmhQZHPGttuRNPUXtosP8xq3UCNpzoW1Q5BsrByeYJ TXljfoN9uiAWjlJ5+2f4be0hxQxpyA9ZTpfpuu2cZ/5ceoA/yW7S04aeeNu9L6eMfbC3D X-Gm-Gg: AYBFou1F1LJoIYk973S+x8zCQ9VbW2AuoAv8fSazVx1+bjBo0uiM+9uGiXkgfy95ZjC g/Zv07++LiKPr/HuzYQSzQnSsWn6lBAlGIGygIL5FY3Eq9+/l8tsImp0Drfc1q/ebz94VaEI+PD cj8TSLlR3O34K34nqZhSqLnmh8Us/8IeMxG8P4sXunWpXnVB4qaujQjzVkqLPNnIfjUAHphJUYr pOz1zcJCsTUqW38iillF9WQoyET8o/D05RItBKDxWfKLEyHHDSztyOHTpSuvNdSRit/rV5skamU +yulsE9TMbB467iKJGmc5m7knj1Ecn96G13nWUiHmMGV1IxgjsE3+2UNKXRiTrcm3FpSTZRABxz QrjHzuVMGOwYqrUqAMIh8TULjN+dDaHcvKAYleoL+ X-Received: by 2002:a05:620a:470f:b0:93f:3829:8492 with SMTP id af79cd13be357-93f6fa11031mr475363285a.78.1792772492268; Fri, 23 Oct 2026 09:21:32 -0700 (PDT) X-Received: by 2002:a05:620a:470f:b0:93f:3829:8492 with SMTP id af79cd13be357-93f6fa11031mr475358685a.78.1792772491741; Fri, 23 Oct 2026 09:21:31 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 66/83] target/m68k: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:14 +0200 Message-ID: <20261023161332.60153-67-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX6SxlcK7nBBQ5 fEAPHntXnJZfqO0BhtXUtAmUF1V1IKrTSsAB7XedcP9Cflgv12v+XivD+nr38UbisOo8VrnjFvl w5mKGgjzktAJ4Wkh1HvFAoS1VS7bGsAK5q6lGyorGGTVcFB6xmQSyqAYlxGVhX5Ih2KKfw5g9a5 jnHIYiAcgpCQWdoEZ0BYhArzTSpQLnmd9eSyjc8pklioHBp6EBBMX14m3G5s3zwBsN2iFvE1XfX 4mDq2Cdwg5ATP79IjdFMhkGU9/YUV9hIVJ/FAklPl7epMOV6KsIsups7tAmhcVc0O1T7BjtDZHv 2Oq6Q2OEPZ75NjK4JpCheXjkpbYp9JAGvxoAl2iu1YnWEPjC+omEBWFWodTXKUGi0hV9fZdKuam nrln6bel54COeFI+Ym6J4zKZRYXiALCtnxh37Nm3MssNKtirV4QN9x/tE4cHHN5aMFbCe8pxcww yh2hP1jFTQ5BwlACXwA== X-Proofpoint-GUID: 9obkkN0z7_L0ZpbRET-8TvHK-QTGgJrd X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX5J94EZd19ye2 XEmx0/bowcERfZB8H+ggAz5pvgTeUeclOku2xz1Q/XqKWJBf2Rw6wsOYTAFMSV+zALWPEJwuYJJ tdG+N6wpFL8DfSsOPUj7fMYRMiGMdw8= X-Authority-Analysis: v=2.4 cv=UdbE26SN c=1 sm=1 tr=0 ts=6adb898d cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=Wv-XcSyDAywttTPMHZIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-ORIG-GUID: 9obkkN0z7_L0ZpbRET-8TvHK-QTGgJrd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772681444158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-8-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/m68k/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index c9db8a1b39d..3ab64b9f760 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -1036,7 +1036,7 @@ uint64_t HELPER(bfffo_mem)(CPUM68KState *env, uint32_= t addr, uint64_t data =3D bf_load(env, d.addr, d.blen, ra); uint64_t mask =3D -1ull << (64 - d.len) >> d.bofs; uint64_t n =3D (data & mask) << d.bofs; - uint32_t ffo =3D helper_bfffo_reg(n >> 32, ofs, d.len); + uint32_t ffo =3D HELPER(bfffo_reg)(n >> 32, ofs, d.len); =20 /* * Return FFO in the low word and N in the high word. --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772601; cv=none; d=zohomail.com; s=zohoarc; b=FV89vLBYFAU5COqC6rC1d6ex0KJgAr8CWdRsN1FIb6leoexeGZbrU6OnkwvhAqXqQAnrslPoxXCUWDopDhGHUepKrVZtITbl+JtLtBUYh9UkOhB3KEgWCqKGm+5lvhRXg1wPKM4513DrPFzf2+KQ8ln88P1R9atEeQCCsER7DPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772601; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=sQldV44I73JjgmYjMVE1gQAFJC6jiANA6oobIf4NEx0=; b=HJXTz5RC/bQKgPRZ5U9M0MNtbn1ZTixEBUzT4249SUbYnMzRYnPmMP7AEC8uikhkpO3bD33jHnOoRiMxwKRoV1CWqBXS1dVZiLyUsAtvBgThq4U1omU9sbzCj0qrFh6i9Rlpy8yf9aHODPttfl+uLuflSsJZ+oL8if4e0nShgvs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179277260103092.32801476212092; Fri, 23 Oct 2026 09:23:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI1f-0003CS-E4; Fri, 23 Oct 2026 12:21:51 -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 1xKI1b-0002wM-FW for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:47 -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 1xKI1Y-00033p-Oc for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:47 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5s9O4072757 for ; Fri, 23 Oct 2026 16:21:41 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7bw0xmu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:21:40 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93cbf2fd504so196625285a.2 for ; Fri, 23 Oct 2026 09:21:40 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d4104b5sm805362f8f.36.2026.10.23.09.21.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:21:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= sQldV44I73JjgmYjMVE1gQAFJC6jiANA6oobIf4NEx0=; b=WUuBDKH+z20ehp6S 0be4Z7nhjzLrlRzmMdiOlAtdWFwR+Q/7SuZTP7nf1/UQWbBwP4SGFkncY2M5LWA9 nfFpzGdAsEB5Hii8BUIwRi8st1EFhrco0TeSFgHLKoygg7mVtpLjBIj/K3qUq0Dc jkkKJFQE9mlyKvsChd7st47MIJYjEtQ7m3EvwPKa/XACDwEpw7ikOjvWgX8U2rQu w2E7cLzXBbqQatp8Pe3+55YlBDuftSG7sKaH0W2TwBm9ayN56u367gAeYvoQoVrg 3IAcuEq8RojOim5kKbGa+ZN8e+89jR/QEQYPiMhJFFW3IlLZM+dHpCmJS1g5EKPH PUfqjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772500; x=1793377300; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=sQldV44I73JjgmYjMVE1gQAFJC6jiANA6oobIf4NEx0=; b=iWpx+tq676dmK4d3IW7Odx9pICdEmu/9IvO6YvEPu2KeRgwKcgKZ6vMEuK6owOdZuM M+ON2Nukmbv35AiMT7iBQqB9IUKjPlPlSDOWWJ3QjvCGduBSlp/xmFnad1/MHUxR/rza Z9PYsY/tF0SSzJR+0ut6G0Gb2bXq+eipCnWzKunM8ARk7K8gHJjxZNr7prMG3Uw3tkg8 ut10rhUx1obg4biSFrMQA5xE+Rtb9EWi/WMYWPENaJPUbC75PCKYrOtuxd7RVDoOkPc6 NoxaAAOdwHpINeADSKLF8R1TRiPNI2aA+JHSSEk+O24WWsPBwIJcplUWHrxgBmWA1DtH 9kRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772500; x=1793377300; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=sQldV44I73JjgmYjMVE1gQAFJC6jiANA6oobIf4NEx0=; b=X6A2HnDSXhNjK00Kv6msMN3FIlv6yJpsY0FbCGqxmMy2oVlL/agjGB5QZAwjwchPOW Xkcde6RthKpZcLCa21Ml4+4+w8XK6XnAfea5RqYci9cfXtOJuo1jGG5meuVRfyJS435e EZG/dNC8ATa6kYuRI80KHd7/2V10hPVRovYt0k56ofM018Q2NqoaL/dhTywUMDc8eLch bM5Ih9prL07IoKH3Q/dPCD4M4juXIXdsjfvd4C+xJXDsvO0qkRy0FQ7Va1Zh/xChsBi2 IN/qIzBoYbB0LR1nngD3uka7viQy7L2sf1EqqAWNczBjREXtCmmd8JqGuoI3uIscUFkn 5ogw== X-Gm-Message-State: AFq9FYJBvJXRgJ5Fg3JRqpQSj44Qp4q8JW7J96PTbEaKMxb26LCnIaAp YtBhbQFk9b9iNMA9GGFCQbK0bo1FZvjAVab3E/xPkIKS/WfgcBjlJaNdswmiHunmFoXsKbs1qEg 8E9SeTf4I9hc05XcM2ik3crHp631PEjrrG43JQP6+HkHB2U/Ym9bzGhIaS3H6XV8JHYoG X-Gm-Gg: AYBFou1BkQOnzxEuzJu73BkXGhkeCWhiwy7eK8yoctuiKOiIbWC4Myyucfy8D58M3UN Xneh4lc8dmg0Xa5Tf7J0DEtsuhOpJmyUxvdKU7cz3SDaPSIrzSQor/9AZvjvHqc5xoPXnXsAzGp yd14emU4pqQTCy6QQqv9D6JcfuTKmz9K8v01ZmdCs33p3JZL/X7ZkbZJTiTaGAmfncx8hnpLwOP uKG69qVgHV7BIv+rQcH8+nvaVMVjzStf6RIf5vvGKAAEKg6vFieM6SpcYtriKVz96D02ptYa7j9 yJi1eb409IuyRFpOSf4dSsqfCTnUz4bYQr9fbeXIm0EyNiJ1tu3sliKoJvau4a6yg2vlgByXPXD G+fdOmfIUWre9cvnTxckCg5jE+NOcuIwykV2sed+y X-Received: by 2002:a05:620a:19a5:b0:93e:f5bd:7e13 with SMTP id af79cd13be357-93f6f8a3dfamr528181885a.64.1792772499712; Fri, 23 Oct 2026 09:21:39 -0700 (PDT) X-Received: by 2002:a05:620a:19a5:b0:93e:f5bd:7e13 with SMTP id af79cd13be357-93f6f8a3dfamr528175185a.64.1792772498948; Fri, 23 Oct 2026 09:21:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 67/83] target/microblaze: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:15 +0200 Message-ID: <20261023161332.60153-68-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: rz5hjO73yBWvEief0U_NyvGgQ26O09I_ X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX5zoFu/PtPTE1 qtdTPiwW9XNeNOWW2CJwe8vmWRi0r/9Ad1B6TydvrRss8xAnlD4bBMRLVxtrTTq80MJmgqsUQm1 XG9GYG37wXnm838OdxuBENU9uvM1E6s= X-Authority-Analysis: v=2.4 cv=QdTzLcbv c=1 sm=1 tr=0 ts=6adb8994 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=itqY9gs7vbMVEQc_hZoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-GUID: rz5hjO73yBWvEief0U_NyvGgQ26O09I_ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXxpbOhD/+DmFd Eu88HLAEEa//S6gxdbchOI4XPWGo/cmuldoF88XAq8NQyHFhRu4g0yaTcBd+rXuIe5xHTcQWCxl w+RXpB6Yk53ewBjVL6G1p6VjIr3Ac2uyOvL4LB7kdKOSKkdmKNq4I3WQgucSV7JgOiUuYWJv6dP PLi4ScAE8m5RJPRgQdsu3i/jDOKyT+aTxp3RTD7H0d+xiTfAyuThZjUVghzEN04eLEZWQ6B2SuC NQfX4HUQ/yM/fNr9ZTd5sn3bS+3KGiiIwp0ITX03GH43IR7thqOt0EdtPlzjokHs4fxlrrDwKxd khGehnT1f95w7peh0TpBHiD0uV30ucfnAv1CAuOzmswM2JiAWg8i8ADeAj32oArMnJWJpa2bACs M9ATgFxoczaW5X14MCbuBMo/oAItYURQ8swUPxLvwMlcXlsllM+otgxSpBahJEO4Hx3RYh67P6N QACTUHMuxCwUi5MPJFg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772601997158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-9-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/microblaze/op_helper.c | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/target/microblaze/op_helper.c b/target/microblaze/op_helper.c index c169312e954..c53103ecd79 100644 --- a/target/microblaze/op_helper.c +++ b/target/microblaze/op_helper.c @@ -27,7 +27,7 @@ #include "accel/tcg/cpu-loop.h" #include "fpu/softfloat.h" =20 -void helper_put(uint32_t id, uint32_t ctrl, uint32_t data) +void HELPER(put)(uint32_t id, uint32_t ctrl, uint32_t data) { int test =3D ctrl & STREAM_TEST; int atomic =3D ctrl & STREAM_ATOMIC; @@ -44,7 +44,7 @@ void helper_put(uint32_t id, uint32_t ctrl, uint32_t data) atomic ? "a" : ""); } =20 -uint32_t helper_get(uint32_t id, uint32_t ctrl) +uint32_t HELPER(get)(uint32_t id, uint32_t ctrl) { int test =3D ctrl & STREAM_TEST; int atomic =3D ctrl & STREAM_ATOMIC; @@ -62,7 +62,7 @@ uint32_t helper_get(uint32_t id, uint32_t ctrl) return 0xdead0000 | id; } =20 -void helper_microblaze_raise_exception(CPUMBState *env, uint32_t index) +void HELPER(microblaze_raise_exception)(CPUMBState *env, uint32_t index) { CPUState *cs =3D env_cpu(env); =20 @@ -84,7 +84,7 @@ static void raise_divzero(CPUMBState *env, uint32_t esr, = uintptr_t unwind_pc) } } =20 -uint32_t helper_divs(CPUMBState *env, uint32_t ra, uint32_t rb) +uint32_t HELPER(divs)(CPUMBState *env, uint32_t ra, uint32_t rb) { if (!ra) { raise_divzero(env, ESR_EC_DIVZERO, GETPC()); @@ -108,7 +108,7 @@ uint32_t helper_divs(CPUMBState *env, uint32_t ra, uint= 32_t rb) return (int32_t)rb / (int32_t)ra; } =20 -uint32_t helper_divu(CPUMBState *env, uint32_t ra, uint32_t rb) +uint32_t HELPER(divu)(CPUMBState *env, uint32_t ra, uint32_t rb) { if (!ra) { raise_divzero(env, ESR_EC_DIVZERO, GETPC()); @@ -154,7 +154,7 @@ static void update_fpu_flags(CPUMBState *env, int flags= , uintptr_t ra) } } =20 -uint32_t helper_microblaze_fadd(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(microblaze_fadd)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fd, fa, fb; int flags; @@ -169,7 +169,7 @@ uint32_t helper_microblaze_fadd(CPUMBState *env, uint32= _t a, uint32_t b) return fd.l; } =20 -uint32_t helper_frsub(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(frsub)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fd, fa, fb; int flags; @@ -183,7 +183,7 @@ uint32_t helper_frsub(CPUMBState *env, uint32_t a, uint= 32_t b) return fd.l; } =20 -uint32_t helper_microblaze_fmul(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(microblaze_fmul)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fd, fa, fb; int flags; @@ -198,7 +198,7 @@ uint32_t helper_microblaze_fmul(CPUMBState *env, uint32= _t a, uint32_t b) return fd.l; } =20 -uint32_t helper_microblaze_fdiv(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(microblaze_fdiv)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fd, fa, fb; int flags; @@ -213,7 +213,7 @@ uint32_t helper_microblaze_fdiv(CPUMBState *env, uint32= _t a, uint32_t b) return fd.l; } =20 -uint32_t helper_fcmp_un(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(fcmp_un)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fa, fb; uint32_t r =3D 0; @@ -235,7 +235,7 @@ uint32_t helper_fcmp_un(CPUMBState *env, uint32_t a, ui= nt32_t b) return r; } =20 -uint32_t helper_fcmp_lt(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(fcmp_lt)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fa, fb; int r; @@ -251,7 +251,7 @@ uint32_t helper_fcmp_lt(CPUMBState *env, uint32_t a, ui= nt32_t b) return r; } =20 -uint32_t helper_fcmp_eq(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(fcmp_eq)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fa, fb; int flags; @@ -267,7 +267,7 @@ uint32_t helper_fcmp_eq(CPUMBState *env, uint32_t a, ui= nt32_t b) return r; } =20 -uint32_t helper_fcmp_le(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(fcmp_le)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fa, fb; int flags; @@ -284,7 +284,7 @@ uint32_t helper_fcmp_le(CPUMBState *env, uint32_t a, ui= nt32_t b) return r; } =20 -uint32_t helper_fcmp_gt(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(fcmp_gt)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fa, fb; int flags, r; @@ -298,7 +298,7 @@ uint32_t helper_fcmp_gt(CPUMBState *env, uint32_t a, ui= nt32_t b) return r; } =20 -uint32_t helper_fcmp_ne(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(fcmp_ne)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fa, fb; int flags, r; @@ -313,7 +313,7 @@ uint32_t helper_fcmp_ne(CPUMBState *env, uint32_t a, ui= nt32_t b) return r; } =20 -uint32_t helper_fcmp_ge(CPUMBState *env, uint32_t a, uint32_t b) +uint32_t HELPER(fcmp_ge)(CPUMBState *env, uint32_t a, uint32_t b) { CPU_FloatU fa, fb; int flags, r; @@ -328,7 +328,7 @@ uint32_t helper_fcmp_ge(CPUMBState *env, uint32_t a, ui= nt32_t b) return r; } =20 -uint32_t helper_flt(CPUMBState *env, uint32_t a) +uint32_t HELPER(flt)(CPUMBState *env, uint32_t a) { CPU_FloatU fd, fa; =20 @@ -337,7 +337,7 @@ uint32_t helper_flt(CPUMBState *env, uint32_t a) return fd.l; } =20 -uint32_t helper_fint(CPUMBState *env, uint32_t a) +uint32_t HELPER(fint)(CPUMBState *env, uint32_t a) { CPU_FloatU fa; uint32_t r; @@ -352,7 +352,7 @@ uint32_t helper_fint(CPUMBState *env, uint32_t a) return r; } =20 -uint32_t helper_microblaze_fsqrt(CPUMBState *env, uint32_t a) +uint32_t HELPER(microblaze_fsqrt)(CPUMBState *env, uint32_t a) { CPU_FloatU fd, fa; int flags; @@ -366,7 +366,7 @@ uint32_t helper_microblaze_fsqrt(CPUMBState *env, uint3= 2_t a) return fd.l; } =20 -uint32_t helper_pcmpbf(uint32_t a, uint32_t b) +uint32_t HELPER(pcmpbf)(uint32_t a, uint32_t b) { unsigned int i; uint32_t mask =3D 0xff000000; @@ -379,7 +379,7 @@ uint32_t helper_pcmpbf(uint32_t a, uint32_t b) return 0; } =20 -void helper_stackprot(CPUMBState *env, uint32_t addr) +void HELPER(stackprot)(CPUMBState *env, uint32_t addr) { if (addr < env->slr || addr > env->shr) { CPUState *cs =3D env_cpu(env); @@ -399,12 +399,12 @@ void helper_stackprot(CPUMBState *env, uint32_t addr) #include "system/memory.h" =20 /* Writes/reads to the MMU's special regs end up here. */ -uint32_t helper_mmu_read(CPUMBState *env, uint32_t ext, uint32_t rn) +uint32_t HELPER(mmu_read)(CPUMBState *env, uint32_t ext, uint32_t rn) { return mmu_read(env, ext, rn); } =20 -void helper_mmu_write(CPUMBState *env, uint32_t ext, uint32_t rn, uint32_t= v) +void HELPER(mmu_write)(CPUMBState *env, uint32_t ext, uint32_t rn, uint32_= t v) { mmu_write(env, ext, rn, v); } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772639; cv=none; d=zohomail.com; s=zohoarc; b=EX0flEoP2z18J2Qseh4SsVmr1JsVMVfA57d52RwT0Saan5vkqAbFFGa6IeuYsK8NvODWFNBob1NOsd2vTnpIZ8i8/b3n0efgWltXpMGFkEAGs5h7P2bjDdJ9cSp6LBB5LBaS01m15b23cbkwd+MfvMV2MIDQL1LBb+oJCPXwc0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772639; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=9H3dKP+EysoxNVzbYFIP+wKY69F4brHc7vy3qdfKl7w=; b=NRypdQ8ABEcIadbKUk+xW1HTauP3JRmVunS0PDumXena6oxxYaBvM0GP8S1BTTKJpCZtNcm4oPJj7RFSM1k+evaYXYgU1c/G0cW4IwYcZmleOlS2N0YC1rijPm0xOdbgGHER+ciTbNyUN9Yee4SLIwSJVvTYVcVBv2ospFZFiCQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772639952814.3709392270601; Fri, 23 Oct 2026 09:23:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI21-0003yT-PO; Fri, 23 Oct 2026 12:22:13 -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 1xKI1o-0003oQ-Sj for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:02 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI1j-00034N-PO for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:00 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG47WM3812664 for ; Fri, 23 Oct 2026 16:21:54 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas882d4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:21:53 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f6f4fe531so197953385a.0 for ; Fri, 23 Oct 2026 09:21:53 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a9062ce5sm18583845e9.1.2026.10.23.09.21.44 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 9H3dKP+EysoxNVzbYFIP+wKY69F4brHc7vy3qdfKl7w=; b=WqoavcLDvurEG9c4 1xTEWlwkgcYo/pWHQmsI30Yg1EJo0QLX+RPM4mnhttE7MyFKV6oQlG8sh9C4wl/Y fWTpr+g5S5wVxOZrJMmvs1OeVqZOkC3SJxcIw9U+pLMUB+pCPA4o0+0yysgtEBul RAcA/z8lr+k7Ri9jFvUth/ScdptkxwA4r1I9DmoATI+Qqk/S1Mzjl0E5/gLrqqhj 1OLjtNMXvr1e3IGMlwjqy5FBHP9BJhFlf0rb+pb7hyqKr/BSFgmNheaAM+LoMYMH KhnDGiOIgSmWDzyOIT589EEDTZQUYXB9ERP0Q7aPvYNMUhYsKYeTAtYSfU8hRbMd hxSHYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772513; x=1793377313; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9H3dKP+EysoxNVzbYFIP+wKY69F4brHc7vy3qdfKl7w=; b=T/phLEsMRZcdq4ZLcW1IFV07Y2yDBwike017P2HmOuik/mYf4bNI99uUbkIv+Og6DK 0ygAXEZC98DTsOiFtLOVvZEnSWCBpseQkDVteAfF+XA4bJ5KjVjG6TbXYqsiuQ5uTkDT GCt3UShNbIXWf/1MuTuNkrUtg2ONl0HKy/Xso/yyeTqF84bDpj6c3MgwUNDLuRkcgV// tfVMUko4dRRWm0cONBqUJopnRjfiUN9lbD6hr/+cltURE0MNebxgQ181kI6iMMyr1E/5 O0Ig2NutDQCrBSOTnlfpVrEAH27nnijdpe6E9zqixN6tIdVApHQ7GfUEz7fn4Nj+pnfR 01ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772513; x=1793377313; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9H3dKP+EysoxNVzbYFIP+wKY69F4brHc7vy3qdfKl7w=; b=yFfP9OToDajbvO+5RjhBc0VCI3rYbRaWCIY+oMdMlfXeZmjjU2y7bZVBw2rYXnMqGS tXPeoVbJOIALe7tSl+z93BVikV6XFcOSK3llLIBWOapxYA/Px8lmi5jZnyx9P0lfSx2A TyUzYzMsk9a1L8vq0zeyG+nfIsCmm4opNgJWgJzw8duDNdkuVA4VWbswCiLdg1ZeXLOT FqSkhpaTE4lRrUPeNnwbAE0b4YCe97n46tM69wzokeXxAaVxZQ8OVUxnd6BoiBxDpKbX 9tDi8AEoY6QvQ7kJ30Gvz9PUikZKBrxMIE5jTw4jTkK5uW7IpBnsEsgsBlm9Y4Z2/W7U 8s/g== X-Gm-Message-State: AFq9FYJAjqqWYdLi81AMp1o2+vscWLxpsaa7K9lqobW3dK8bALVg8WIR EFb89tHBSuCy9wFELmcuVyVwfgHTH7fuxK6pnvYpkDmwZJc4vcgfKojpczkrNSpcivaa+s0bBuM jInmv4c/cCn9i3JMiEO7tkOHH2ASZzcE0GtZzOYf7myKhGblQLTAwVsNY1ggBEcwHRAK9 X-Gm-Gg: AYBFou38D4xl1gBLs4CYtbkxgrEysRfxLKp8Yk3UGAchP4PhcaZJnczb6RxWKQCDbSH 7vpKD20/yjR8KpbzJ96ZNeLG1WBBHNA5x04nsu1mwpmBUkioDMNOlzDZtZKd+rgpSdqb32iZTw5 PE+CBNmlBCBXQ42PRtrOq1EKx9q9oqUF6aG846IVH5h+TfiFhjs/3b+/nPxPpf052PwMp1AiQFT zGcsiCi/TdOqMCvauhQSbq0YwN/DxtdLyIes0PN2JJH7OIUkobwbm6HErJmNMylZs4R5n5L+cjz BKNX2rRhLquw+G603bFz7rnhKbRCF8D40QGGngjekaejoRwFWH9iSTlZUrSSJcqOXKDt8Ce4sNi cXV5umNmsQQ5/lOhUR2LBuX+wnOIn/58dVdb07EKI X-Received: by 2002:a05:620a:4490:b0:93e:4d74:68fd with SMTP id af79cd13be357-93f6f8a8012mr487307585a.65.1792772509902; Fri, 23 Oct 2026 09:21:49 -0700 (PDT) X-Received: by 2002:a05:620a:4490:b0:93e:4d74:68fd with SMTP id af79cd13be357-93f6f8a8012mr487286685a.65.1792772507125; Fri, 23 Oct 2026 09:21:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 68/83] target/mips: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:16 +0200 Message-ID: <20261023161332.60153-69-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX297SHEX9iLaR Spv/PdgyO0jnvi6mV/ZW2Vs2ym0kffS1PHbi8tUhF4vftiUT/D4fXlkYl6fatpxFk7WTwjQ0Bp8 kw8S3vSok1waKtcQpUusm15oIoBO9gg= X-Authority-Analysis: v=2.4 cv=OPqyTiaB c=1 sm=1 tr=0 ts=6adb89a1 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=AwICLqXVMpP-kcqnWPkA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXzgj5AfKc4mH9 FwrtTWqFbp8MaL2WwQU8T/e++GzI4/gUGFIvz9ZcDSwDSH9idQEVRVykNCRBSu5p1t/6TP9QYFR 89AqLhQ/EKPeYHxUWIS4YVC9t8vWVu9A49CED0NtKbfPRdCom/Bd0S/jr/cV7ORg1ZpvwF8VXVd abOONSTMLHvaTYOXEJQO5JywW4OOAlCVdh5Y7K0GXQTsWcqBggRwX0OZfUcArf++r2gLbPPiBHu 2VkhAJ4FVfHocD17XulW9me7nvRg5KhAgwsLetBDYFv/AkhGZmaDLeKlO5dwOhSZr4Upml7BYt4 tTtTfaNrBBUgxnCLTivF7VSDOnVqpbf0xubFbMwZgiPplXawou17fIvR2WiaDgwTEpd6U+LfLRX qle2gmPsdT9f0t8VnlxtYR/8JpZDXNCtcIq94bfMrXYD/jpP2OwzujilZtY+j3hnynKryYvOJYN 6XrqYIAqKBij4PH0uYg== X-Proofpoint-GUID: QiPrxq3kNR83A5uESxnb8JvTwUXgBQC7 X-Proofpoint-ORIG-GUID: QiPrxq3kNR83A5uESxnb8JvTwUXgBQC7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772640972158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-10-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/dsp_helper.c | 187 +++---- target/mips/tcg/exception.c | 8 +- target/mips/tcg/fpu_helper.c | 291 +++++----- target/mips/tcg/ldst_helper.c | 18 +- target/mips/tcg/lmmi_helper.c | 98 ++-- target/mips/tcg/msa_helper.c | 690 ++++++++++++------------ target/mips/tcg/octeon_crypto.c | 100 ++-- target/mips/tcg/op_helper.c | 34 +- target/mips/tcg/system/cp0_helper.c | 276 +++++----- target/mips/tcg/system/lcsr_helper.c | 8 +- target/mips/tcg/system/special_helper.c | 12 +- target/mips/tcg/system/tlb_helper.c | 14 +- target/mips/tcg/vr54xx_helper.c | 30 +- 13 files changed, 892 insertions(+), 874 deletions(-) diff --git a/target/mips/tcg/dsp_helper.c b/target/mips/tcg/dsp_helper.c index 7a4362c8ef4..26fcfd5fb35 100644 --- a/target/mips/tcg/dsp_helper.c +++ b/target/mips/tcg/dsp_helper.c @@ -1094,7 +1094,7 @@ static inline int32_t mipsdsp_cmpu_lt(uint32_t a, uin= t32_t b) =20 /** DSP Arithmetic Sub-class insns **/ #define MIPSDSP32_UNOP_ENV(name, func, element) = \ -target_ulong helper_##name(target_ulong rt, CPUMIPSState *env) = \ +target_ulong HELPER(name)(target_ulong rt, CPUMIPSState *env) = \ { = \ DSP32Value dt; = \ unsigned int i; \ @@ -1114,7 +1114,7 @@ MIPSDSP32_UNOP_ENV(absq_s_w, sat_abs32, sw) =20 #if defined(TARGET_MIPS64) #define MIPSDSP64_UNOP_ENV(name, func, element) = \ -target_ulong helper_##name(target_ulong rt, CPUMIPSState *env) = \ +target_ulong HELPER(name)(target_ulong rt, CPUMIPSState *env) = \ { = \ DSP64Value dt; = \ unsigned int i; = \ @@ -1134,7 +1134,7 @@ MIPSDSP64_UNOP_ENV(absq_s_pw, sat_abs32, sw) #endif =20 #define MIPSDSP32_BINOP(name, func, element) = \ -target_ulong helper_##name(target_ulong rs, target_ulong rt) = \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt) = \ { = \ DSP32Value ds, dt; = \ unsigned int i; = \ @@ -1161,7 +1161,7 @@ MIPSDSP32_BINOP(subqh_w, rshift1_sub_q32, sw); #undef MIPSDSP32_BINOP =20 #define MIPSDSP32_BINOP_ENV(name, func, element) = \ -target_ulong helper_##name(target_ulong rs, target_ulong rt, = \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt, = \ CPUMIPSState *env) = \ { = \ DSP32Value ds, dt; = \ @@ -1194,7 +1194,7 @@ MIPSDSP32_BINOP_ENV(subu_s_qb, satu8_sub, ub); =20 #ifdef TARGET_MIPS64 #define MIPSDSP64_BINOP(name, func, element) = \ -target_ulong helper_##name(target_ulong rs, target_ulong rt) = \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt) = \ { = \ DSP64Value ds, dt; = \ unsigned int i; = \ @@ -1215,7 +1215,7 @@ MIPSDSP64_BINOP(subuh_r_ob, rrshift1_sub_u8, ub); #undef MIPSDSP64_BINOP =20 #define MIPSDSP64_BINOP_ENV(name, func, element) = \ -target_ulong helper_##name(target_ulong rs, target_ulong rt, = \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt, = \ CPUMIPSState *env) = \ { = \ DSP64Value ds, dt; = \ @@ -1251,7 +1251,7 @@ MIPSDSP64_BINOP_ENV(subu_s_qh, satu16_sub_u16_u16, uh= ); #endif =20 #define SUBUH_QB(name, var) \ -target_ulong helper_##name##_qb(target_ulong rs, target_ulong rt) \ +target_ulong HELPER(name##_qb)(target_ulong rs, target_ulong rt) \ { \ uint8_t rs3, rs2, rs1, rs0; \ uint8_t rt3, rt2, rt1, rt0; \ @@ -1274,7 +1274,7 @@ SUBUH_QB(subuh_r, 1); =20 #undef SUBUH_QB =20 -target_ulong helper_addsc(target_ulong rs, target_ulong rt, CPUMIPSState *= env) +target_ulong HELPER(addsc)(target_ulong rs, target_ulong rt, CPUMIPSState = *env) { uint64_t temp, tempRs, tempRt; bool flag; @@ -1289,7 +1289,7 @@ target_ulong helper_addsc(target_ulong rs, target_ulo= ng rt, CPUMIPSState *env) return (target_long)(int32_t)(temp & MIPSDSP_LLO); } =20 -target_ulong helper_addwc(target_ulong rs, target_ulong rt, CPUMIPSState *= env) +target_ulong HELPER(addwc)(target_ulong rs, target_ulong rt, CPUMIPSState = *env) { uint32_t rd; int32_t temp32, temp31; @@ -1309,7 +1309,7 @@ target_ulong helper_addwc(target_ulong rs, target_ulo= ng rt, CPUMIPSState *env) return (target_long)(int32_t)rd; } =20 -target_ulong helper_modsub(target_ulong rs, target_ulong rt) +target_ulong HELPER(modsub)(target_ulong rs, target_ulong rt) { int32_t decr; uint16_t lastindex; @@ -1327,7 +1327,7 @@ target_ulong helper_modsub(target_ulong rs, target_ul= ong rt) return rd; } =20 -target_ulong helper_raddu_w_qb(target_ulong rs) +target_ulong HELPER(raddu_w_qb)(target_ulong rs) { target_ulong ret =3D 0; DSP32Value ds; @@ -1341,7 +1341,7 @@ target_ulong helper_raddu_w_qb(target_ulong rs) } =20 #if defined(TARGET_MIPS64) -target_ulong helper_raddu_l_ob(target_ulong rs) +target_ulong HELPER(raddu_l_ob)(target_ulong rs) { target_ulong ret =3D 0; DSP64Value ds; @@ -1356,7 +1356,7 @@ target_ulong helper_raddu_l_ob(target_ulong rs) #endif =20 #define PRECR_QB_PH(name, a, b)\ -target_ulong helper_##name##_qb_ph(target_ulong rs, target_ulong rt) \ +target_ulong HELPER(name##_qb_ph)(target_ulong rs, target_ulong rt) \ { \ uint8_t tempD, tempC, tempB, tempA; \ \ @@ -1373,7 +1373,7 @@ PRECR_QB_PH(precrq, 24, 8); =20 #undef PRECR_QB_OH =20 -target_ulong helper_precr_sra_ph_w(uint32_t sa, target_ulong rs, +target_ulong HELPER(precr_sra_ph_w)(uint32_t sa, target_ulong rs, target_ulong rt) { uint16_t tempB, tempA; @@ -1384,7 +1384,7 @@ target_ulong helper_precr_sra_ph_w(uint32_t sa, targe= t_ulong rs, return MIPSDSP_RETURN32_16(tempB, tempA); } =20 -target_ulong helper_precr_sra_r_ph_w(uint32_t sa, +target_ulong HELPER(precr_sra_r_ph_w)(uint32_t sa, target_ulong rs, target_ulong rt) { uint64_t tempB, tempA; @@ -1402,7 +1402,7 @@ target_ulong helper_precr_sra_r_ph_w(uint32_t sa, return (target_long)(int32_t)rt; } =20 -target_ulong helper_precrq_ph_w(target_ulong rs, target_ulong rt) +target_ulong HELPER(precrq_ph_w)(target_ulong rs, target_ulong rt) { uint16_t tempB, tempA; =20 @@ -1412,7 +1412,7 @@ target_ulong helper_precrq_ph_w(target_ulong rs, targ= et_ulong rt) return MIPSDSP_RETURN32_16(tempB, tempA); } =20 -target_ulong helper_precrq_rs_ph_w(target_ulong rs, target_ulong rt, +target_ulong HELPER(precrq_rs_ph_w)(target_ulong rs, target_ulong rt, CPUMIPSState *env) { uint16_t tempB, tempA; @@ -1424,7 +1424,7 @@ target_ulong helper_precrq_rs_ph_w(target_ulong rs, t= arget_ulong rt, } =20 #if defined(TARGET_MIPS64) -target_ulong helper_precr_ob_qh(target_ulong rs, target_ulong rt) +target_ulong HELPER(precr_ob_qh)(target_ulong rs, target_ulong rt) { uint8_t rs6, rs4, rs2, rs0; uint8_t rt6, rt4, rt2, rt0; @@ -1453,7 +1453,7 @@ target_ulong helper_precr_ob_qh(target_ulong rs, targ= et_ulong rt) * In case sa !=3D 0, use rt3, rt1, rs3, rs1. */ #define PRECR_QH_PW(name, var) \ -target_ulong helper_precr_##name##_qh_pw(target_ulong rs, \ +target_ulong HELPER(precr_##name##_qh_pw)(target_ulong rs, \ target_ulong rt, \ uint32_t sa) \ { \ @@ -1484,7 +1484,7 @@ PRECR_QH_PW(sra_r, 1); =20 #undef PRECR_QH_PW =20 -target_ulong helper_precrq_ob_qh(target_ulong rs, target_ulong rt) +target_ulong HELPER(precrq_ob_qh)(target_ulong rs, target_ulong rt) { uint8_t rs6, rs4, rs2, rs0; uint8_t rt6, rt4, rt2, rt0; @@ -1507,7 +1507,7 @@ target_ulong helper_precrq_ob_qh(target_ulong rs, tar= get_ulong rt) return temp; } =20 -target_ulong helper_precrq_qh_pw(target_ulong rs, target_ulong rt) +target_ulong HELPER(precrq_qh_pw)(target_ulong rs, target_ulong rt) { uint16_t tempD, tempC, tempB, tempA; =20 @@ -1519,7 +1519,7 @@ target_ulong helper_precrq_qh_pw(target_ulong rs, tar= get_ulong rt) return MIPSDSP_RETURN64_16(tempD, tempC, tempB, tempA); } =20 -target_ulong helper_precrq_rs_qh_pw(target_ulong rs, target_ulong rt, +target_ulong HELPER(precrq_rs_qh_pw)(target_ulong rs, target_ulong rt, CPUMIPSState *env) { uint32_t rs2, rs0; @@ -1539,7 +1539,7 @@ target_ulong helper_precrq_rs_qh_pw(target_ulong rs, = target_ulong rt, return MIPSDSP_RETURN64_16(tempD, tempC, tempB, tempA); } =20 -target_ulong helper_precrq_pw_l(target_ulong rs, target_ulong rt) +target_ulong HELPER(precrq_pw_l)(target_ulong rs, target_ulong rt) { uint32_t tempB, tempA; =20 @@ -1550,7 +1550,7 @@ target_ulong helper_precrq_pw_l(target_ulong rs, targ= et_ulong rt) } #endif =20 -target_ulong helper_precrqu_s_qb_ph(target_ulong rs, target_ulong rt, +target_ulong HELPER(precrqu_s_qb_ph)(target_ulong rs, target_ulong rt, CPUMIPSState *env) { uint8_t tempD, tempC, tempB, tempA; @@ -1570,7 +1570,7 @@ target_ulong helper_precrqu_s_qb_ph(target_ulong rs, = target_ulong rt, } =20 #if defined(TARGET_MIPS64) -target_ulong helper_precrqu_s_ob_qh(target_ulong rs, target_ulong rt, +target_ulong HELPER(precrqu_s_ob_qh)(target_ulong rs, target_ulong rt, CPUMIPSState *env) { int i; @@ -1601,7 +1601,7 @@ target_ulong helper_precrqu_s_ob_qh(target_ulong rs, = target_ulong rt, } =20 #define PRECEQ_PW(name, a, b) \ -target_ulong helper_preceq_pw_##name(target_ulong rt) \ +target_ulong HELPER(preceq_pw_##name)(target_ulong rt) \ { \ uint16_t tempB, tempA; \ uint32_t tempBI, tempAI; \ @@ -1625,7 +1625,7 @@ PRECEQ_PW(qhra, 32, 0); #endif =20 #define PRECEQU_PH(name, a, b) \ -target_ulong helper_precequ_ph_##name(target_ulong rt) \ +target_ulong HELPER(precequ_ph_##name)(target_ulong rt) \ { \ uint16_t tempB, tempA; \ \ @@ -1647,7 +1647,7 @@ PRECEQU_PH(qbra, 16, 0); =20 #if defined(TARGET_MIPS64) #define PRECEQU_QH(name, a, b, c, d) \ -target_ulong helper_precequ_qh_##name(target_ulong rt) \ +target_ulong HELPER(precequ_qh_##name)(target_ulong rt) \ { \ uint16_t tempD, tempC, tempB, tempA; \ \ @@ -1674,7 +1674,7 @@ PRECEQU_QH(obra, 48, 32, 16, 0); #endif =20 #define PRECEU_PH(name, a, b) \ -target_ulong helper_preceu_ph_##name(target_ulong rt) \ +target_ulong HELPER(preceu_ph_##name)(target_ulong rt) \ { \ uint16_t tempB, tempA; \ \ @@ -1693,7 +1693,7 @@ PRECEU_PH(qbra, 16, 0); =20 #if defined(TARGET_MIPS64) #define PRECEU_QH(name, a, b, c, d) \ -target_ulong helper_preceu_qh_##name(target_ulong rt) \ +target_ulong HELPER(preceu_qh_##name)(target_ulong rt) \ { \ uint16_t tempD, tempC, tempB, tempA; \ \ @@ -1716,7 +1716,7 @@ PRECEU_QH(obra, 48, 32, 16, 0); =20 /** DSP GPR-Based Shift Sub-class insns **/ #define SHIFT_QB(name, func) \ -target_ulong helper_##name##_qb(target_ulong sa, target_ulong rt) \ +target_ulong HELPER(name##_qb)(target_ulong sa, target_ulong rt) \ { \ uint8_t rt3, rt2, rt1, rt0; \ \ @@ -1733,7 +1733,7 @@ target_ulong helper_##name##_qb(target_ulong sa, targ= et_ulong rt) \ } =20 #define SHIFT_QB_ENV(name, func) \ -target_ulong helper_##name##_qb(target_ulong sa, target_ulong rt,\ +target_ulong HELPER(name##_qb)(target_ulong sa, target_ulong rt, \ CPUMIPSState *env) \ { \ uint8_t rt3, rt2, rt1, rt0; \ @@ -1761,7 +1761,7 @@ SHIFT_QB(shra_r, rnd8_rashift); =20 #if defined(TARGET_MIPS64) #define SHIFT_OB(name, func) \ -target_ulong helper_##name##_ob(target_ulong rt, target_ulong sa) \ +target_ulong HELPER(name##_ob)(target_ulong rt, target_ulong sa) \ { \ int i; \ uint8_t rt_t[8]; \ @@ -1780,7 +1780,7 @@ target_ulong helper_##name##_ob(target_ulong rt, targ= et_ulong sa) \ } =20 #define SHIFT_OB_ENV(name, func) \ -target_ulong helper_##name##_ob(target_ulong rt, target_ulong sa, \ +target_ulong HELPER(name##_ob)(target_ulong rt, target_ulong sa, \ CPUMIPSState *env) \ { \ int i; \ @@ -1811,7 +1811,7 @@ SHIFT_OB(shra_r, rnd8_rashift); #endif =20 #define SHIFT_PH(name, func) \ -target_ulong helper_##name##_ph(target_ulong sa, target_ulong rt, \ +target_ulong HELPER(name##_ph)(target_ulong sa, target_ulong rt, \ CPUMIPSState *env) \ { \ uint16_t rth, rtl; \ @@ -1833,7 +1833,7 @@ SHIFT_PH(shll_s, sat16_lshift); =20 #if defined(TARGET_MIPS64) #define SHIFT_QH(name, func) \ -target_ulong helper_##name##_qh(target_ulong rt, target_ulong sa) \ +target_ulong HELPER(name##_qh)(target_ulong rt, target_ulong sa) \ { \ uint16_t rt3, rt2, rt1, rt0; \ \ @@ -1850,7 +1850,7 @@ target_ulong helper_##name##_qh(target_ulong rt, targ= et_ulong sa) \ } =20 #define SHIFT_QH_ENV(name, func) \ -target_ulong helper_##name##_qh(target_ulong rt, target_ulong sa, \ +target_ulong HELPER(name##_qh)(target_ulong rt, target_ulong sa, \ CPUMIPSState *env) \ { \ uint16_t rt3, rt2, rt1, rt0; \ @@ -1880,7 +1880,7 @@ SHIFT_QH(shra_r, rnd16_rashift); #endif =20 #define SHIFT_W(name, func) \ -target_ulong helper_##name##_w(target_ulong sa, target_ulong rt) \ +target_ulong HELPER(name##_w)(target_ulong sa, target_ulong rt) \ { \ uint32_t temp; \ \ @@ -1891,7 +1891,7 @@ target_ulong helper_##name##_w(target_ulong sa, targe= t_ulong rt) \ } =20 #define SHIFT_W_ENV(name, func) \ -target_ulong helper_##name##_w(target_ulong sa, target_ulong rt, \ +target_ulong HELPER(name##_w)(target_ulong sa, target_ulong rt, \ CPUMIPSState *env) \ { \ uint32_t temp; \ @@ -1910,7 +1910,7 @@ SHIFT_W(shra_r, rnd32_rashift); =20 #if defined(TARGET_MIPS64) #define SHIFT_PW(name, func) \ -target_ulong helper_##name##_pw(target_ulong rt, target_ulong sa) \ +target_ulong HELPER(name##_pw)(target_ulong rt, target_ulong sa) \ { \ uint32_t rt1, rt0; \ \ @@ -1924,7 +1924,7 @@ target_ulong helper_##name##_pw(target_ulong rt, targ= et_ulong sa) \ } =20 #define SHIFT_PW_ENV(name, func) \ -target_ulong helper_##name##_pw(target_ulong rt, target_ulong sa, \ +target_ulong HELPER(name##_pw)(target_ulong rt, target_ulong sa, \ CPUMIPSState *env) \ { \ uint32_t rt1, rt0; \ @@ -1950,7 +1950,7 @@ SHIFT_PW(shra_r, rnd32_rashift); #endif =20 #define SHIFT_PH(name, func) \ -target_ulong helper_##name##_ph(target_ulong sa, target_ulong rt) \ +target_ulong HELPER(name##_ph)(target_ulong sa, target_ulong rt) \ { \ uint16_t rth, rtl; \ \ @@ -1978,7 +1978,7 @@ SHIFT_PH(shra_r, rnd16_rashift); #define MUL_RETURN32_16_PH(name, func, \ rsmov1, rsmov2, rsfilter, \ rtmov1, rtmov2, rtfilter) \ -target_ulong helper_##name(target_ulong rs, target_ulong rt, \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ uint16_t rsB, rsA, rtB, rtA; \ @@ -2016,7 +2016,7 @@ MUL_RETURN32_16_PH(mulq_s_ph, sat16_mul_q15_q15, \ #undef MUL_RETURN32_16_PH =20 #define MUL_RETURN32_32_ph(name, func, movbits) \ -target_ulong helper_##name(target_ulong rs, target_ulong rt, \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int16_t rsh, rth; \ @@ -2035,7 +2035,7 @@ MUL_RETURN32_32_ph(muleq_s_w_phr, mul_q15_q15_overflo= wflag21, 0); #undef MUL_RETURN32_32_ph =20 #define MUL_VOID_PH(name, use_ac_env) \ -void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ +void HELPER(name)(uint32_t ac, target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int16_t rsh, rsl, rth, rtl; \ @@ -2071,7 +2071,7 @@ MUL_VOID_PH(mulsa_w_ph, 0); #define MUL_RETURN64_16_QH(name, func, \ rsmov1, rsmov2, rsmov3, rsmov4, rsfilter, \ rtmov1, rtmov2, rtmov3, rtmov4, rtfilter) \ -target_ulong helper_##name(target_ulong rs, target_ulong rt, \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ uint16_t rs3, rs2, rs1, rs0; \ @@ -2110,7 +2110,7 @@ MUL_RETURN64_16_QH(mulq_rs_qh, rndq15_mul_q15_q15, \ #define MUL_RETURN64_32_QH(name, \ rsmov1, rsmov2, \ rtmov1, rtmov2) \ -target_ulong helper_##name(target_ulong rs, target_ulong rt, \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ uint16_t rsB, rsA; \ @@ -2133,7 +2133,7 @@ MUL_RETURN64_32_QH(muleq_s_pw_qhr, 16, 0, 16, 0); =20 #undef MUL_RETURN64_32_QH =20 -void helper_mulsaq_s_w_qh(target_ulong rs, target_ulong rt, uint32_t ac, +void HELPER(mulsaq_s_w_qh)(target_ulong rs, target_ulong rt, uint32_t ac, CPUMIPSState *env) { int16_t rs3, rs2, rs1, rs0; @@ -2177,7 +2177,7 @@ void helper_mulsaq_s_w_qh(target_ulong rs, target_ulo= ng rt, uint32_t ac, #endif =20 #define DP_QB(name, func, is_add, rsmov1, rsmov2, rtmov1, rtmov2) \ -void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ +void HELPER(name)(uint32_t ac, target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ uint8_t rs3, rs2; \ @@ -2218,7 +2218,7 @@ DP_QB(dpsu_h_qbr, mul_u8_u8, 0, 8, 0, 8, 0); #define DP_OB(name, add_sub, \ rsmov1, rsmov2, rsmov3, rsmov4, \ rtmov1, rtmov2, rtmov3, rtmov4) \ -void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ +void HELPER(name)(target_ulong rs, target_ulong rt, uint32_t ac, \ CPUMIPSState *env) \ { \ uint8_t rsD, rsC, rsB, rsA; \ @@ -2281,7 +2281,7 @@ DP_OB(dpsu_h_obr, 0, 24, 16, 8, 0, 24, 16, 8, 0); #endif =20 #define DP_NOFUNC_PH(name, is_add, rsmov1, rsmov2, rtmov1, rtmov2) = \ -void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, = \ +void HELPER(name)(uint32_t ac, target_ulong rs, target_ulong rt, = \ CPUMIPSState *env) = \ { = \ int16_t rsB, rsA, rtB, rtA; = \ @@ -2316,7 +2316,7 @@ DP_NOFUNC_PH(dpsx_w_ph, 0, 16, 0, 0, 16); #undef DP_NOFUNC_PH =20 #define DP_HASFUNC_PH(name, is_add, rsmov1, rsmov2, rtmov1, rtmov2) \ -void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ +void HELPER(name)(uint32_t ac, target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int16_t rsB, rsA, rtB, rtA; \ @@ -2355,7 +2355,7 @@ DP_HASFUNC_PH(dpsqx_s_w_ph, 0, 16, 0, 0, 16); #undef DP_HASFUNC_PH =20 #define DP_128OPERATION_PH(name, is_add) \ -void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ +void HELPER(name)(uint32_t ac, target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int16_t rsh, rsl, rth, rtl; \ @@ -2402,7 +2402,7 @@ DP_128OPERATION_PH(dpsqx_sa_w_ph, 0); =20 #if defined(TARGET_MIPS64) #define DP_QH(name, is_add, use_ac_env) \ -void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ +void HELPER(name)(target_ulong rs, target_ulong rt, uint32_t ac, \ CPUMIPSState *env) \ { \ int32_t rs3, rs2, rs1, rs0; \ @@ -2470,7 +2470,7 @@ DP_QH(dpsq_s_w_qh, 0, 1); #endif =20 #define DP_L_W(name, is_add) \ -void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ +void HELPER(name)(uint32_t ac, target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int32_t temp63; \ @@ -2515,7 +2515,7 @@ DP_L_W(dpsq_sa_l_w, 0); =20 #if defined(TARGET_MIPS64) #define DP_L_PW(name, func) \ -void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ +void HELPER(name)(target_ulong rs, target_ulong rt, uint32_t ac, \ CPUMIPSState *env) \ { \ int32_t rs1, rs0; \ @@ -2565,7 +2565,7 @@ DP_L_PW(dpsq_sa_l_pw, sat64_acc_sub_q63); =20 #undef DP_L_PW =20 -void helper_mulsaq_s_l_pw(target_ulong rs, target_ulong rt, uint32_t ac, +void HELPER(mulsaq_s_l_pw)(target_ulong rs, target_ulong rt, uint32_t ac, CPUMIPSState *env) { int32_t rs1, rs0; @@ -2625,7 +2625,7 @@ void helper_mulsaq_s_l_pw(target_ulong rs, target_ulo= ng rt, uint32_t ac, #endif =20 #define MAQ_S_W(name, mov) \ -void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ +void HELPER(name)(uint32_t ac, target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int16_t rsh, rth; \ @@ -2650,7 +2650,7 @@ MAQ_S_W(maq_s_w_phr, 0); #undef MAQ_S_W =20 #define MAQ_SA_W(name, mov) \ -void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ +void HELPER(name)(uint32_t ac, target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int16_t rsh, rth; \ @@ -2673,7 +2673,7 @@ MAQ_SA_W(maq_sa_w_phr, 0); #undef MAQ_SA_W =20 #define MULQ_W(name, addvar) \ -target_ulong helper_##name(target_ulong rs, target_ulong rt, \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int32_t rs_t, rt_t; \ @@ -2703,7 +2703,7 @@ MULQ_W(mulq_rs_w, 0x80000000ull); #if defined(TARGET_MIPS64) =20 #define MAQ_S_W_QH(name, mov) \ -void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ +void HELPER(name)(target_ulong rs, target_ulong rt, uint32_t ac, \ CPUMIPSState *env) \ { \ int16_t rs_t, rt_t; \ @@ -2749,7 +2749,7 @@ MAQ_S_W_QH(maq_s_w_qhrr, 0); #undef MAQ_S_W_QH =20 #define MAQ_SA_W(name, mov) \ -void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ +void HELPER(name)(target_ulong rs, target_ulong rt, uint32_t ac, \ CPUMIPSState *env) \ { \ int16_t rs_t, rt_t; \ @@ -2780,7 +2780,7 @@ MAQ_SA_W(maq_sa_w_qhrr, 0); #undef MAQ_SA_W =20 #define MAQ_S_L_PW(name, mov) \ -void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ +void HELPER(name)(target_ulong rs, target_ulong rt, uint32_t ac, \ CPUMIPSState *env) \ { \ int32_t rs_t, rt_t; \ @@ -2822,7 +2822,7 @@ MAQ_S_L_PW(maq_s_l_pwr, 0); #undef MAQ_S_L_PW =20 #define DM_OPERATE(name, func, is_add, sigext) \ -void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ +void HELPER(name)(target_ulong rs, target_ulong rt, uint32_t ac, \ CPUMIPSState *env) \ { \ int32_t rs1, rs0; \ @@ -2900,7 +2900,7 @@ DM_OPERATE(dmsubu, mul_u32_u32, 0, 0); #endif =20 /** DSP Bit/Manipulation Sub-class insns **/ -target_ulong helper_bitrev(target_ulong rt) +target_ulong HELPER(bitrev)(target_ulong rt) { int32_t temp; uint32_t rd; @@ -2917,7 +2917,7 @@ target_ulong helper_bitrev(target_ulong rt) } =20 #define BIT_INSV(name, posfilter, ret_type) \ -target_ulong helper_##name(CPUMIPSState *env, target_ulong rs, \ +target_ulong HELPER(name)(CPUMIPSState *env, target_ulong rs, \ target_ulong rt) \ { \ uint32_t pos, size, msb, lsb; \ @@ -2952,7 +2952,7 @@ BIT_INSV(dinsv, 0x7F, target_long); =20 /** DSP Compare-Pick Sub-class insns **/ #define CMP_HAS_RET(name, func, split_num, filter, bit_size) \ -target_ulong helper_##name(target_ulong rs, target_ulong rt) \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt) \ { \ uint32_t rs_t, rt_t; \ uint8_t cc; \ @@ -2983,7 +2983,7 @@ CMP_HAS_RET(cmpgu_le_ob, cmpu_le, 8, MIPSDSP_Q0, 8); =20 =20 #define CMP_NO_RET(name, func, split_num, filter, bit_size) \ -void helper_##name(target_ulong rs, target_ulong rt, \ +void HELPER(name)(target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int##bit_size##_t rs_t, rt_t; \ @@ -3028,7 +3028,7 @@ CMP_NO_RET(cmp_le_pw, cmp_le, 2, MIPSDSP_LLO, 32); #if defined(TARGET_MIPS64) =20 #define CMPGDU_OB(name) \ -target_ulong helper_cmpgdu_##name##_ob(target_ulong rs, target_ulong rt, \ +target_ulong HELPER(cmpgdu_##name##_ob)(target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ int i; \ @@ -3058,7 +3058,7 @@ CMPGDU_OB(le) #endif =20 #define PICK_INSN(name, split_num, filter, bit_size, ret32bit) \ -target_ulong helper_##name(target_ulong rs, target_ulong rt, \ +target_ulong HELPER(name)(target_ulong rs, target_ulong rt, \ CPUMIPSState *env) \ { \ uint32_t rs_t, rt_t; \ @@ -3094,7 +3094,7 @@ PICK_INSN(pick_pw, 2, MIPSDSP_LLO, 32, 0); #endif #undef PICK_INSN =20 -target_ulong helper_packrl_ph(target_ulong rs, target_ulong rt) +target_ulong HELPER(packrl_ph)(target_ulong rs, target_ulong rt) { uint32_t rsl, rth; =20 @@ -3105,7 +3105,7 @@ target_ulong helper_packrl_ph(target_ulong rs, target= _ulong rt) } =20 #if defined(TARGET_MIPS64) -target_ulong helper_packrl_pw(target_ulong rs, target_ulong rt) +target_ulong HELPER(packrl_pw)(target_ulong rs, target_ulong rt) { uint32_t rs0, rt1; =20 @@ -3117,7 +3117,7 @@ target_ulong helper_packrl_pw(target_ulong rs, target= _ulong rt) #endif =20 /** DSP Accumulator and DSPControl Access Sub-class insns **/ -target_ulong helper_extr_w(target_ulong ac, target_ulong shift, +target_ulong HELPER(extr_w)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { int32_t tempI; @@ -3146,7 +3146,7 @@ target_ulong helper_extr_w(target_ulong ac, target_ul= ong shift, return (target_long)tempI; } =20 -target_ulong helper_extr_r_w(target_ulong ac, target_ulong shift, +target_ulong HELPER(extr_r_w)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { int64_t tempDL[2]; @@ -3172,7 +3172,7 @@ target_ulong helper_extr_r_w(target_ulong ac, target_= ulong shift, return (target_long)(int32_t)(tempDL[0] >> 1); } =20 -target_ulong helper_extr_rs_w(target_ulong ac, target_ulong shift, +target_ulong HELPER(extr_rs_w)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { int32_t tempI, temp64; @@ -3206,7 +3206,7 @@ target_ulong helper_extr_rs_w(target_ulong ac, target= _ulong shift, } =20 #if defined(TARGET_MIPS64) -target_ulong helper_dextr_w(target_ulong ac, target_ulong shift, +target_ulong HELPER(dextr_w)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { uint64_t temp[3]; @@ -3218,7 +3218,7 @@ target_ulong helper_dextr_w(target_ulong ac, target_u= long shift, return (int64_t)(int32_t)(temp[0] >> 1); } =20 -target_ulong helper_dextr_r_w(target_ulong ac, target_ulong shift, +target_ulong HELPER(dextr_r_w)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { uint64_t temp[3]; @@ -3245,7 +3245,7 @@ target_ulong helper_dextr_r_w(target_ulong ac, target= _ulong shift, return (int64_t)(int32_t)(temp[0] >> 1); } =20 -target_ulong helper_dextr_rs_w(target_ulong ac, target_ulong shift, +target_ulong HELPER(dextr_rs_w)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { uint64_t temp[3]; @@ -3277,7 +3277,7 @@ target_ulong helper_dextr_rs_w(target_ulong ac, targe= t_ulong shift, return (int64_t)(int32_t)(temp[0] >> 1); } =20 -target_ulong helper_dextr_l(target_ulong ac, target_ulong shift, +target_ulong HELPER(dextr_l)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { uint64_t temp[3]; @@ -3289,7 +3289,7 @@ target_ulong helper_dextr_l(target_ulong ac, target_u= long shift, return (temp[1] << 63) | (temp[0] >> 1); } =20 -target_ulong helper_dextr_r_l(target_ulong ac, target_ulong shift, +target_ulong HELPER(dextr_r_l)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { uint64_t temp[3]; @@ -3316,7 +3316,7 @@ target_ulong helper_dextr_r_l(target_ulong ac, target= _ulong shift, return (temp[1] << 63) | (temp[0] >> 1); } =20 -target_ulong helper_dextr_rs_l(target_ulong ac, target_ulong shift, +target_ulong HELPER(dextr_rs_l)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { uint64_t temp[3]; @@ -3351,7 +3351,7 @@ target_ulong helper_dextr_rs_l(target_ulong ac, targe= t_ulong shift, } #endif =20 -target_ulong helper_extr_s_h(target_ulong ac, target_ulong shift, +target_ulong HELPER(extr_s_h)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { int64_t temp, acc; @@ -3376,7 +3376,7 @@ target_ulong helper_extr_s_h(target_ulong ac, target_= ulong shift, =20 =20 #if defined(TARGET_MIPS64) -target_ulong helper_dextr_s_h(target_ulong ac, target_ulong shift, +target_ulong HELPER(dextr_s_h)(target_ulong ac, target_ulong shift, CPUMIPSState *env) { int64_t temp[2]; @@ -3405,7 +3405,7 @@ target_ulong helper_dextr_s_h(target_ulong ac, target= _ulong shift, =20 #endif =20 -target_ulong helper_extp(target_ulong ac, target_ulong size, CPUMIPSState = *env) +target_ulong HELPER(extp)(target_ulong ac, target_ulong size, CPUMIPSState= *env) { int32_t start_pos; int sub; @@ -3429,7 +3429,7 @@ target_ulong helper_extp(target_ulong ac, target_ulon= g size, CPUMIPSState *env) return (target_ulong)temp; } =20 -target_ulong helper_extpdp(target_ulong ac, target_ulong size, +target_ulong HELPER(extpdp)(target_ulong ac, target_ulong size, CPUMIPSState *env) { int32_t start_pos; @@ -3457,7 +3457,8 @@ target_ulong helper_extpdp(target_ulong ac, target_ul= ong size, =20 =20 #if defined(TARGET_MIPS64) -target_ulong helper_dextp(target_ulong ac, target_ulong size, CPUMIPSState= *env) +target_ulong HELPER(dextp)(target_ulong ac, target_ulong size, + CPUMIPSState *env) { int start_pos; int len; @@ -3486,7 +3487,7 @@ target_ulong helper_dextp(target_ulong ac, target_ulo= ng size, CPUMIPSState *env) return temp; } =20 -target_ulong helper_dextpdp(target_ulong ac, target_ulong size, +target_ulong HELPER(dextpdp)(target_ulong ac, target_ulong size, CPUMIPSState *env) { int start_pos; @@ -3518,7 +3519,7 @@ target_ulong helper_dextpdp(target_ulong ac, target_u= long size, =20 #endif =20 -void helper_shilo(target_ulong ac, target_ulong rs, CPUMIPSState *env) +void HELPER(shilo)(target_ulong ac, target_ulong rs, CPUMIPSState *env) { int8_t rs5_0; uint64_t temp, acc; @@ -3544,7 +3545,7 @@ void helper_shilo(target_ulong ac, target_ulong rs, C= PUMIPSState *env) } =20 #if defined(TARGET_MIPS64) -void helper_dshilo(target_ulong shift, target_ulong ac, CPUMIPSState *env) +void HELPER(dshilo)(target_ulong shift, target_ulong ac, CPUMIPSState *env) { int8_t shift_t; uint64_t tempB, tempA; @@ -3570,7 +3571,7 @@ void helper_dshilo(target_ulong shift, target_ulong a= c, CPUMIPSState *env) } =20 #endif -void helper_mthlip(target_ulong ac, target_ulong rs, CPUMIPSState *env) +void HELPER(mthlip)(target_ulong ac, target_ulong rs, CPUMIPSState *env) { int32_t tempA, tempB, pos; =20 @@ -3588,7 +3589,7 @@ void helper_mthlip(target_ulong ac, target_ulong rs, = CPUMIPSState *env) } =20 #if defined(TARGET_MIPS64) -void helper_dmthlip(target_ulong rs, target_ulong ac, CPUMIPSState *env) +void HELPER(dmthlip)(target_ulong rs, target_ulong ac, CPUMIPSState *env) { uint8_t ac_t; uint8_t pos; @@ -3677,7 +3678,7 @@ void cpu_wrdsp(uint32_t rs, uint32_t mask_num, CPUMIP= SState *env) env->active_tc.DSPControl =3D dsp; } =20 -void helper_wrdsp(target_ulong rs, target_ulong mask_num, CPUMIPSState *en= v) +void HELPER(wrdsp)(target_ulong rs, target_ulong mask_num, CPUMIPSState *e= nv) { cpu_wrdsp(rs, mask_num, env); } @@ -3733,7 +3734,7 @@ uint32_t cpu_rddsp(uint32_t mask_num, CPUMIPSState *e= nv) return temp; } =20 -target_ulong helper_rddsp(target_ulong mask_num, CPUMIPSState *env) +target_ulong HELPER(rddsp)(target_ulong mask_num, CPUMIPSState *env) { return cpu_rddsp(mask_num, env); } diff --git a/target/mips/tcg/exception.c b/target/mips/tcg/exception.c index 823866ee600..626fb00bc40 100644 --- a/target/mips/tcg/exception.c +++ b/target/mips/tcg/exception.c @@ -45,18 +45,18 @@ target_ulong exception_resume_pc(CPUMIPSState *env) return bad_pc; } =20 -void helper_raise_exception_err(CPUMIPSState *env, uint32_t exception, +void HELPER(raise_exception_err)(CPUMIPSState *env, uint32_t exception, int error_code) { do_raise_exception_err(env, exception, error_code, 0); } =20 -void helper_raise_exception(CPUMIPSState *env, uint32_t exception) +void HELPER(raise_exception)(CPUMIPSState *env, uint32_t exception) { do_raise_exception(env, exception, GETPC()); } =20 -void helper_raise_exception_debug(CPUMIPSState *env) +void HELPER(raise_exception_debug)(CPUMIPSState *env) { do_raise_exception(env, EXCP_DEBUG, 0); } @@ -66,7 +66,7 @@ static void raise_exception(CPUMIPSState *env, uint32_t e= xception) do_raise_exception(env, exception, 0); } =20 -void helper_wait(CPUMIPSState *env) +void HELPER(wait)(CPUMIPSState *env) { CPUState *cs =3D env_cpu(env); =20 diff --git a/target/mips/tcg/fpu_helper.c b/target/mips/tcg/fpu_helper.c index 36af9808025..d6595da6482 100644 --- a/target/mips/tcg/fpu_helper.c +++ b/target/mips/tcg/fpu_helper.c @@ -36,7 +36,7 @@ #define FP_TO_INT32_OVERFLOW 0x7fffffff #define FP_TO_INT64_OVERFLOW 0x7fffffffffffffffULL =20 -target_ulong helper_cfc1(CPUMIPSState *env, uint32_t reg) +target_ulong HELPER(cfc1)(CPUMIPSState *env, uint32_t reg) { target_ulong arg1 =3D 0; =20 @@ -61,7 +61,7 @@ target_ulong helper_cfc1(CPUMIPSState *env, uint32_t reg) if (env->CP0_Config5 & (1 << CP0C5_UFE)) { arg1 =3D (env->CP0_Config5 >> CP0C5_FRE) & 1; } else { - helper_raise_exception(env, EXCP_RI); + HELPER(raise_exception)(env, EXCP_RI); } } break; @@ -84,7 +84,8 @@ target_ulong helper_cfc1(CPUMIPSState *env, uint32_t reg) return arg1; } =20 -void helper_ctc1(CPUMIPSState *env, target_ulong arg1, uint32_t fs, uint32= _t rt) +void HELPER(ctc1)(CPUMIPSState *env, target_ulong arg1, uint32_t fs, + uint32_t rt) { switch (fs) { case 1: @@ -120,7 +121,7 @@ void helper_ctc1(CPUMIPSState *env, target_ulong arg1, = uint32_t fs, uint32_t rt) env->CP0_Config5 &=3D ~(1 << CP0C5_FRE); compute_hflags(env); } else { - helper_raise_exception(env, EXCP_RI); + HELPER(raise_exception)(env, EXCP_RI); } break; case 6: @@ -132,7 +133,7 @@ void helper_ctc1(CPUMIPSState *env, target_ulong arg1, = uint32_t fs, uint32_t rt) env->CP0_Config5 |=3D (1 << CP0C5_FRE); compute_hflags(env); } else { - helper_raise_exception(env, EXCP_RI); + HELPER(raise_exception)(env, EXCP_RI); } break; case 25: @@ -230,21 +231,21 @@ static inline void update_fcr31(CPUMIPSState *env, ui= ntptr_t pc) */ =20 /* unary operations, modifying fp status */ -uint64_t helper_float_sqrt_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_sqrt_d)(CPUMIPSState *env, uint64_t fdt0) { fdt0 =3D float64_sqrt(fdt0, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); return fdt0; } =20 -uint32_t helper_float_sqrt_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_sqrt_s)(CPUMIPSState *env, uint32_t fst0) { fst0 =3D float32_sqrt(fst0, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); return fst0; } =20 -uint64_t helper_float_cvtd_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_cvtd_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t fdt2; =20 @@ -253,7 +254,7 @@ uint64_t helper_float_cvtd_s(CPUMIPSState *env, uint32_= t fst0) return fdt2; } =20 -uint64_t helper_float_cvtd_w(CPUMIPSState *env, uint32_t wt0) +uint64_t HELPER(float_cvtd_w)(CPUMIPSState *env, uint32_t wt0) { uint64_t fdt2; =20 @@ -262,7 +263,7 @@ uint64_t helper_float_cvtd_w(CPUMIPSState *env, uint32_= t wt0) return fdt2; } =20 -uint64_t helper_float_cvtd_l(CPUMIPSState *env, uint64_t dt0) +uint64_t HELPER(float_cvtd_l)(CPUMIPSState *env, uint64_t dt0) { uint64_t fdt2; =20 @@ -271,7 +272,7 @@ uint64_t helper_float_cvtd_l(CPUMIPSState *env, uint64_= t dt0) return fdt2; } =20 -uint64_t helper_float_cvt_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_cvt_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -284,7 +285,7 @@ uint64_t helper_float_cvt_l_d(CPUMIPSState *env, uint64= _t fdt0) return dt2; } =20 -uint64_t helper_float_cvt_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_cvt_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -297,7 +298,7 @@ uint64_t helper_float_cvt_l_s(CPUMIPSState *env, uint32= _t fst0) return dt2; } =20 -uint64_t helper_float_cvtps_pw(CPUMIPSState *env, uint64_t dt0) +uint64_t HELPER(float_cvtps_pw)(CPUMIPSState *env, uint64_t dt0) { uint32_t fst2; uint32_t fsth2; @@ -308,7 +309,7 @@ uint64_t helper_float_cvtps_pw(CPUMIPSState *env, uint6= 4_t dt0) return ((uint64_t)fsth2 << 32) | fst2; } =20 -uint64_t helper_float_cvtpw_ps(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_cvtpw_ps)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; uint32_t wth2; @@ -333,7 +334,7 @@ uint64_t helper_float_cvtpw_ps(CPUMIPSState *env, uint6= 4_t fdt0) return ((uint64_t)wth2 << 32) | wt2; } =20 -uint32_t helper_float_cvts_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_cvts_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t fst2; =20 @@ -342,7 +343,7 @@ uint32_t helper_float_cvts_d(CPUMIPSState *env, uint64_= t fdt0) return fst2; } =20 -uint32_t helper_float_cvts_w(CPUMIPSState *env, uint32_t wt0) +uint32_t HELPER(float_cvts_w)(CPUMIPSState *env, uint32_t wt0) { uint32_t fst2; =20 @@ -351,7 +352,7 @@ uint32_t helper_float_cvts_w(CPUMIPSState *env, uint32_= t wt0) return fst2; } =20 -uint32_t helper_float_cvts_l(CPUMIPSState *env, uint64_t dt0) +uint32_t HELPER(float_cvts_l)(CPUMIPSState *env, uint64_t dt0) { uint32_t fst2; =20 @@ -360,7 +361,7 @@ uint32_t helper_float_cvts_l(CPUMIPSState *env, uint64_= t dt0) return fst2; } =20 -uint32_t helper_float_cvts_pl(CPUMIPSState *env, uint32_t wt0) +uint32_t HELPER(float_cvts_pl)(CPUMIPSState *env, uint32_t wt0) { uint32_t wt2; =20 @@ -369,7 +370,7 @@ uint32_t helper_float_cvts_pl(CPUMIPSState *env, uint32= _t wt0) return wt2; } =20 -uint32_t helper_float_cvts_pu(CPUMIPSState *env, uint32_t wth0) +uint32_t HELPER(float_cvts_pu)(CPUMIPSState *env, uint32_t wth0) { uint32_t wt2; =20 @@ -378,7 +379,7 @@ uint32_t helper_float_cvts_pu(CPUMIPSState *env, uint32= _t wth0) return wt2; } =20 -uint32_t helper_float_cvt_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_cvt_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -391,7 +392,7 @@ uint32_t helper_float_cvt_w_s(CPUMIPSState *env, uint32= _t fst0) return wt2; } =20 -uint32_t helper_float_cvt_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_cvt_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -404,7 +405,7 @@ uint32_t helper_float_cvt_w_d(CPUMIPSState *env, uint64= _t fdt0) return wt2; } =20 -uint64_t helper_float_round_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_round_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -420,7 +421,7 @@ uint64_t helper_float_round_l_d(CPUMIPSState *env, uint= 64_t fdt0) return dt2; } =20 -uint64_t helper_float_round_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_round_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -436,7 +437,7 @@ uint64_t helper_float_round_l_s(CPUMIPSState *env, uint= 32_t fst0) return dt2; } =20 -uint32_t helper_float_round_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_round_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -452,7 +453,7 @@ uint32_t helper_float_round_w_d(CPUMIPSState *env, uint= 64_t fdt0) return wt2; } =20 -uint32_t helper_float_round_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_round_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -468,7 +469,7 @@ uint32_t helper_float_round_w_s(CPUMIPSState *env, uint= 32_t fst0) return wt2; } =20 -uint64_t helper_float_trunc_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_trunc_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -482,7 +483,7 @@ uint64_t helper_float_trunc_l_d(CPUMIPSState *env, uint= 64_t fdt0) return dt2; } =20 -uint64_t helper_float_trunc_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_trunc_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -495,7 +496,7 @@ uint64_t helper_float_trunc_l_s(CPUMIPSState *env, uint= 32_t fst0) return dt2; } =20 -uint32_t helper_float_trunc_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_trunc_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -508,7 +509,7 @@ uint32_t helper_float_trunc_w_d(CPUMIPSState *env, uint= 64_t fdt0) return wt2; } =20 -uint32_t helper_float_trunc_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_trunc_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -521,7 +522,7 @@ uint32_t helper_float_trunc_w_s(CPUMIPSState *env, uint= 32_t fst0) return wt2; } =20 -uint64_t helper_float_ceil_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_ceil_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -536,7 +537,7 @@ uint64_t helper_float_ceil_l_d(CPUMIPSState *env, uint6= 4_t fdt0) return dt2; } =20 -uint64_t helper_float_ceil_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_ceil_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -551,7 +552,7 @@ uint64_t helper_float_ceil_l_s(CPUMIPSState *env, uint3= 2_t fst0) return dt2; } =20 -uint32_t helper_float_ceil_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_ceil_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -566,7 +567,7 @@ uint32_t helper_float_ceil_w_d(CPUMIPSState *env, uint6= 4_t fdt0) return wt2; } =20 -uint32_t helper_float_ceil_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_ceil_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -581,7 +582,7 @@ uint32_t helper_float_ceil_w_s(CPUMIPSState *env, uint3= 2_t fst0) return wt2; } =20 -uint64_t helper_float_floor_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_floor_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -596,7 +597,7 @@ uint64_t helper_float_floor_l_d(CPUMIPSState *env, uint= 64_t fdt0) return dt2; } =20 -uint64_t helper_float_floor_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_floor_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -611,7 +612,7 @@ uint64_t helper_float_floor_l_s(CPUMIPSState *env, uint= 32_t fst0) return dt2; } =20 -uint32_t helper_float_floor_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_floor_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -626,7 +627,7 @@ uint32_t helper_float_floor_w_d(CPUMIPSState *env, uint= 64_t fdt0) return wt2; } =20 -uint32_t helper_float_floor_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_floor_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -641,7 +642,7 @@ uint32_t helper_float_floor_w_s(CPUMIPSState *env, uint= 32_t fst0) return wt2; } =20 -uint64_t helper_float_cvt_2008_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_cvt_2008_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -656,7 +657,7 @@ uint64_t helper_float_cvt_2008_l_d(CPUMIPSState *env, u= int64_t fdt0) return dt2; } =20 -uint64_t helper_float_cvt_2008_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_cvt_2008_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -671,7 +672,7 @@ uint64_t helper_float_cvt_2008_l_s(CPUMIPSState *env, u= int32_t fst0) return dt2; } =20 -uint32_t helper_float_cvt_2008_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_cvt_2008_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -686,7 +687,7 @@ uint32_t helper_float_cvt_2008_w_d(CPUMIPSState *env, u= int64_t fdt0) return wt2; } =20 -uint32_t helper_float_cvt_2008_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_cvt_2008_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -701,7 +702,7 @@ uint32_t helper_float_cvt_2008_w_s(CPUMIPSState *env, u= int32_t fst0) return wt2; } =20 -uint64_t helper_float_round_2008_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_round_2008_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -719,7 +720,7 @@ uint64_t helper_float_round_2008_l_d(CPUMIPSState *env,= uint64_t fdt0) return dt2; } =20 -uint64_t helper_float_round_2008_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_round_2008_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -737,7 +738,7 @@ uint64_t helper_float_round_2008_l_s(CPUMIPSState *env,= uint32_t fst0) return dt2; } =20 -uint32_t helper_float_round_2008_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_round_2008_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -755,7 +756,7 @@ uint32_t helper_float_round_2008_w_d(CPUMIPSState *env,= uint64_t fdt0) return wt2; } =20 -uint32_t helper_float_round_2008_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_round_2008_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -773,7 +774,7 @@ uint32_t helper_float_round_2008_w_s(CPUMIPSState *env,= uint32_t fst0) return wt2; } =20 -uint64_t helper_float_trunc_2008_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_trunc_2008_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -788,7 +789,7 @@ uint64_t helper_float_trunc_2008_l_d(CPUMIPSState *env,= uint64_t fdt0) return dt2; } =20 -uint64_t helper_float_trunc_2008_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_trunc_2008_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -803,7 +804,7 @@ uint64_t helper_float_trunc_2008_l_s(CPUMIPSState *env,= uint32_t fst0) return dt2; } =20 -uint32_t helper_float_trunc_2008_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_trunc_2008_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -818,7 +819,7 @@ uint32_t helper_float_trunc_2008_w_d(CPUMIPSState *env,= uint64_t fdt0) return wt2; } =20 -uint32_t helper_float_trunc_2008_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_trunc_2008_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -833,7 +834,7 @@ uint32_t helper_float_trunc_2008_w_s(CPUMIPSState *env,= uint32_t fst0) return wt2; } =20 -uint64_t helper_float_ceil_2008_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_ceil_2008_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -850,7 +851,7 @@ uint64_t helper_float_ceil_2008_l_d(CPUMIPSState *env, = uint64_t fdt0) return dt2; } =20 -uint64_t helper_float_ceil_2008_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_ceil_2008_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -867,7 +868,7 @@ uint64_t helper_float_ceil_2008_l_s(CPUMIPSState *env, = uint32_t fst0) return dt2; } =20 -uint32_t helper_float_ceil_2008_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_ceil_2008_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -884,7 +885,7 @@ uint32_t helper_float_ceil_2008_w_d(CPUMIPSState *env, = uint64_t fdt0) return wt2; } =20 -uint32_t helper_float_ceil_2008_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_ceil_2008_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -901,7 +902,7 @@ uint32_t helper_float_ceil_2008_w_s(CPUMIPSState *env, = uint32_t fst0) return wt2; } =20 -uint64_t helper_float_floor_2008_l_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_floor_2008_l_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t dt2; =20 @@ -918,7 +919,7 @@ uint64_t helper_float_floor_2008_l_d(CPUMIPSState *env,= uint64_t fdt0) return dt2; } =20 -uint64_t helper_float_floor_2008_l_s(CPUMIPSState *env, uint32_t fst0) +uint64_t HELPER(float_floor_2008_l_s)(CPUMIPSState *env, uint32_t fst0) { uint64_t dt2; =20 @@ -935,7 +936,7 @@ uint64_t helper_float_floor_2008_l_s(CPUMIPSState *env,= uint32_t fst0) return dt2; } =20 -uint32_t helper_float_floor_2008_w_d(CPUMIPSState *env, uint64_t fdt0) +uint32_t HELPER(float_floor_2008_w_d)(CPUMIPSState *env, uint64_t fdt0) { uint32_t wt2; =20 @@ -952,7 +953,7 @@ uint32_t helper_float_floor_2008_w_d(CPUMIPSState *env,= uint64_t fdt0) return wt2; } =20 -uint32_t helper_float_floor_2008_w_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_floor_2008_w_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t wt2; =20 @@ -971,17 +972,17 @@ uint32_t helper_float_floor_2008_w_s(CPUMIPSState *en= v, uint32_t fst0) =20 /* unary operations, not modifying fp status */ =20 -uint64_t helper_float_abs_d(uint64_t fdt0) +uint64_t HELPER(float_abs_d)(uint64_t fdt0) { return float64_abs(fdt0); } =20 -uint32_t helper_float_abs_s(uint32_t fst0) +uint32_t HELPER(float_abs_s)(uint32_t fst0) { return float32_abs(fst0); } =20 -uint64_t helper_float_abs_ps(uint64_t fdt0) +uint64_t HELPER(float_abs_ps)(uint64_t fdt0) { uint32_t wt0; uint32_t wth0; @@ -991,17 +992,17 @@ uint64_t helper_float_abs_ps(uint64_t fdt0) return ((uint64_t)wth0 << 32) | wt0; } =20 -uint64_t helper_float_chs_d(uint64_t fdt0) +uint64_t HELPER(float_chs_d)(uint64_t fdt0) { return float64_chs(fdt0); } =20 -uint32_t helper_float_chs_s(uint32_t fst0) +uint32_t HELPER(float_chs_s)(uint32_t fst0) { return float32_chs(fst0); } =20 -uint64_t helper_float_chs_ps(uint64_t fdt0) +uint64_t HELPER(float_chs_ps)(uint64_t fdt0) { uint32_t wt0; uint32_t wth0; @@ -1012,7 +1013,7 @@ uint64_t helper_float_chs_ps(uint64_t fdt0) } =20 /* MIPS specific unary operations */ -uint64_t helper_float_recip_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_recip_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t fdt2; =20 @@ -1021,7 +1022,7 @@ uint64_t helper_float_recip_d(CPUMIPSState *env, uint= 64_t fdt0) return fdt2; } =20 -uint32_t helper_float_recip_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_recip_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t fst2; =20 @@ -1030,7 +1031,7 @@ uint32_t helper_float_recip_s(CPUMIPSState *env, uint= 32_t fst0) return fst2; } =20 -uint64_t helper_float_rsqrt_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_rsqrt_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t fdt2; =20 @@ -1040,7 +1041,7 @@ uint64_t helper_float_rsqrt_d(CPUMIPSState *env, uint= 64_t fdt0) return fdt2; } =20 -uint32_t helper_float_rsqrt_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_rsqrt_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t fst2; =20 @@ -1050,7 +1051,7 @@ uint32_t helper_float_rsqrt_s(CPUMIPSState *env, uint= 32_t fst0) return fst2; } =20 -uint64_t helper_float_recip1_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_recip1_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t fdt2; =20 @@ -1059,7 +1060,7 @@ uint64_t helper_float_recip1_d(CPUMIPSState *env, uin= t64_t fdt0) return fdt2; } =20 -uint32_t helper_float_recip1_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_recip1_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t fst2; =20 @@ -1068,7 +1069,7 @@ uint32_t helper_float_recip1_s(CPUMIPSState *env, uin= t32_t fst0) return fst2; } =20 -uint64_t helper_float_recip1_ps(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_recip1_ps)(CPUMIPSState *env, uint64_t fdt0) { uint32_t fstl2; uint32_t fsth2; @@ -1080,7 +1081,7 @@ uint64_t helper_float_recip1_ps(CPUMIPSState *env, ui= nt64_t fdt0) return ((uint64_t)fsth2 << 32) | fstl2; } =20 -uint64_t helper_float_rsqrt1_d(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_rsqrt1_d)(CPUMIPSState *env, uint64_t fdt0) { uint64_t fdt2; =20 @@ -1090,7 +1091,7 @@ uint64_t helper_float_rsqrt1_d(CPUMIPSState *env, uin= t64_t fdt0) return fdt2; } =20 -uint32_t helper_float_rsqrt1_s(CPUMIPSState *env, uint32_t fst0) +uint32_t HELPER(float_rsqrt1_s)(CPUMIPSState *env, uint32_t fst0) { uint32_t fst2; =20 @@ -1100,7 +1101,7 @@ uint32_t helper_float_rsqrt1_s(CPUMIPSState *env, uin= t32_t fst0) return fst2; } =20 -uint64_t helper_float_rsqrt1_ps(CPUMIPSState *env, uint64_t fdt0) +uint64_t HELPER(float_rsqrt1_ps)(CPUMIPSState *env, uint64_t fdt0) { uint32_t fstl2; uint32_t fsth2; @@ -1113,7 +1114,7 @@ uint64_t helper_float_rsqrt1_ps(CPUMIPSState *env, ui= nt64_t fdt0) return ((uint64_t)fsth2 << 32) | fstl2; } =20 -uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) +uint64_t HELPER(float_rint_d)(CPUMIPSState *env, uint64_t fs) { uint64_t fdret; =20 @@ -1122,7 +1123,7 @@ uint64_t helper_float_rint_d(CPUMIPSState *env, uint6= 4_t fs) return fdret; } =20 -uint32_t helper_float_rint_s(CPUMIPSState *env, uint32_t fs) +uint32_t HELPER(float_rint_s)(CPUMIPSState *env, uint32_t fs) { uint32_t fdret; =20 @@ -1171,7 +1172,7 @@ uint64_t float_class_d(uint64_t arg, float_status *st= atus) } } =20 -uint64_t helper_float_class_d(CPUMIPSState *env, uint64_t arg) +uint64_t HELPER(float_class_d)(CPUMIPSState *env, uint64_t arg) { return float_class_d(arg, &env->active_fpu.fp_status); } @@ -1205,15 +1206,15 @@ uint32_t float_class_s(uint32_t arg, float_status *= status) } } =20 -uint32_t helper_float_class_s(CPUMIPSState *env, uint32_t arg) +uint32_t HELPER(float_class_s)(CPUMIPSState *env, uint32_t arg) { return float_class_s(arg, &env->active_fpu.fp_status); } =20 /* binary operations */ =20 -uint64_t helper_float_add_d(CPUMIPSState *env, - uint64_t fdt0, uint64_t fdt1) +uint64_t HELPER(float_add_d)(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) { uint64_t dt2; =20 @@ -1222,8 +1223,8 @@ uint64_t helper_float_add_d(CPUMIPSState *env, return dt2; } =20 -uint32_t helper_float_add_s(CPUMIPSState *env, - uint32_t fst0, uint32_t fst1) +uint32_t HELPER(float_add_s)(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) { uint32_t wt2; =20 @@ -1232,8 +1233,8 @@ uint32_t helper_float_add_s(CPUMIPSState *env, return wt2; } =20 -uint64_t helper_float_add_ps(CPUMIPSState *env, - uint64_t fdt0, uint64_t fdt1) +uint64_t HELPER(float_add_ps)(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1248,8 +1249,8 @@ uint64_t helper_float_add_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } =20 -uint64_t helper_float_sub_d(CPUMIPSState *env, - uint64_t fdt0, uint64_t fdt1) +uint64_t HELPER(float_sub_d)(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) { uint64_t dt2; =20 @@ -1258,8 +1259,8 @@ uint64_t helper_float_sub_d(CPUMIPSState *env, return dt2; } =20 -uint32_t helper_float_sub_s(CPUMIPSState *env, - uint32_t fst0, uint32_t fst1) +uint32_t HELPER(float_sub_s)(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) { uint32_t wt2; =20 @@ -1268,8 +1269,8 @@ uint32_t helper_float_sub_s(CPUMIPSState *env, return wt2; } =20 -uint64_t helper_float_sub_ps(CPUMIPSState *env, - uint64_t fdt0, uint64_t fdt1) +uint64_t HELPER(float_sub_ps)(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1284,8 +1285,8 @@ uint64_t helper_float_sub_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } =20 -uint64_t helper_float_mul_d(CPUMIPSState *env, - uint64_t fdt0, uint64_t fdt1) +uint64_t HELPER(float_mul_d)(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) { uint64_t dt2; =20 @@ -1294,8 +1295,8 @@ uint64_t helper_float_mul_d(CPUMIPSState *env, return dt2; } =20 -uint32_t helper_float_mul_s(CPUMIPSState *env, - uint32_t fst0, uint32_t fst1) +uint32_t HELPER(float_mul_s)(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) { uint32_t wt2; =20 @@ -1304,8 +1305,8 @@ uint32_t helper_float_mul_s(CPUMIPSState *env, return wt2; } =20 -uint64_t helper_float_mul_ps(CPUMIPSState *env, - uint64_t fdt0, uint64_t fdt1) +uint64_t HELPER(float_mul_ps)(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1320,8 +1321,8 @@ uint64_t helper_float_mul_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } =20 -uint64_t helper_float_div_d(CPUMIPSState *env, - uint64_t fdt0, uint64_t fdt1) +uint64_t HELPER(float_div_d)(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) { uint64_t dt2; =20 @@ -1330,8 +1331,8 @@ uint64_t helper_float_div_d(CPUMIPSState *env, return dt2; } =20 -uint32_t helper_float_div_s(CPUMIPSState *env, - uint32_t fst0, uint32_t fst1) +uint32_t HELPER(float_div_s)(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) { uint32_t wt2; =20 @@ -1340,8 +1341,8 @@ uint32_t helper_float_div_s(CPUMIPSState *env, return wt2; } =20 -uint64_t helper_float_div_ps(CPUMIPSState *env, - uint64_t fdt0, uint64_t fdt1) +uint64_t HELPER(float_div_ps)(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1358,7 +1359,7 @@ uint64_t helper_float_div_ps(CPUMIPSState *env, =20 =20 /* MIPS specific binary operations */ -uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t = fdt2) +uint64_t HELPER(float_recip2_d)(CPUMIPSState *env, uint64_t fdt0, uint64_t= fdt2) { fdt2 =3D float64_mul(fdt0, fdt2, &env->active_fpu.fp_status); fdt2 =3D float64_chs(float64_sub(fdt2, float64_one, @@ -1367,7 +1368,7 @@ uint64_t helper_float_recip2_d(CPUMIPSState *env, uin= t64_t fdt0, uint64_t fdt2) return fdt2; } =20 -uint32_t helper_float_recip2_s(CPUMIPSState *env, uint32_t fst0, uint32_t = fst2) +uint32_t HELPER(float_recip2_s)(CPUMIPSState *env, uint32_t fst0, uint32_t= fst2) { fst2 =3D float32_mul(fst0, fst2, &env->active_fpu.fp_status); fst2 =3D float32_chs(float32_sub(fst2, float32_one, @@ -1376,7 +1377,8 @@ uint32_t helper_float_recip2_s(CPUMIPSState *env, uin= t32_t fst0, uint32_t fst2) return fst2; } =20 -uint64_t helper_float_recip2_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t= fdt2) +uint64_t HELPER(float_recip2_ps)(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt2) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1393,7 +1395,7 @@ uint64_t helper_float_recip2_ps(CPUMIPSState *env, ui= nt64_t fdt0, uint64_t fdt2) return ((uint64_t)fsth2 << 32) | fstl2; } =20 -uint64_t helper_float_rsqrt2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t = fdt2) +uint64_t HELPER(float_rsqrt2_d)(CPUMIPSState *env, uint64_t fdt0, uint64_t= fdt2) { fdt2 =3D float64_mul(fdt0, fdt2, &env->active_fpu.fp_status); fdt2 =3D float64_sub(fdt2, float64_one, &env->active_fpu.fp_status); @@ -1403,7 +1405,7 @@ uint64_t helper_float_rsqrt2_d(CPUMIPSState *env, uin= t64_t fdt0, uint64_t fdt2) return fdt2; } =20 -uint32_t helper_float_rsqrt2_s(CPUMIPSState *env, uint32_t fst0, uint32_t = fst2) +uint32_t HELPER(float_rsqrt2_s)(CPUMIPSState *env, uint32_t fst0, uint32_t= fst2) { fst2 =3D float32_mul(fst0, fst2, &env->active_fpu.fp_status); fst2 =3D float32_sub(fst2, float32_one, &env->active_fpu.fp_status); @@ -1413,7 +1415,8 @@ uint32_t helper_float_rsqrt2_s(CPUMIPSState *env, uin= t32_t fst0, uint32_t fst2) return fst2; } =20 -uint64_t helper_float_rsqrt2_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t= fdt2) +uint64_t HELPER(float_rsqrt2_ps)(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt2) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1432,7 +1435,7 @@ uint64_t helper_float_rsqrt2_ps(CPUMIPSState *env, ui= nt64_t fdt0, uint64_t fdt2) return ((uint64_t)fsth2 << 32) | fstl2; } =20 -uint64_t helper_float_addr_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t f= dt1) +uint64_t HELPER(float_addr_ps)(CPUMIPSState *env, uint64_t fdt0, uint64_t = fdt1) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1447,7 +1450,7 @@ uint64_t helper_float_addr_ps(CPUMIPSState *env, uint= 64_t fdt0, uint64_t fdt1) return ((uint64_t)fsth2 << 32) | fstl2; } =20 -uint64_t helper_float_mulr_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t f= dt1) +uint64_t HELPER(float_mulr_ps)(CPUMIPSState *env, uint64_t fdt0, uint64_t = fdt1) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1463,7 +1466,7 @@ uint64_t helper_float_mulr_ps(CPUMIPSState *env, uint= 64_t fdt0, uint64_t fdt1) } =20 =20 -uint32_t helper_float_max_s(CPUMIPSState *env, uint32_t fs, uint32_t ft) +uint32_t HELPER(float_max_s)(CPUMIPSState *env, uint32_t fs, uint32_t ft) { uint32_t fdret; =20 @@ -1473,7 +1476,7 @@ uint32_t helper_float_max_s(CPUMIPSState *env, uint32= _t fs, uint32_t ft) return fdret; } =20 -uint64_t helper_float_max_d(CPUMIPSState *env, uint64_t fs, uint64_t ft) +uint64_t HELPER(float_max_d)(CPUMIPSState *env, uint64_t fs, uint64_t ft) { uint64_t fdret; =20 @@ -1483,7 +1486,7 @@ uint64_t helper_float_max_d(CPUMIPSState *env, uint64= _t fs, uint64_t ft) return fdret; } =20 -uint32_t helper_float_maxa_s(CPUMIPSState *env, uint32_t fs, uint32_t ft) +uint32_t HELPER(float_maxa_s)(CPUMIPSState *env, uint32_t fs, uint32_t ft) { uint32_t fdret; =20 @@ -1493,7 +1496,7 @@ uint32_t helper_float_maxa_s(CPUMIPSState *env, uint3= 2_t fs, uint32_t ft) return fdret; } =20 -uint64_t helper_float_maxa_d(CPUMIPSState *env, uint64_t fs, uint64_t ft) +uint64_t HELPER(float_maxa_d)(CPUMIPSState *env, uint64_t fs, uint64_t ft) { uint64_t fdret; =20 @@ -1503,7 +1506,7 @@ uint64_t helper_float_maxa_d(CPUMIPSState *env, uint6= 4_t fs, uint64_t ft) return fdret; } =20 -uint32_t helper_float_min_s(CPUMIPSState *env, uint32_t fs, uint32_t ft) +uint32_t HELPER(float_min_s)(CPUMIPSState *env, uint32_t fs, uint32_t ft) { uint32_t fdret; =20 @@ -1513,7 +1516,7 @@ uint32_t helper_float_min_s(CPUMIPSState *env, uint32= _t fs, uint32_t ft) return fdret; } =20 -uint64_t helper_float_min_d(CPUMIPSState *env, uint64_t fs, uint64_t ft) +uint64_t HELPER(float_min_d)(CPUMIPSState *env, uint64_t fs, uint64_t ft) { uint64_t fdret; =20 @@ -1523,7 +1526,7 @@ uint64_t helper_float_min_d(CPUMIPSState *env, uint64= _t fs, uint64_t ft) return fdret; } =20 -uint32_t helper_float_mina_s(CPUMIPSState *env, uint32_t fs, uint32_t ft) +uint32_t HELPER(float_mina_s)(CPUMIPSState *env, uint32_t fs, uint32_t ft) { uint32_t fdret; =20 @@ -1533,7 +1536,7 @@ uint32_t helper_float_mina_s(CPUMIPSState *env, uint3= 2_t fs, uint32_t ft) return fdret; } =20 -uint64_t helper_float_mina_d(CPUMIPSState *env, uint64_t fs, uint64_t ft) +uint64_t HELPER(float_mina_d)(CPUMIPSState *env, uint64_t fs, uint64_t ft) { uint64_t fdret; =20 @@ -1546,8 +1549,8 @@ uint64_t helper_float_mina_d(CPUMIPSState *env, uint6= 4_t fs, uint64_t ft) =20 /* ternary operations */ =20 -uint64_t helper_float_madd_d(CPUMIPSState *env, uint64_t fst0, - uint64_t fst1, uint64_t fst2) +uint64_t HELPER(float_madd_d)(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) { fst0 =3D float64_mul(fst0, fst1, &env->active_fpu.fp_status); fst0 =3D float64_add(fst0, fst2, &env->active_fpu.fp_status); @@ -1556,8 +1559,8 @@ uint64_t helper_float_madd_d(CPUMIPSState *env, uint6= 4_t fst0, return fst0; } =20 -uint32_t helper_float_madd_s(CPUMIPSState *env, uint32_t fst0, - uint32_t fst1, uint32_t fst2) +uint32_t HELPER(float_madd_s)(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) { fst0 =3D float32_mul(fst0, fst1, &env->active_fpu.fp_status); fst0 =3D float32_add(fst0, fst2, &env->active_fpu.fp_status); @@ -1566,8 +1569,8 @@ uint32_t helper_float_madd_s(CPUMIPSState *env, uint3= 2_t fst0, return fst0; } =20 -uint64_t helper_float_madd_ps(CPUMIPSState *env, uint64_t fdt0, - uint64_t fdt1, uint64_t fdt2) +uint64_t HELPER(float_madd_ps)(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; uint32_t fsth0 =3D fdt0 >> 32; @@ -1585,7 +1588,7 @@ uint64_t helper_float_madd_ps(CPUMIPSState *env, uint= 64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } =20 -uint64_t helper_float_msub_d(CPUMIPSState *env, uint64_t fst0, +uint64_t HELPER(float_msub_d)(CPUMIPSState *env, uint64_t fst0, uint64_t fst1, uint64_t fst2) { fst0 =3D float64_mul(fst0, fst1, &env->active_fpu.fp_status); @@ -1595,7 +1598,7 @@ uint64_t helper_float_msub_d(CPUMIPSState *env, uint6= 4_t fst0, return fst0; } =20 -uint32_t helper_float_msub_s(CPUMIPSState *env, uint32_t fst0, +uint32_t HELPER(float_msub_s)(CPUMIPSState *env, uint32_t fst0, uint32_t fst1, uint32_t fst2) { fst0 =3D float32_mul(fst0, fst1, &env->active_fpu.fp_status); @@ -1605,7 +1608,7 @@ uint32_t helper_float_msub_s(CPUMIPSState *env, uint3= 2_t fst0, return fst0; } =20 -uint64_t helper_float_msub_ps(CPUMIPSState *env, uint64_t fdt0, +uint64_t HELPER(float_msub_ps)(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1, uint64_t fdt2) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; @@ -1624,7 +1627,7 @@ uint64_t helper_float_msub_ps(CPUMIPSState *env, uint= 64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } =20 -uint64_t helper_float_nmadd_d(CPUMIPSState *env, uint64_t fst0, +uint64_t HELPER(float_nmadd_d)(CPUMIPSState *env, uint64_t fst0, uint64_t fst1, uint64_t fst2) { fst0 =3D float64_mul(fst0, fst1, &env->active_fpu.fp_status); @@ -1635,7 +1638,7 @@ uint64_t helper_float_nmadd_d(CPUMIPSState *env, uint= 64_t fst0, return fst0; } =20 -uint32_t helper_float_nmadd_s(CPUMIPSState *env, uint32_t fst0, +uint32_t HELPER(float_nmadd_s)(CPUMIPSState *env, uint32_t fst0, uint32_t fst1, uint32_t fst2) { fst0 =3D float32_mul(fst0, fst1, &env->active_fpu.fp_status); @@ -1646,7 +1649,7 @@ uint32_t helper_float_nmadd_s(CPUMIPSState *env, uint= 32_t fst0, return fst0; } =20 -uint64_t helper_float_nmadd_ps(CPUMIPSState *env, uint64_t fdt0, +uint64_t HELPER(float_nmadd_ps)(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1, uint64_t fdt2) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; @@ -1667,7 +1670,7 @@ uint64_t helper_float_nmadd_ps(CPUMIPSState *env, uin= t64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } =20 -uint64_t helper_float_nmsub_d(CPUMIPSState *env, uint64_t fst0, +uint64_t HELPER(float_nmsub_d)(CPUMIPSState *env, uint64_t fst0, uint64_t fst1, uint64_t fst2) { fst0 =3D float64_mul(fst0, fst1, &env->active_fpu.fp_status); @@ -1678,7 +1681,7 @@ uint64_t helper_float_nmsub_d(CPUMIPSState *env, uint= 64_t fst0, return fst0; } =20 -uint32_t helper_float_nmsub_s(CPUMIPSState *env, uint32_t fst0, +uint32_t HELPER(float_nmsub_s)(CPUMIPSState *env, uint32_t fst0, uint32_t fst1, uint32_t fst2) { fst0 =3D float32_mul(fst0, fst1, &env->active_fpu.fp_status); @@ -1689,7 +1692,7 @@ uint32_t helper_float_nmsub_s(CPUMIPSState *env, uint= 32_t fst0, return fst0; } =20 -uint64_t helper_float_nmsub_ps(CPUMIPSState *env, uint64_t fdt0, +uint64_t HELPER(float_nmsub_ps)(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1, uint64_t fdt2) { uint32_t fstl0 =3D fdt0 & 0XFFFFFFFF; @@ -1711,7 +1714,7 @@ uint64_t helper_float_nmsub_ps(CPUMIPSState *env, uin= t64_t fdt0, } =20 =20 -uint32_t helper_float_maddf_s(CPUMIPSState *env, uint32_t fs, +uint32_t HELPER(float_maddf_s)(CPUMIPSState *env, uint32_t fs, uint32_t ft, uint32_t fd) { uint32_t fdret; @@ -1723,7 +1726,7 @@ uint32_t helper_float_maddf_s(CPUMIPSState *env, uint= 32_t fs, return fdret; } =20 -uint64_t helper_float_maddf_d(CPUMIPSState *env, uint64_t fs, +uint64_t HELPER(float_maddf_d)(CPUMIPSState *env, uint64_t fs, uint64_t ft, uint64_t fd) { uint64_t fdret; @@ -1735,7 +1738,7 @@ uint64_t helper_float_maddf_d(CPUMIPSState *env, uint= 64_t fs, return fdret; } =20 -uint32_t helper_float_msubf_s(CPUMIPSState *env, uint32_t fs, +uint32_t HELPER(float_msubf_s)(CPUMIPSState *env, uint32_t fs, uint32_t ft, uint32_t fd) { uint32_t fdret; @@ -1747,7 +1750,7 @@ uint32_t helper_float_msubf_s(CPUMIPSState *env, uint= 32_t fs, return fdret; } =20 -uint64_t helper_float_msubf_d(CPUMIPSState *env, uint64_t fs, +uint64_t HELPER(float_msubf_d)(CPUMIPSState *env, uint64_t fs, uint64_t ft, uint64_t fd) { uint64_t fdret; @@ -1762,7 +1765,7 @@ uint64_t helper_float_msubf_d(CPUMIPSState *env, uint= 64_t fs, =20 /* compare operations */ #define FOP_COND_D(op, cond) \ -void helper_cmp_d_ ## op(CPUMIPSState *env, uint64_t fdt0, \ +void HELPER(cmp_d_ ## op)(CPUMIPSState *env, uint64_t fdt0, \ uint64_t fdt1, int cc) \ { \ int c; \ @@ -1773,7 +1776,7 @@ void helper_cmp_d_ ## op(CPUMIPSState *env, uint64_t = fdt0, \ else \ CLEAR_FP_COND(cc, env->active_fpu); \ } \ -void helper_cmpabs_d_ ## op(CPUMIPSState *env, uint64_t fdt0, \ +void HELPER(cmpabs_d_ ## op)(CPUMIPSState *env, uint64_t fdt0, \ uint64_t fdt1, int cc) \ { \ int c; \ @@ -1841,7 +1844,7 @@ FOP_COND_D(ngt, float64_unordered(fdt1, fdt0, &env->active_fpu.fp_status)) =20 #define FOP_COND_S(op, cond) \ -void helper_cmp_s_ ## op(CPUMIPSState *env, uint32_t fst0, \ +void HELPER(cmp_s_ ## op)(CPUMIPSState *env, uint32_t fst0, \ uint32_t fst1, int cc) \ { \ int c; \ @@ -1852,7 +1855,7 @@ void helper_cmp_s_ ## op(CPUMIPSState *env, uint32_t = fst0, \ else \ CLEAR_FP_COND(cc, env->active_fpu); \ } \ -void helper_cmpabs_s_ ## op(CPUMIPSState *env, uint32_t fst0, \ +void HELPER(cmpabs_s_ ## op)(CPUMIPSState *env, uint32_t fst0, \ uint32_t fst1, int cc) \ { \ int c; \ @@ -1920,7 +1923,7 @@ FOP_COND_S(ngt, float32_unordered(fst1, fst0, &env->active_fpu.fp_status)) =20 #define FOP_COND_PS(op, condl, condh) \ -void helper_cmp_ps_ ## op(CPUMIPSState *env, uint64_t fdt0, \ +void HELPER(cmp_ps_ ## op)(CPUMIPSState *env, uint64_t fdt0, \ uint64_t fdt1, int cc) \ { \ uint32_t fst0, fsth0, fst1, fsth1; \ @@ -1941,7 +1944,7 @@ void helper_cmp_ps_ ## op(CPUMIPSState *env, uint64_t= fdt0, \ else \ CLEAR_FP_COND(cc + 1, env->active_fpu); \ } \ -void helper_cmpabs_ps_ ## op(CPUMIPSState *env, uint64_t fdt0, \ +void HELPER(cmpabs_ps_ ## op)(CPUMIPSState *env, uint64_t fdt0, \ uint64_t fdt1, int cc) \ { \ uint32_t fst0, fsth0, fst1, fsth1; \ @@ -2062,7 +2065,7 @@ FOP_COND_PS(ngt, float32_unordered(fst1, fst0, =20 /* R6 compare operations */ #define FOP_CONDN_D(op, cond) \ -uint64_t helper_r6_cmp_d_ ## op(CPUMIPSState *env, uint64_t fdt0, \ +uint64_t HELPER(r6_cmp_d_ ## op)(CPUMIPSState *env, uint64_t fdt0, \ uint64_t fdt1) \ { \ uint64_t c; \ @@ -2157,7 +2160,7 @@ FOP_CONDN_D(sne, (float64_lt(fdt1, fdt0, &env->active_fpu.fp_status))) =20 #define FOP_CONDN_S(op, cond) \ -uint32_t helper_r6_cmp_s_ ## op(CPUMIPSState *env, uint32_t fst0, \ +uint32_t HELPER(r6_cmp_s_ ## op)(CPUMIPSState *env, uint32_t fst0, \ uint32_t fst1) \ { \ uint64_t c; \ diff --git a/target/mips/tcg/ldst_helper.c b/target/mips/tcg/ldst_helper.c index 1b25466b496..13bf71ca228 100644 --- a/target/mips/tcg/ldst_helper.c +++ b/target/mips/tcg/ldst_helper.c @@ -32,7 +32,7 @@ #include "exec/tlb-flags.h" =20 #define HELPER_LD_ATOMIC(name, insn, almask, do_cast) = \ -target_ulong helper_##name(CPUMIPSState *env, target_ulong arg, = \ +target_ulong HELPER(name)(CPUMIPSState *env, target_ulong arg, = \ uint32_t memop_idx) = \ { = \ MemOpIdx oi =3D memop_idx; = \ @@ -73,7 +73,7 @@ static inline target_ulong get_lmask(CPUMIPSState *env, return value; } =20 -void helper_swl(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, +void HELPER(swl)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { target_ulong lmask =3D get_lmask(env, arg2, 32); @@ -97,7 +97,7 @@ void helper_swl(CPUMIPSState *env, target_ulong arg1, tar= get_ulong arg2, } } =20 -void helper_swr(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, +void HELPER(swr)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { target_ulong lmask =3D get_lmask(env, arg2, 32); @@ -127,7 +127,7 @@ void helper_swr(CPUMIPSState *env, target_ulong arg1, t= arget_ulong arg2, * or fault handling won't work. */ =20 -void helper_sdl(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, +void HELPER(sdl)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { target_ulong lmask =3D get_lmask(env, arg2, 64); @@ -171,7 +171,7 @@ void helper_sdl(CPUMIPSState *env, target_ulong arg1, t= arget_ulong arg2, } } =20 -void helper_sdr(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, +void HELPER(sdr)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { target_ulong lmask =3D get_lmask(env, arg2, 64); @@ -218,7 +218,7 @@ void helper_sdr(CPUMIPSState *env, target_ulong arg1, t= arget_ulong arg2, =20 static const int multiple_regs[] =3D { 16, 17, 18, 19, 20, 21, 22, 23, 30 = }; =20 -void helper_lwm(CPUMIPSState *env, target_ulong addr, target_ulong reglist, +void HELPER(lwm)(CPUMIPSState *env, target_ulong addr, target_ulong reglis= t, uint32_t memop_idx) { MemOpIdx oi =3D memop_idx; @@ -239,7 +239,7 @@ void helper_lwm(CPUMIPSState *env, target_ulong addr, t= arget_ulong reglist, } } =20 -void helper_swm(CPUMIPSState *env, target_ulong addr, target_ulong reglist, +void HELPER(swm)(CPUMIPSState *env, target_ulong addr, target_ulong reglis= t, uint32_t memop_idx) { MemOpIdx oi =3D memop_idx; @@ -261,7 +261,7 @@ void helper_swm(CPUMIPSState *env, target_ulong addr, t= arget_ulong reglist, } =20 #if defined(TARGET_MIPS64) -void helper_ldm(CPUMIPSState *env, target_ulong addr, target_ulong reglist, +void HELPER(ldm)(CPUMIPSState *env, target_ulong addr, target_ulong reglis= t, uint32_t memop_idx) { MemOpIdx oi =3D memop_idx; @@ -282,7 +282,7 @@ void helper_ldm(CPUMIPSState *env, target_ulong addr, t= arget_ulong reglist, } } =20 -void helper_sdm(CPUMIPSState *env, target_ulong addr, target_ulong reglist, +void HELPER(sdm)(CPUMIPSState *env, target_ulong addr, target_ulong reglis= t, uint32_t memop_idx) { MemOpIdx oi =3D memop_idx; diff --git a/target/mips/tcg/lmmi_helper.c b/target/mips/tcg/lmmi_helper.c index 2c8732525ce..acda1b69be7 100644 --- a/target/mips/tcg/lmmi_helper.c +++ b/target/mips/tcg/lmmi_helper.c @@ -53,7 +53,7 @@ typedef union { (x < -0x80000000ll ? -0x80000000ll : x > 0x7fffffff ? 0x7fffffff : x) #define SATUW(x) (x > 0xffffffffull ? 0xffffffffull : x) =20 -uint64_t helper_paddsb(uint64_t fs, uint64_t ft) +uint64_t HELPER(paddsb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -67,7 +67,7 @@ uint64_t helper_paddsb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_paddusb(uint64_t fs, uint64_t ft) +uint64_t HELPER(paddusb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -81,7 +81,7 @@ uint64_t helper_paddusb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_paddsh(uint64_t fs, uint64_t ft) +uint64_t HELPER(paddsh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -95,7 +95,7 @@ uint64_t helper_paddsh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_paddush(uint64_t fs, uint64_t ft) +uint64_t HELPER(paddush)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -109,7 +109,7 @@ uint64_t helper_paddush(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_paddb(uint64_t fs, uint64_t ft) +uint64_t HELPER(paddb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -122,7 +122,7 @@ uint64_t helper_paddb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_paddh(uint64_t fs, uint64_t ft) +uint64_t HELPER(paddh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -135,7 +135,7 @@ uint64_t helper_paddh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_paddw(uint64_t fs, uint64_t ft) +uint64_t HELPER(paddw)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -148,7 +148,7 @@ uint64_t helper_paddw(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psubsb(uint64_t fs, uint64_t ft) +uint64_t HELPER(psubsb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -162,7 +162,7 @@ uint64_t helper_psubsb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psubusb(uint64_t fs, uint64_t ft) +uint64_t HELPER(psubusb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -176,7 +176,7 @@ uint64_t helper_psubusb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psubsh(uint64_t fs, uint64_t ft) +uint64_t HELPER(psubsh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -190,7 +190,7 @@ uint64_t helper_psubsh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psubush(uint64_t fs, uint64_t ft) +uint64_t HELPER(psubush)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -204,7 +204,7 @@ uint64_t helper_psubush(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psubb(uint64_t fs, uint64_t ft) +uint64_t HELPER(psubb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -217,7 +217,7 @@ uint64_t helper_psubb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psubh(uint64_t fs, uint64_t ft) +uint64_t HELPER(psubh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -230,7 +230,7 @@ uint64_t helper_psubh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psubw(uint64_t fs, uint64_t ft) +uint64_t HELPER(psubw)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned int i; @@ -243,7 +243,7 @@ uint64_t helper_psubw(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pshufh(uint64_t fs, uint64_t ft) +uint64_t HELPER(pshufh)(uint64_t fs, uint64_t ft) { unsigned host =3D BYTE_ORDER_XOR(3); LMIValue vd, vs; @@ -257,7 +257,7 @@ uint64_t helper_pshufh(uint64_t fs, uint64_t ft) return vd.d; } =20 -uint64_t helper_packsswh(uint64_t fs, uint64_t ft) +uint64_t HELPER(packsswh)(uint64_t fs, uint64_t ft) { uint64_t fd =3D 0; int64_t tmp; @@ -281,7 +281,7 @@ uint64_t helper_packsswh(uint64_t fs, uint64_t ft) return fd; } =20 -uint64_t helper_packsshb(uint64_t fs, uint64_t ft) +uint64_t HELPER(packsshb)(uint64_t fs, uint64_t ft) { uint64_t fd =3D 0; unsigned int i; @@ -300,7 +300,7 @@ uint64_t helper_packsshb(uint64_t fs, uint64_t ft) return fd; } =20 -uint64_t helper_packushb(uint64_t fs, uint64_t ft) +uint64_t HELPER(packushb)(uint64_t fs, uint64_t ft) { uint64_t fd =3D 0; unsigned int i; @@ -319,17 +319,17 @@ uint64_t helper_packushb(uint64_t fs, uint64_t ft) return fd; } =20 -uint64_t helper_punpcklwd(uint64_t fs, uint64_t ft) +uint64_t HELPER(punpcklwd)(uint64_t fs, uint64_t ft) { return (fs & 0xffffffff) | (ft << 32); } =20 -uint64_t helper_punpckhwd(uint64_t fs, uint64_t ft) +uint64_t HELPER(punpckhwd)(uint64_t fs, uint64_t ft) { return (fs >> 32) | (ft & ~0xffffffffull); } =20 -uint64_t helper_punpcklhw(uint64_t fs, uint64_t ft) +uint64_t HELPER(punpcklhw)(uint64_t fs, uint64_t ft) { unsigned host =3D BYTE_ORDER_XOR(3); LMIValue vd, vs, vt; @@ -344,7 +344,7 @@ uint64_t helper_punpcklhw(uint64_t fs, uint64_t ft) return vd.d; } =20 -uint64_t helper_punpckhhw(uint64_t fs, uint64_t ft) +uint64_t HELPER(punpckhhw)(uint64_t fs, uint64_t ft) { unsigned host =3D BYTE_ORDER_XOR(3); LMIValue vd, vs, vt; @@ -359,7 +359,7 @@ uint64_t helper_punpckhhw(uint64_t fs, uint64_t ft) return vd.d; } =20 -uint64_t helper_punpcklbh(uint64_t fs, uint64_t ft) +uint64_t HELPER(punpcklbh)(uint64_t fs, uint64_t ft) { unsigned host =3D BYTE_ORDER_XOR(7); LMIValue vd, vs, vt; @@ -378,7 +378,7 @@ uint64_t helper_punpcklbh(uint64_t fs, uint64_t ft) return vd.d; } =20 -uint64_t helper_punpckhbh(uint64_t fs, uint64_t ft) +uint64_t HELPER(punpckhbh)(uint64_t fs, uint64_t ft) { unsigned host =3D BYTE_ORDER_XOR(7); LMIValue vd, vs, vt; @@ -397,7 +397,7 @@ uint64_t helper_punpckhbh(uint64_t fs, uint64_t ft) return vd.d; } =20 -uint64_t helper_pavgh(uint64_t fs, uint64_t ft) +uint64_t HELPER(pavgh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -410,7 +410,7 @@ uint64_t helper_pavgh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pavgb(uint64_t fs, uint64_t ft) +uint64_t HELPER(pavgb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -423,7 +423,7 @@ uint64_t helper_pavgb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pmaxsh(uint64_t fs, uint64_t ft) +uint64_t HELPER(pmaxsh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -436,7 +436,7 @@ uint64_t helper_pmaxsh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pminsh(uint64_t fs, uint64_t ft) +uint64_t HELPER(pminsh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -449,7 +449,7 @@ uint64_t helper_pminsh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pmaxub(uint64_t fs, uint64_t ft) +uint64_t HELPER(pmaxub)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -462,7 +462,7 @@ uint64_t helper_pmaxub(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pminub(uint64_t fs, uint64_t ft) +uint64_t HELPER(pminub)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -475,7 +475,7 @@ uint64_t helper_pminub(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pcmpeqw(uint64_t fs, uint64_t ft) +uint64_t HELPER(pcmpeqw)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -488,7 +488,7 @@ uint64_t helper_pcmpeqw(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pcmpgtw(uint64_t fs, uint64_t ft) +uint64_t HELPER(pcmpgtw)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -501,7 +501,7 @@ uint64_t helper_pcmpgtw(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pcmpeqh(uint64_t fs, uint64_t ft) +uint64_t HELPER(pcmpeqh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -514,7 +514,7 @@ uint64_t helper_pcmpeqh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pcmpgth(uint64_t fs, uint64_t ft) +uint64_t HELPER(pcmpgth)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -527,7 +527,7 @@ uint64_t helper_pcmpgth(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pcmpeqb(uint64_t fs, uint64_t ft) +uint64_t HELPER(pcmpeqb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -540,7 +540,7 @@ uint64_t helper_pcmpeqb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pcmpgtb(uint64_t fs, uint64_t ft) +uint64_t HELPER(pcmpgtb)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -553,7 +553,7 @@ uint64_t helper_pcmpgtb(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psllw(uint64_t fs, uint64_t ft) +uint64_t HELPER(psllw)(uint64_t fs, uint64_t ft) { LMIValue vs; unsigned i; @@ -569,7 +569,7 @@ uint64_t helper_psllw(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psrlw(uint64_t fs, uint64_t ft) +uint64_t HELPER(psrlw)(uint64_t fs, uint64_t ft) { LMIValue vs; unsigned i; @@ -585,7 +585,7 @@ uint64_t helper_psrlw(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psraw(uint64_t fs, uint64_t ft) +uint64_t HELPER(psraw)(uint64_t fs, uint64_t ft) { LMIValue vs; unsigned i; @@ -601,7 +601,7 @@ uint64_t helper_psraw(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psllh(uint64_t fs, uint64_t ft) +uint64_t HELPER(psllh)(uint64_t fs, uint64_t ft) { LMIValue vs; unsigned i; @@ -617,7 +617,7 @@ uint64_t helper_psllh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psrlh(uint64_t fs, uint64_t ft) +uint64_t HELPER(psrlh)(uint64_t fs, uint64_t ft) { LMIValue vs; unsigned i; @@ -633,7 +633,7 @@ uint64_t helper_psrlh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_psrah(uint64_t fs, uint64_t ft) +uint64_t HELPER(psrah)(uint64_t fs, uint64_t ft) { LMIValue vs; unsigned i; @@ -649,7 +649,7 @@ uint64_t helper_psrah(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pmullh(uint64_t fs, uint64_t ft) +uint64_t HELPER(pmullh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -662,7 +662,7 @@ uint64_t helper_pmullh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pmulhh(uint64_t fs, uint64_t ft) +uint64_t HELPER(pmulhh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -676,7 +676,7 @@ uint64_t helper_pmulhh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pmulhuh(uint64_t fs, uint64_t ft) +uint64_t HELPER(pmulhuh)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -690,7 +690,7 @@ uint64_t helper_pmulhuh(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_pmaddhw(uint64_t fs, uint64_t ft) +uint64_t HELPER(pmaddhw)(uint64_t fs, uint64_t ft) { unsigned host =3D BYTE_ORDER_XOR(3); LMIValue vs, vt; @@ -706,7 +706,7 @@ uint64_t helper_pmaddhw(uint64_t fs, uint64_t ft) return ((uint64_t)p1 << 32) | p0; } =20 -uint64_t helper_pasubub(uint64_t fs, uint64_t ft) +uint64_t HELPER(pasubub)(uint64_t fs, uint64_t ft) { LMIValue vs, vt; unsigned i; @@ -720,7 +720,7 @@ uint64_t helper_pasubub(uint64_t fs, uint64_t ft) return vs.d; } =20 -uint64_t helper_biadd(uint64_t fs) +uint64_t HELPER(biadd)(uint64_t fs) { unsigned i, fd; =20 @@ -730,7 +730,7 @@ uint64_t helper_biadd(uint64_t fs) return fd & 0xffff; } =20 -uint64_t helper_pmovmskb(uint64_t fs) +uint64_t HELPER(pmovmskb)(uint64_t fs) { unsigned fd =3D 0; =20 diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index f554b3d10ee..fb76524ba08 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -96,7 +96,7 @@ static inline int64_t msa_nloc_df(uint32_t df, int64_t ar= g) return msa_nlzc_df(df, UNSIGNED((~arg), df)); } =20 -void helper_msa_nloc_b(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_nloc_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -119,7 +119,7 @@ void helper_msa_nloc_b(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->b[15] =3D msa_nloc_df(DF_BYTE, pws->b[15]); } =20 -void helper_msa_nloc_h(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_nloc_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -134,7 +134,7 @@ void helper_msa_nloc_h(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->h[7] =3D msa_nloc_df(DF_HALF, pws->h[7]); } =20 -void helper_msa_nloc_w(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_nloc_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -145,7 +145,7 @@ void helper_msa_nloc_w(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->w[3] =3D msa_nloc_df(DF_WORD, pws->w[3]); } =20 -void helper_msa_nloc_d(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_nloc_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -154,7 +154,7 @@ void helper_msa_nloc_d(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->d[1] =3D msa_nloc_df(DF_DOUBLE, pws->d[1]); } =20 -void helper_msa_nlzc_b(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_nlzc_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -177,7 +177,7 @@ void helper_msa_nlzc_b(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->b[15] =3D msa_nlzc_df(DF_BYTE, pws->b[15]); } =20 -void helper_msa_nlzc_h(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_nlzc_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -192,7 +192,7 @@ void helper_msa_nlzc_h(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->h[7] =3D msa_nlzc_df(DF_HALF, pws->h[7]); } =20 -void helper_msa_nlzc_w(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_nlzc_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -203,7 +203,7 @@ void helper_msa_nlzc_w(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->w[3] =3D msa_nlzc_df(DF_WORD, pws->w[3]); } =20 -void helper_msa_nlzc_d(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_nlzc_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -228,7 +228,7 @@ static inline int64_t msa_pcnt_df(uint32_t df, int64_t = arg) return x; } =20 -void helper_msa_pcnt_b(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_pcnt_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -251,7 +251,7 @@ void helper_msa_pcnt_b(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->b[15] =3D msa_pcnt_df(DF_BYTE, pws->b[15]); } =20 -void helper_msa_pcnt_h(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_pcnt_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -266,7 +266,7 @@ void helper_msa_pcnt_h(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->h[7] =3D msa_pcnt_df(DF_HALF, pws->h[7]); } =20 -void helper_msa_pcnt_w(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_pcnt_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -277,7 +277,7 @@ void helper_msa_pcnt_w(CPUMIPSState *env, uint32_t wd, = uint32_t ws) pwd->w[3] =3D msa_pcnt_df(DF_WORD, pws->w[3]); } =20 -void helper_msa_pcnt_d(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_pcnt_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -324,7 +324,7 @@ static inline int64_t msa_binsl_df(uint32_t df, } } =20 -void helper_msa_binsl_b(CPUMIPSState *env, +void HELPER(msa_binsl_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -349,7 +349,7 @@ void helper_msa_binsl_b(CPUMIPSState *env, pwd->b[15] =3D msa_binsl_df(DF_BYTE, pwd->b[15], pws->b[15], pwt->b[15= ]); } =20 -void helper_msa_binsl_h(CPUMIPSState *env, +void HELPER(msa_binsl_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -366,7 +366,7 @@ void helper_msa_binsl_h(CPUMIPSState *env, pwd->h[7] =3D msa_binsl_df(DF_HALF, pwd->h[7], pws->h[7], pwt->h[7]= ); } =20 -void helper_msa_binsl_w(CPUMIPSState *env, +void HELPER(msa_binsl_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -379,7 +379,7 @@ void helper_msa_binsl_w(CPUMIPSState *env, pwd->w[3] =3D msa_binsl_df(DF_WORD, pwd->w[3], pws->w[3], pwt->w[3]= ); } =20 -void helper_msa_binsl_d(CPUMIPSState *env, +void HELPER(msa_binsl_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -405,7 +405,7 @@ static inline int64_t msa_binsr_df(uint32_t df, } } =20 -void helper_msa_binsr_b(CPUMIPSState *env, +void HELPER(msa_binsr_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -430,7 +430,7 @@ void helper_msa_binsr_b(CPUMIPSState *env, pwd->b[15] =3D msa_binsr_df(DF_BYTE, pwd->b[15], pws->b[15], pwt->b[15= ]); } =20 -void helper_msa_binsr_h(CPUMIPSState *env, +void HELPER(msa_binsr_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -447,7 +447,7 @@ void helper_msa_binsr_h(CPUMIPSState *env, pwd->h[7] =3D msa_binsr_df(DF_HALF, pwd->h[7], pws->h[7], pwt->h[7]= ); } =20 -void helper_msa_binsr_w(CPUMIPSState *env, +void HELPER(msa_binsr_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -460,7 +460,7 @@ void helper_msa_binsr_w(CPUMIPSState *env, pwd->w[3] =3D msa_binsr_df(DF_WORD, pwd->w[3], pws->w[3], pwt->w[3]= ); } =20 -void helper_msa_binsr_d(CPUMIPSState *env, +void HELPER(msa_binsr_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -471,7 +471,8 @@ void helper_msa_binsr_d(CPUMIPSState *env, pwd->d[1] =3D msa_binsr_df(DF_DOUBLE, pwd->d[1], pws->d[1], pwt->d[= 1]); } =20 -void helper_msa_bmnz_v(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bmnz_v)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -483,7 +484,7 @@ void helper_msa_bmnz_v(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) ((pwd->d[1] & (~pwt->d[1])) | (pws->d[1] & pwt->d[1])), DF_DOUBLE); } =20 -void helper_msa_bmz_v(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) +void HELPER(msa_bmz_v)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -495,7 +496,8 @@ void helper_msa_bmz_v(CPUMIPSState *env, uint32_t wd, u= int32_t ws, uint32_t wt) ((pwd->d[1] & pwt->d[1]) | (pws->d[1] & (~pwt->d[1]))), DF_DOUBLE); } =20 -void helper_msa_bsel_v(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bsel_v)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -534,7 +536,8 @@ static inline int64_t msa_bclr_df(uint32_t df, int64_t = arg1, int64_t arg2) return UNSIGNED(arg1 & (~(1LL << b_arg2)), df); } =20 -void helper_msa_bclr_b(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bclr_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -558,7 +561,8 @@ void helper_msa_bclr_b(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->b[15] =3D msa_bclr_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_bclr_h(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bclr_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -574,7 +578,8 @@ void helper_msa_bclr_h(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->h[7] =3D msa_bclr_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_bclr_w(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bclr_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -586,7 +591,8 @@ void helper_msa_bclr_w(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->w[3] =3D msa_bclr_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_bclr_d(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bclr_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -602,7 +608,8 @@ static inline int64_t msa_bneg_df(uint32_t df, int64_t = arg1, int64_t arg2) return UNSIGNED(arg1 ^ (1LL << b_arg2), df); } =20 -void helper_msa_bneg_b(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bneg_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -626,7 +633,8 @@ void helper_msa_bneg_b(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->b[15] =3D msa_bneg_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_bneg_h(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bneg_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -642,7 +650,8 @@ void helper_msa_bneg_h(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->h[7] =3D msa_bneg_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_bneg_w(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bneg_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -654,7 +663,8 @@ void helper_msa_bneg_w(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->w[3] =3D msa_bneg_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_bneg_d(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bneg_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -671,7 +681,8 @@ static inline int64_t msa_bset_df(uint32_t df, int64_t = arg1, return UNSIGNED(arg1 | (1LL << b_arg2), df); } =20 -void helper_msa_bset_b(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bset_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -695,7 +706,8 @@ void helper_msa_bset_b(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->b[15] =3D msa_bset_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_bset_h(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bset_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -711,7 +723,8 @@ void helper_msa_bset_h(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->h[7] =3D msa_bset_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_bset_w(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bset_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -723,7 +736,8 @@ void helper_msa_bset_w(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->w[3] =3D msa_bset_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_bset_d(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) +void HELPER(msa_bset_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, + uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -818,7 +832,7 @@ static inline int64_t msa_add_a_df(uint32_t df, int64_t= arg1, int64_t arg2) return abs_arg1 + abs_arg2; } =20 -void helper_msa_add_a_b(CPUMIPSState *env, +void HELPER(msa_add_a_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -843,7 +857,7 @@ void helper_msa_add_a_b(CPUMIPSState *env, pwd->b[15] =3D msa_add_a_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_add_a_h(CPUMIPSState *env, +void HELPER(msa_add_a_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -860,7 +874,7 @@ void helper_msa_add_a_h(CPUMIPSState *env, pwd->h[7] =3D msa_add_a_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_add_a_w(CPUMIPSState *env, +void HELPER(msa_add_a_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -873,7 +887,7 @@ void helper_msa_add_a_w(CPUMIPSState *env, pwd->w[3] =3D msa_add_a_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_add_a_d(CPUMIPSState *env, +void HELPER(msa_add_a_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -897,7 +911,7 @@ static inline int64_t msa_adds_a_df(uint32_t df, int64_= t arg1, int64_t arg2) } } =20 -void helper_msa_adds_a_b(CPUMIPSState *env, +void HELPER(msa_adds_a_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -922,7 +936,7 @@ void helper_msa_adds_a_b(CPUMIPSState *env, pwd->b[15] =3D msa_adds_a_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_adds_a_h(CPUMIPSState *env, +void HELPER(msa_adds_a_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -939,7 +953,7 @@ void helper_msa_adds_a_h(CPUMIPSState *env, pwd->h[7] =3D msa_adds_a_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_adds_a_w(CPUMIPSState *env, +void HELPER(msa_adds_a_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -952,7 +966,7 @@ void helper_msa_adds_a_w(CPUMIPSState *env, pwd->w[3] =3D msa_adds_a_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_adds_a_d(CPUMIPSState *env, +void HELPER(msa_adds_a_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -975,7 +989,7 @@ static inline int64_t msa_adds_s_df(uint32_t df, int64_= t arg1, int64_t arg2) } } =20 -void helper_msa_adds_s_b(CPUMIPSState *env, +void HELPER(msa_adds_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1000,7 +1014,7 @@ void helper_msa_adds_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_adds_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_adds_s_h(CPUMIPSState *env, +void HELPER(msa_adds_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1017,7 +1031,7 @@ void helper_msa_adds_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_adds_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_adds_s_w(CPUMIPSState *env, +void HELPER(msa_adds_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1030,7 +1044,7 @@ void helper_msa_adds_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_adds_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_adds_s_d(CPUMIPSState *env, +void HELPER(msa_adds_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1050,7 +1064,7 @@ static inline uint64_t msa_adds_u_df(uint32_t df, uin= t64_t arg1, uint64_t arg2) return (u_arg1 < max_uint - u_arg2) ? u_arg1 + u_arg2 : max_uint; } =20 -void helper_msa_adds_u_b(CPUMIPSState *env, +void HELPER(msa_adds_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1075,7 +1089,7 @@ void helper_msa_adds_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_adds_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_adds_u_h(CPUMIPSState *env, +void HELPER(msa_adds_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1092,7 +1106,7 @@ void helper_msa_adds_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_adds_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_adds_u_w(CPUMIPSState *env, +void HELPER(msa_adds_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1105,7 +1119,7 @@ void helper_msa_adds_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_adds_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_adds_u_d(CPUMIPSState *env, +void HELPER(msa_adds_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1122,7 +1136,7 @@ static inline int64_t msa_addv_df(uint32_t df, int64_= t arg1, int64_t arg2) return arg1 + arg2; } =20 -void helper_msa_addv_b(CPUMIPSState *env, +void HELPER(msa_addv_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1147,7 +1161,7 @@ void helper_msa_addv_b(CPUMIPSState *env, pwd->b[15] =3D msa_addv_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_addv_h(CPUMIPSState *env, +void HELPER(msa_addv_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1164,7 +1178,7 @@ void helper_msa_addv_h(CPUMIPSState *env, pwd->h[7] =3D msa_addv_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_addv_w(CPUMIPSState *env, +void HELPER(msa_addv_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1177,7 +1191,7 @@ void helper_msa_addv_w(CPUMIPSState *env, pwd->w[3] =3D msa_addv_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_addv_d(CPUMIPSState *env, +void HELPER(msa_addv_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1207,7 +1221,7 @@ static inline int64_t msa_hadd_s_df(uint32_t df, int6= 4_t arg1, int64_t arg2) return SIGNED_ODD(arg1, df) + SIGNED_EVEN(arg2, df); } =20 -void helper_msa_hadd_s_h(CPUMIPSState *env, +void HELPER(msa_hadd_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1224,7 +1238,7 @@ void helper_msa_hadd_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_hadd_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_hadd_s_w(CPUMIPSState *env, +void HELPER(msa_hadd_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1237,7 +1251,7 @@ void helper_msa_hadd_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_hadd_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_hadd_s_d(CPUMIPSState *env, +void HELPER(msa_hadd_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1254,7 +1268,7 @@ static inline int64_t msa_hadd_u_df(uint32_t df, int6= 4_t arg1, int64_t arg2) return UNSIGNED_ODD(arg1, df) + UNSIGNED_EVEN(arg2, df); } =20 -void helper_msa_hadd_u_h(CPUMIPSState *env, +void HELPER(msa_hadd_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1271,7 +1285,7 @@ void helper_msa_hadd_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_hadd_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_hadd_u_w(CPUMIPSState *env, +void HELPER(msa_hadd_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1284,7 +1298,7 @@ void helper_msa_hadd_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_hadd_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_hadd_u_d(CPUMIPSState *env, +void HELPER(msa_hadd_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1326,7 +1340,7 @@ static inline int64_t msa_ave_s_df(uint32_t df, int64= _t arg1, int64_t arg2) return (arg1 >> 1) + (arg2 >> 1) + (arg1 & arg2 & 1); } =20 -void helper_msa_ave_s_b(CPUMIPSState *env, +void HELPER(msa_ave_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1351,7 +1365,7 @@ void helper_msa_ave_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_ave_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_ave_s_h(CPUMIPSState *env, +void HELPER(msa_ave_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1368,7 +1382,7 @@ void helper_msa_ave_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_ave_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_ave_s_w(CPUMIPSState *env, +void HELPER(msa_ave_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1381,7 +1395,7 @@ void helper_msa_ave_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_ave_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_ave_s_d(CPUMIPSState *env, +void HELPER(msa_ave_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1400,7 +1414,7 @@ static inline uint64_t msa_ave_u_df(uint32_t df, uint= 64_t arg1, uint64_t arg2) return (u_arg1 >> 1) + (u_arg2 >> 1) + (u_arg1 & u_arg2 & 1); } =20 -void helper_msa_ave_u_b(CPUMIPSState *env, +void HELPER(msa_ave_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1425,7 +1439,7 @@ void helper_msa_ave_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_ave_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_ave_u_h(CPUMIPSState *env, +void HELPER(msa_ave_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1442,7 +1456,7 @@ void helper_msa_ave_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_ave_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_ave_u_w(CPUMIPSState *env, +void HELPER(msa_ave_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1455,7 +1469,7 @@ void helper_msa_ave_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_ave_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_ave_u_d(CPUMIPSState *env, +void HELPER(msa_ave_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1472,7 +1486,7 @@ static inline int64_t msa_aver_s_df(uint32_t df, int6= 4_t arg1, int64_t arg2) return (arg1 >> 1) + (arg2 >> 1) + ((arg1 | arg2) & 1); } =20 -void helper_msa_aver_s_b(CPUMIPSState *env, +void HELPER(msa_aver_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1497,7 +1511,7 @@ void helper_msa_aver_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_aver_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_aver_s_h(CPUMIPSState *env, +void HELPER(msa_aver_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1514,7 +1528,7 @@ void helper_msa_aver_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_aver_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_aver_s_w(CPUMIPSState *env, +void HELPER(msa_aver_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1527,7 +1541,7 @@ void helper_msa_aver_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_aver_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_aver_s_d(CPUMIPSState *env, +void HELPER(msa_aver_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1546,7 +1560,7 @@ static inline uint64_t msa_aver_u_df(uint32_t df, uin= t64_t arg1, uint64_t arg2) return (u_arg1 >> 1) + (u_arg2 >> 1) + ((u_arg1 | u_arg2) & 1); } =20 -void helper_msa_aver_u_b(CPUMIPSState *env, +void HELPER(msa_aver_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1571,7 +1585,7 @@ void helper_msa_aver_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_aver_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_aver_u_h(CPUMIPSState *env, +void HELPER(msa_aver_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1588,7 +1602,7 @@ void helper_msa_aver_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_aver_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_aver_u_w(CPUMIPSState *env, +void HELPER(msa_aver_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1601,7 +1615,7 @@ void helper_msa_aver_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_aver_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_aver_u_d(CPUMIPSState *env, +void HELPER(msa_aver_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1651,7 +1665,7 @@ static inline int8_t msa_ceq_b(int8_t arg1, int8_t ar= g2) return arg1 =3D=3D arg2 ? -1 : 0; } =20 -void helper_msa_ceq_b(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) +void HELPER(msa_ceq_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -1680,7 +1694,7 @@ static inline int16_t msa_ceq_h(int16_t arg1, int16_t= arg2) return arg1 =3D=3D arg2 ? -1 : 0; } =20 -void helper_msa_ceq_h(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) +void HELPER(msa_ceq_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -1701,7 +1715,7 @@ static inline int32_t msa_ceq_w(int32_t arg1, int32_t= arg2) return arg1 =3D=3D arg2 ? -1 : 0; } =20 -void helper_msa_ceq_w(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) +void HELPER(msa_ceq_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -1718,7 +1732,7 @@ static inline int64_t msa_ceq_d(int64_t arg1, int64_t= arg2) return arg1 =3D=3D arg2 ? -1 : 0; } =20 -void helper_msa_ceq_d(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) +void HELPER(msa_ceq_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -1733,7 +1747,7 @@ static inline int64_t msa_cle_s_df(uint32_t df, int64= _t arg1, int64_t arg2) return arg1 <=3D arg2 ? -1 : 0; } =20 -void helper_msa_cle_s_b(CPUMIPSState *env, +void HELPER(msa_cle_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1758,7 +1772,7 @@ void helper_msa_cle_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_cle_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_cle_s_h(CPUMIPSState *env, +void HELPER(msa_cle_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1775,7 +1789,7 @@ void helper_msa_cle_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_cle_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_cle_s_w(CPUMIPSState *env, +void HELPER(msa_cle_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1788,7 +1802,7 @@ void helper_msa_cle_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_cle_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_cle_s_d(CPUMIPSState *env, +void HELPER(msa_cle_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1806,7 +1820,7 @@ static inline int64_t msa_cle_u_df(uint32_t df, int64= _t arg1, int64_t arg2) return u_arg1 <=3D u_arg2 ? -1 : 0; } =20 -void helper_msa_cle_u_b(CPUMIPSState *env, +void HELPER(msa_cle_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1831,7 +1845,7 @@ void helper_msa_cle_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_cle_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_cle_u_h(CPUMIPSState *env, +void HELPER(msa_cle_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1848,7 +1862,7 @@ void helper_msa_cle_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_cle_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_cle_u_w(CPUMIPSState *env, +void HELPER(msa_cle_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1861,7 +1875,7 @@ void helper_msa_cle_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_cle_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_cle_u_d(CPUMIPSState *env, +void HELPER(msa_cle_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1882,7 +1896,7 @@ static inline int8_t msa_clt_s_b(int8_t arg1, int8_t = arg2) return arg1 < arg2 ? -1 : 0; } =20 -void helper_msa_clt_s_b(CPUMIPSState *env, +void HELPER(msa_clt_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1912,7 +1926,7 @@ static inline int16_t msa_clt_s_h(int16_t arg1, int16= _t arg2) return arg1 < arg2 ? -1 : 0; } =20 -void helper_msa_clt_s_h(CPUMIPSState *env, +void HELPER(msa_clt_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1934,7 +1948,7 @@ static inline int32_t msa_clt_s_w(int32_t arg1, int32= _t arg2) return arg1 < arg2 ? -1 : 0; } =20 -void helper_msa_clt_s_w(CPUMIPSState *env, +void HELPER(msa_clt_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1952,7 +1966,7 @@ static inline int64_t msa_clt_s_d(int64_t arg1, int64= _t arg2) return arg1 < arg2 ? -1 : 0; } =20 -void helper_msa_clt_s_d(CPUMIPSState *env, +void HELPER(msa_clt_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1970,7 +1984,7 @@ static inline int64_t msa_clt_u_df(uint32_t df, int64= _t arg1, int64_t arg2) return u_arg1 < u_arg2 ? -1 : 0; } =20 -void helper_msa_clt_u_b(CPUMIPSState *env, +void HELPER(msa_clt_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -1995,7 +2009,7 @@ void helper_msa_clt_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_clt_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_clt_u_h(CPUMIPSState *env, +void HELPER(msa_clt_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2012,7 +2026,7 @@ void helper_msa_clt_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_clt_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_clt_u_w(CPUMIPSState *env, +void HELPER(msa_clt_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2025,7 +2039,7 @@ void helper_msa_clt_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_clt_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_clt_u_d(CPUMIPSState *env, +void HELPER(msa_clt_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2063,7 +2077,7 @@ static inline int64_t msa_div_s_df(uint32_t df, int64= _t arg1, int64_t arg2) : arg1 >=3D 0 ? -1 : 1; } =20 -void helper_msa_div_s_b(CPUMIPSState *env, +void HELPER(msa_div_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2088,7 +2102,7 @@ void helper_msa_div_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_div_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_div_s_h(CPUMIPSState *env, +void HELPER(msa_div_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2105,7 +2119,7 @@ void helper_msa_div_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_div_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_div_s_w(CPUMIPSState *env, +void HELPER(msa_div_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2118,7 +2132,7 @@ void helper_msa_div_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_div_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_div_s_d(CPUMIPSState *env, +void HELPER(msa_div_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2136,7 +2150,7 @@ static inline int64_t msa_div_u_df(uint32_t df, int64= _t arg1, int64_t arg2) return arg2 ? u_arg1 / u_arg2 : -1; } =20 -void helper_msa_div_u_b(CPUMIPSState *env, +void HELPER(msa_div_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2161,7 +2175,7 @@ void helper_msa_div_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_div_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_div_u_h(CPUMIPSState *env, +void HELPER(msa_div_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2178,7 +2192,7 @@ void helper_msa_div_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_div_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_div_u_w(CPUMIPSState *env, +void HELPER(msa_div_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2191,7 +2205,7 @@ void helper_msa_div_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_div_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_div_u_d(CPUMIPSState *env, +void HELPER(msa_div_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2253,7 +2267,7 @@ static inline int64_t msa_dotp_s_df(uint32_t df, int6= 4_t arg1, int64_t arg2) return (even_arg1 * even_arg2) + (odd_arg1 * odd_arg2); } =20 -void helper_msa_dotp_s_h(CPUMIPSState *env, +void HELPER(msa_dotp_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2270,7 +2284,7 @@ void helper_msa_dotp_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_dotp_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_dotp_s_w(CPUMIPSState *env, +void HELPER(msa_dotp_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2283,7 +2297,7 @@ void helper_msa_dotp_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_dotp_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_dotp_s_d(CPUMIPSState *env, +void HELPER(msa_dotp_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2306,7 +2320,7 @@ static inline int64_t msa_dotp_u_df(uint32_t df, int6= 4_t arg1, int64_t arg2) return (even_arg1 * even_arg2) + (odd_arg1 * odd_arg2); } =20 -void helper_msa_dotp_u_h(CPUMIPSState *env, +void HELPER(msa_dotp_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2323,7 +2337,7 @@ void helper_msa_dotp_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_dotp_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_dotp_u_w(CPUMIPSState *env, +void HELPER(msa_dotp_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2336,7 +2350,7 @@ void helper_msa_dotp_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_dotp_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_dotp_u_d(CPUMIPSState *env, +void HELPER(msa_dotp_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2360,7 +2374,7 @@ static inline int64_t msa_dpadd_s_df(uint32_t df, int= 64_t dest, int64_t arg1, return dest + (even_arg1 * even_arg2) + (odd_arg1 * odd_arg2); } =20 -void helper_msa_dpadd_s_h(CPUMIPSState *env, +void HELPER(msa_dpadd_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2377,7 +2391,7 @@ void helper_msa_dpadd_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_dpadd_s_df(DF_HALF, pwd->h[7], pws->h[7], pwt->h[= 7]); } =20 -void helper_msa_dpadd_s_w(CPUMIPSState *env, +void HELPER(msa_dpadd_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2390,7 +2404,7 @@ void helper_msa_dpadd_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_dpadd_s_df(DF_WORD, pwd->w[3], pws->w[3], pwt->w[= 3]); } =20 -void helper_msa_dpadd_s_d(CPUMIPSState *env, +void HELPER(msa_dpadd_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2414,7 +2428,7 @@ static inline int64_t msa_dpadd_u_df(uint32_t df, int= 64_t dest, int64_t arg1, return dest + (even_arg1 * even_arg2) + (odd_arg1 * odd_arg2); } =20 -void helper_msa_dpadd_u_h(CPUMIPSState *env, +void HELPER(msa_dpadd_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2431,7 +2445,7 @@ void helper_msa_dpadd_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_dpadd_u_df(DF_HALF, pwd->h[7], pws->h[7], pwt->h[= 7]); } =20 -void helper_msa_dpadd_u_w(CPUMIPSState *env, +void HELPER(msa_dpadd_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2444,7 +2458,7 @@ void helper_msa_dpadd_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_dpadd_u_df(DF_WORD, pwd->w[3], pws->w[3], pwt->w[= 3]); } =20 -void helper_msa_dpadd_u_d(CPUMIPSState *env, +void HELPER(msa_dpadd_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2468,7 +2482,7 @@ static inline int64_t msa_dpsub_s_df(uint32_t df, int= 64_t dest, int64_t arg1, return dest - ((even_arg1 * even_arg2) + (odd_arg1 * odd_arg2)); } =20 -void helper_msa_dpsub_s_h(CPUMIPSState *env, +void HELPER(msa_dpsub_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2485,7 +2499,7 @@ void helper_msa_dpsub_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_dpsub_s_df(DF_HALF, pwd->h[7], pws->h[7], pwt->h[= 7]); } =20 -void helper_msa_dpsub_s_w(CPUMIPSState *env, +void HELPER(msa_dpsub_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2498,7 +2512,7 @@ void helper_msa_dpsub_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_dpsub_s_df(DF_WORD, pwd->w[3], pws->w[3], pwt->w[= 3]); } =20 -void helper_msa_dpsub_s_d(CPUMIPSState *env, +void HELPER(msa_dpsub_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2522,7 +2536,7 @@ static inline int64_t msa_dpsub_u_df(uint32_t df, int= 64_t dest, int64_t arg1, return dest - ((even_arg1 * even_arg2) + (odd_arg1 * odd_arg2)); } =20 -void helper_msa_dpsub_u_h(CPUMIPSState *env, +void HELPER(msa_dpsub_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2539,7 +2553,7 @@ void helper_msa_dpsub_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_dpsub_u_df(DF_HALF, pwd->h[7], pws->h[7], pwt->h[= 7]); } =20 -void helper_msa_dpsub_u_w(CPUMIPSState *env, +void HELPER(msa_dpsub_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2552,7 +2566,7 @@ void helper_msa_dpsub_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_dpsub_u_df(DF_WORD, pwd->w[3], pws->w[3], pwt->w[= 3]); } =20 -void helper_msa_dpsub_u_d(CPUMIPSState *env, +void HELPER(msa_dpsub_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2603,7 +2617,7 @@ static inline int64_t msa_max_a_df(uint32_t df, int64= _t arg1, int64_t arg2) return abs_arg1 > abs_arg2 ? arg1 : arg2; } =20 -void helper_msa_max_a_b(CPUMIPSState *env, +void HELPER(msa_max_a_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2628,7 +2642,7 @@ void helper_msa_max_a_b(CPUMIPSState *env, pwd->b[15] =3D msa_max_a_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_max_a_h(CPUMIPSState *env, +void HELPER(msa_max_a_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2645,7 +2659,7 @@ void helper_msa_max_a_h(CPUMIPSState *env, pwd->h[7] =3D msa_max_a_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_max_a_w(CPUMIPSState *env, +void HELPER(msa_max_a_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2658,7 +2672,7 @@ void helper_msa_max_a_w(CPUMIPSState *env, pwd->w[3] =3D msa_max_a_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_max_a_d(CPUMIPSState *env, +void HELPER(msa_max_a_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2675,7 +2689,7 @@ static inline int64_t msa_max_s_df(uint32_t df, int64= _t arg1, int64_t arg2) return arg1 > arg2 ? arg1 : arg2; } =20 -void helper_msa_max_s_b(CPUMIPSState *env, +void HELPER(msa_max_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2700,7 +2714,7 @@ void helper_msa_max_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_max_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_max_s_h(CPUMIPSState *env, +void HELPER(msa_max_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2717,7 +2731,7 @@ void helper_msa_max_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_max_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_max_s_w(CPUMIPSState *env, +void HELPER(msa_max_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2730,7 +2744,7 @@ void helper_msa_max_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_max_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_max_s_d(CPUMIPSState *env, +void HELPER(msa_max_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2749,7 +2763,7 @@ static inline int64_t msa_max_u_df(uint32_t df, int64= _t arg1, int64_t arg2) return u_arg1 > u_arg2 ? arg1 : arg2; } =20 -void helper_msa_max_u_b(CPUMIPSState *env, +void HELPER(msa_max_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2774,7 +2788,7 @@ void helper_msa_max_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_max_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_max_u_h(CPUMIPSState *env, +void HELPER(msa_max_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2791,7 +2805,7 @@ void helper_msa_max_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_max_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_max_u_w(CPUMIPSState *env, +void HELPER(msa_max_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2804,7 +2818,7 @@ void helper_msa_max_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_max_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_max_u_d(CPUMIPSState *env, +void HELPER(msa_max_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2823,7 +2837,7 @@ static inline int64_t msa_min_a_df(uint32_t df, int64= _t arg1, int64_t arg2) return abs_arg1 < abs_arg2 ? arg1 : arg2; } =20 -void helper_msa_min_a_b(CPUMIPSState *env, +void HELPER(msa_min_a_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2848,7 +2862,7 @@ void helper_msa_min_a_b(CPUMIPSState *env, pwd->b[15] =3D msa_min_a_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_min_a_h(CPUMIPSState *env, +void HELPER(msa_min_a_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2865,7 +2879,7 @@ void helper_msa_min_a_h(CPUMIPSState *env, pwd->h[7] =3D msa_min_a_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_min_a_w(CPUMIPSState *env, +void HELPER(msa_min_a_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2878,7 +2892,7 @@ void helper_msa_min_a_w(CPUMIPSState *env, pwd->w[3] =3D msa_min_a_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_min_a_d(CPUMIPSState *env, +void HELPER(msa_min_a_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2895,7 +2909,7 @@ static inline int64_t msa_min_s_df(uint32_t df, int64= _t arg1, int64_t arg2) return arg1 < arg2 ? arg1 : arg2; } =20 -void helper_msa_min_s_b(CPUMIPSState *env, +void HELPER(msa_min_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2920,7 +2934,7 @@ void helper_msa_min_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_min_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_min_s_h(CPUMIPSState *env, +void HELPER(msa_min_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2937,7 +2951,7 @@ void helper_msa_min_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_min_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_min_s_w(CPUMIPSState *env, +void HELPER(msa_min_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2950,7 +2964,7 @@ void helper_msa_min_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_min_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_min_s_d(CPUMIPSState *env, +void HELPER(msa_min_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2969,7 +2983,7 @@ static inline int64_t msa_min_u_df(uint32_t df, int64= _t arg1, int64_t arg2) return u_arg1 < u_arg2 ? arg1 : arg2; } =20 -void helper_msa_min_u_b(CPUMIPSState *env, +void HELPER(msa_min_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -2994,7 +3008,7 @@ void helper_msa_min_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_min_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_min_u_h(CPUMIPSState *env, +void HELPER(msa_min_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3011,7 +3025,7 @@ void helper_msa_min_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_min_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_min_u_w(CPUMIPSState *env, +void HELPER(msa_min_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3024,7 +3038,7 @@ void helper_msa_min_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_min_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_min_u_d(CPUMIPSState *env, +void HELPER(msa_min_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3060,7 +3074,7 @@ static inline int64_t msa_mod_s_df(uint32_t df, int64= _t arg1, int64_t arg2) return arg2 ? arg1 % arg2 : arg1; } =20 -void helper_msa_mod_s_b(CPUMIPSState *env, +void HELPER(msa_mod_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3085,7 +3099,7 @@ void helper_msa_mod_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_mod_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_mod_s_h(CPUMIPSState *env, +void HELPER(msa_mod_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3102,7 +3116,7 @@ void helper_msa_mod_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_mod_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_mod_s_w(CPUMIPSState *env, +void HELPER(msa_mod_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3115,7 +3129,7 @@ void helper_msa_mod_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_mod_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_mod_s_d(CPUMIPSState *env, +void HELPER(msa_mod_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3133,7 +3147,7 @@ static inline int64_t msa_mod_u_df(uint32_t df, int64= _t arg1, int64_t arg2) return u_arg2 ? u_arg1 % u_arg2 : u_arg1; } =20 -void helper_msa_mod_u_b(CPUMIPSState *env, +void HELPER(msa_mod_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3158,7 +3172,7 @@ void helper_msa_mod_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_mod_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_mod_u_h(CPUMIPSState *env, +void HELPER(msa_mod_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3175,7 +3189,7 @@ void helper_msa_mod_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_mod_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_mod_u_w(CPUMIPSState *env, +void HELPER(msa_mod_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3188,7 +3202,7 @@ void helper_msa_mod_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_mod_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_mod_u_d(CPUMIPSState *env, +void HELPER(msa_mod_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3226,7 +3240,7 @@ static inline int64_t msa_maddv_df(uint32_t df, int64= _t dest, int64_t arg1, return dest + arg1 * arg2; } =20 -void helper_msa_maddv_b(CPUMIPSState *env, +void HELPER(msa_maddv_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3251,7 +3265,7 @@ void helper_msa_maddv_b(CPUMIPSState *env, pwd->b[15] =3D msa_maddv_df(DF_BYTE, pwd->b[15], pws->b[15], pwt->b[15= ]); } =20 -void helper_msa_maddv_h(CPUMIPSState *env, +void HELPER(msa_maddv_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3268,7 +3282,7 @@ void helper_msa_maddv_h(CPUMIPSState *env, pwd->h[7] =3D msa_maddv_df(DF_HALF, pwd->h[7], pws->h[7], pwt->h[7]= ); } =20 -void helper_msa_maddv_w(CPUMIPSState *env, +void HELPER(msa_maddv_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3281,7 +3295,7 @@ void helper_msa_maddv_w(CPUMIPSState *env, pwd->w[3] =3D msa_maddv_df(DF_WORD, pwd->w[3], pws->w[3], pwt->w[3]= ); } =20 -void helper_msa_maddv_d(CPUMIPSState *env, +void HELPER(msa_maddv_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3298,7 +3312,7 @@ static inline int64_t msa_msubv_df(uint32_t df, int64= _t dest, int64_t arg1, return dest - arg1 * arg2; } =20 -void helper_msa_msubv_b(CPUMIPSState *env, +void HELPER(msa_msubv_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3323,7 +3337,7 @@ void helper_msa_msubv_b(CPUMIPSState *env, pwd->b[15] =3D msa_msubv_df(DF_BYTE, pwd->b[15], pws->b[15], pwt->b[15= ]); } =20 -void helper_msa_msubv_h(CPUMIPSState *env, +void HELPER(msa_msubv_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3340,7 +3354,7 @@ void helper_msa_msubv_h(CPUMIPSState *env, pwd->h[7] =3D msa_msubv_df(DF_HALF, pwd->h[7], pws->h[7], pwt->h[7]= ); } =20 -void helper_msa_msubv_w(CPUMIPSState *env, +void HELPER(msa_msubv_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3353,7 +3367,7 @@ void helper_msa_msubv_w(CPUMIPSState *env, pwd->w[3] =3D msa_msubv_df(DF_WORD, pwd->w[3], pws->w[3], pwt->w[3]= ); } =20 -void helper_msa_msubv_d(CPUMIPSState *env, +void HELPER(msa_msubv_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3370,7 +3384,7 @@ static inline int64_t msa_mulv_df(uint32_t df, int64_= t arg1, int64_t arg2) return arg1 * arg2; } =20 -void helper_msa_mulv_b(CPUMIPSState *env, +void HELPER(msa_mulv_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3395,7 +3409,7 @@ void helper_msa_mulv_b(CPUMIPSState *env, pwd->b[15] =3D msa_mulv_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_mulv_h(CPUMIPSState *env, +void HELPER(msa_mulv_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3412,7 +3426,7 @@ void helper_msa_mulv_h(CPUMIPSState *env, pwd->h[7] =3D msa_mulv_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_mulv_w(CPUMIPSState *env, +void HELPER(msa_mulv_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3425,7 +3439,7 @@ void helper_msa_mulv_w(CPUMIPSState *env, pwd->w[3] =3D msa_mulv_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_mulv_d(CPUMIPSState *env, +void HELPER(msa_mulv_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3487,7 +3501,7 @@ static inline int64_t msa_asub_s_df(uint32_t df, int6= 4_t arg1, int64_t arg2) (uint64_t)(arg2 - arg1) : (uint64_t)(arg1 - arg2); } =20 -void helper_msa_asub_s_b(CPUMIPSState *env, +void HELPER(msa_asub_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3512,7 +3526,7 @@ void helper_msa_asub_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_asub_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_asub_s_h(CPUMIPSState *env, +void HELPER(msa_asub_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3529,7 +3543,7 @@ void helper_msa_asub_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_asub_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_asub_s_w(CPUMIPSState *env, +void HELPER(msa_asub_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3542,7 +3556,7 @@ void helper_msa_asub_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_asub_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_asub_s_d(CPUMIPSState *env, +void HELPER(msa_asub_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3563,7 +3577,7 @@ static inline uint64_t msa_asub_u_df(uint32_t df, uin= t64_t arg1, uint64_t arg2) (uint64_t)(u_arg2 - u_arg1) : (uint64_t)(u_arg1 - u_arg2); } =20 -void helper_msa_asub_u_b(CPUMIPSState *env, +void HELPER(msa_asub_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3588,7 +3602,7 @@ void helper_msa_asub_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_asub_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_asub_u_h(CPUMIPSState *env, +void HELPER(msa_asub_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3605,7 +3619,7 @@ void helper_msa_asub_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_asub_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_asub_u_w(CPUMIPSState *env, +void HELPER(msa_asub_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3618,7 +3632,7 @@ void helper_msa_asub_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_asub_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_asub_u_d(CPUMIPSState *env, +void HELPER(msa_asub_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3635,7 +3649,7 @@ static inline int64_t msa_hsub_s_df(uint32_t df, int6= 4_t arg1, int64_t arg2) return SIGNED_ODD(arg1, df) - SIGNED_EVEN(arg2, df); } =20 -void helper_msa_hsub_s_h(CPUMIPSState *env, +void HELPER(msa_hsub_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3652,7 +3666,7 @@ void helper_msa_hsub_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_hsub_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_hsub_s_w(CPUMIPSState *env, +void HELPER(msa_hsub_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3665,7 +3679,7 @@ void helper_msa_hsub_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_hsub_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_hsub_s_d(CPUMIPSState *env, +void HELPER(msa_hsub_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3682,7 +3696,7 @@ static inline int64_t msa_hsub_u_df(uint32_t df, int6= 4_t arg1, int64_t arg2) return UNSIGNED_ODD(arg1, df) - UNSIGNED_EVEN(arg2, df); } =20 -void helper_msa_hsub_u_h(CPUMIPSState *env, +void HELPER(msa_hsub_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3699,7 +3713,7 @@ void helper_msa_hsub_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_hsub_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_hsub_u_w(CPUMIPSState *env, +void HELPER(msa_hsub_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3712,7 +3726,7 @@ void helper_msa_hsub_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_hsub_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_hsub_u_d(CPUMIPSState *env, +void HELPER(msa_hsub_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3735,7 +3749,7 @@ static inline int64_t msa_subs_s_df(uint32_t df, int6= 4_t arg1, int64_t arg2) } } =20 -void helper_msa_subs_s_b(CPUMIPSState *env, +void HELPER(msa_subs_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3760,7 +3774,7 @@ void helper_msa_subs_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_subs_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_subs_s_h(CPUMIPSState *env, +void HELPER(msa_subs_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3777,7 +3791,7 @@ void helper_msa_subs_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_subs_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_subs_s_w(CPUMIPSState *env, +void HELPER(msa_subs_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3790,7 +3804,7 @@ void helper_msa_subs_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_subs_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_subs_s_d(CPUMIPSState *env, +void HELPER(msa_subs_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3809,7 +3823,7 @@ static inline int64_t msa_subs_u_df(uint32_t df, int6= 4_t arg1, int64_t arg2) return (u_arg1 > u_arg2) ? u_arg1 - u_arg2 : 0; } =20 -void helper_msa_subs_u_b(CPUMIPSState *env, +void HELPER(msa_subs_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3834,7 +3848,7 @@ void helper_msa_subs_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_subs_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_subs_u_h(CPUMIPSState *env, +void HELPER(msa_subs_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3851,7 +3865,7 @@ void helper_msa_subs_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_subs_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_subs_u_w(CPUMIPSState *env, +void HELPER(msa_subs_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3864,7 +3878,7 @@ void helper_msa_subs_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_subs_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_subs_u_d(CPUMIPSState *env, +void HELPER(msa_subs_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3893,7 +3907,7 @@ static inline int64_t msa_subsus_u_df(uint32_t df, in= t64_t arg1, int64_t arg2) } } =20 -void helper_msa_subsus_u_b(CPUMIPSState *env, +void HELPER(msa_subsus_u_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3918,7 +3932,7 @@ void helper_msa_subsus_u_b(CPUMIPSState *env, pwd->b[15] =3D msa_subsus_u_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_subsus_u_h(CPUMIPSState *env, +void HELPER(msa_subsus_u_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3935,7 +3949,7 @@ void helper_msa_subsus_u_h(CPUMIPSState *env, pwd->h[7] =3D msa_subsus_u_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_subsus_u_w(CPUMIPSState *env, +void HELPER(msa_subsus_u_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3948,7 +3962,7 @@ void helper_msa_subsus_u_w(CPUMIPSState *env, pwd->w[3] =3D msa_subsus_u_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_subsus_u_d(CPUMIPSState *env, +void HELPER(msa_subsus_u_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -3977,7 +3991,7 @@ static inline int64_t msa_subsuu_s_df(uint32_t df, in= t64_t arg1, int64_t arg2) } } =20 -void helper_msa_subsuu_s_b(CPUMIPSState *env, +void HELPER(msa_subsuu_s_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4002,7 +4016,7 @@ void helper_msa_subsuu_s_b(CPUMIPSState *env, pwd->b[15] =3D msa_subsuu_s_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_subsuu_s_h(CPUMIPSState *env, +void HELPER(msa_subsuu_s_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4019,7 +4033,7 @@ void helper_msa_subsuu_s_h(CPUMIPSState *env, pwd->h[7] =3D msa_subsuu_s_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_subsuu_s_w(CPUMIPSState *env, +void HELPER(msa_subsuu_s_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4032,7 +4046,7 @@ void helper_msa_subsuu_s_w(CPUMIPSState *env, pwd->w[3] =3D msa_subsuu_s_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_subsuu_s_d(CPUMIPSState *env, +void HELPER(msa_subsuu_s_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4049,7 +4063,7 @@ static inline int64_t msa_subv_df(uint32_t df, int64_= t arg1, int64_t arg2) return arg1 - arg2; } =20 -void helper_msa_subv_b(CPUMIPSState *env, +void HELPER(msa_subv_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4074,7 +4088,7 @@ void helper_msa_subv_b(CPUMIPSState *env, pwd->b[15] =3D msa_subv_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_subv_h(CPUMIPSState *env, +void HELPER(msa_subv_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4091,7 +4105,7 @@ void helper_msa_subv_h(CPUMIPSState *env, pwd->h[7] =3D msa_subv_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_subv_w(CPUMIPSState *env, +void HELPER(msa_subv_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4104,7 +4118,7 @@ void helper_msa_subv_w(CPUMIPSState *env, pwd->w[3] =3D msa_subv_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_subv_d(CPUMIPSState *env, +void HELPER(msa_subv_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4141,7 +4155,7 @@ void helper_msa_subv_d(CPUMIPSState *env, */ =20 =20 -void helper_msa_ilvev_b(CPUMIPSState *env, +void HELPER(msa_ilvev_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4185,7 +4199,7 @@ void helper_msa_ilvev_b(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvev_h(CPUMIPSState *env, +void HELPER(msa_ilvev_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4213,7 +4227,7 @@ void helper_msa_ilvev_h(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvev_w(CPUMIPSState *env, +void HELPER(msa_ilvev_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4233,7 +4247,7 @@ void helper_msa_ilvev_w(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvev_d(CPUMIPSState *env, +void HELPER(msa_ilvev_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4245,7 +4259,7 @@ void helper_msa_ilvev_d(CPUMIPSState *env, } =20 =20 -void helper_msa_ilvod_b(CPUMIPSState *env, +void HELPER(msa_ilvod_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4289,7 +4303,7 @@ void helper_msa_ilvod_b(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvod_h(CPUMIPSState *env, +void HELPER(msa_ilvod_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4317,7 +4331,7 @@ void helper_msa_ilvod_h(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvod_w(CPUMIPSState *env, +void HELPER(msa_ilvod_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4337,7 +4351,7 @@ void helper_msa_ilvod_w(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvod_d(CPUMIPSState *env, +void HELPER(msa_ilvod_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4349,7 +4363,7 @@ void helper_msa_ilvod_d(CPUMIPSState *env, } =20 =20 -void helper_msa_ilvl_b(CPUMIPSState *env, +void HELPER(msa_ilvl_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4393,7 +4407,7 @@ void helper_msa_ilvl_b(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvl_h(CPUMIPSState *env, +void HELPER(msa_ilvl_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4421,7 +4435,7 @@ void helper_msa_ilvl_h(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvl_w(CPUMIPSState *env, +void HELPER(msa_ilvl_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4441,7 +4455,7 @@ void helper_msa_ilvl_w(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvl_d(CPUMIPSState *env, +void HELPER(msa_ilvl_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4453,7 +4467,7 @@ void helper_msa_ilvl_d(CPUMIPSState *env, } =20 =20 -void helper_msa_ilvr_b(CPUMIPSState *env, +void HELPER(msa_ilvr_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4497,7 +4511,7 @@ void helper_msa_ilvr_b(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvr_h(CPUMIPSState *env, +void HELPER(msa_ilvr_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4525,7 +4539,7 @@ void helper_msa_ilvr_h(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvr_w(CPUMIPSState *env, +void HELPER(msa_ilvr_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4545,7 +4559,7 @@ void helper_msa_ilvr_w(CPUMIPSState *env, #endif } =20 -void helper_msa_ilvr_d(CPUMIPSState *env, +void HELPER(msa_ilvr_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4570,7 +4584,7 @@ void helper_msa_ilvr_d(CPUMIPSState *env, */ =20 =20 -void helper_msa_and_v(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) +void HELPER(msa_and_v)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -4580,7 +4594,7 @@ void helper_msa_and_v(CPUMIPSState *env, uint32_t wd,= uint32_t ws, uint32_t wt) pwd->d[1] =3D pws->d[1] & pwt->d[1]; } =20 -void helper_msa_nor_v(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) +void HELPER(msa_nor_v)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -4590,7 +4604,7 @@ void helper_msa_nor_v(CPUMIPSState *env, uint32_t wd,= uint32_t ws, uint32_t wt) pwd->d[1] =3D ~(pws->d[1] | pwt->d[1]); } =20 -void helper_msa_or_v(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t= wt) +void HELPER(msa_or_v)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -4600,7 +4614,7 @@ void helper_msa_or_v(CPUMIPSState *env, uint32_t wd, = uint32_t ws, uint32_t wt) pwd->d[1] =3D pws->d[1] | pwt->d[1]; } =20 -void helper_msa_xor_v(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_= t wt) +void HELPER(msa_xor_v)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32= _t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -4626,7 +4640,7 @@ static inline void msa_move_v(wr_t *pwd, wr_t *pws) pwd->d[1] =3D pws->d[1]; } =20 -void helper_msa_move_v(CPUMIPSState *env, uint32_t wd, uint32_t ws) +void HELPER(msa_move_v)(CPUMIPSState *env, uint32_t wd, uint32_t ws) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); @@ -4656,7 +4670,7 @@ void helper_msa_move_v(CPUMIPSState *env, uint32_t wd= , uint32_t ws) */ =20 =20 -void helper_msa_pckev_b(CPUMIPSState *env, +void HELPER(msa_pckev_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4700,7 +4714,7 @@ void helper_msa_pckev_b(CPUMIPSState *env, #endif } =20 -void helper_msa_pckev_h(CPUMIPSState *env, +void HELPER(msa_pckev_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4728,7 +4742,7 @@ void helper_msa_pckev_h(CPUMIPSState *env, #endif } =20 -void helper_msa_pckev_w(CPUMIPSState *env, +void HELPER(msa_pckev_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4748,7 +4762,7 @@ void helper_msa_pckev_w(CPUMIPSState *env, #endif } =20 -void helper_msa_pckev_d(CPUMIPSState *env, +void HELPER(msa_pckev_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4760,7 +4774,7 @@ void helper_msa_pckev_d(CPUMIPSState *env, } =20 =20 -void helper_msa_pckod_b(CPUMIPSState *env, +void HELPER(msa_pckod_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4805,7 +4819,7 @@ void helper_msa_pckod_b(CPUMIPSState *env, =20 } =20 -void helper_msa_pckod_h(CPUMIPSState *env, +void HELPER(msa_pckod_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4833,7 +4847,7 @@ void helper_msa_pckod_h(CPUMIPSState *env, #endif } =20 -void helper_msa_pckod_w(CPUMIPSState *env, +void HELPER(msa_pckod_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4853,7 +4867,7 @@ void helper_msa_pckod_w(CPUMIPSState *env, #endif } =20 -void helper_msa_pckod_d(CPUMIPSState *env, +void HELPER(msa_pckod_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4900,7 +4914,7 @@ static inline int64_t msa_sll_df(uint32_t df, int64_t= arg1, int64_t arg2) return arg1 << b_arg2; } =20 -void helper_msa_sll_b(CPUMIPSState *env, +void HELPER(msa_sll_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4925,7 +4939,7 @@ void helper_msa_sll_b(CPUMIPSState *env, pwd->b[15] =3D msa_sll_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_sll_h(CPUMIPSState *env, +void HELPER(msa_sll_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4942,7 +4956,7 @@ void helper_msa_sll_h(CPUMIPSState *env, pwd->h[7] =3D msa_sll_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_sll_w(CPUMIPSState *env, +void HELPER(msa_sll_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4955,7 +4969,7 @@ void helper_msa_sll_w(CPUMIPSState *env, pwd->w[3] =3D msa_sll_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_sll_d(CPUMIPSState *env, +void HELPER(msa_sll_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4973,7 +4987,7 @@ static inline int64_t msa_sra_df(uint32_t df, int64_t= arg1, int64_t arg2) return arg1 >> b_arg2; } =20 -void helper_msa_sra_b(CPUMIPSState *env, +void HELPER(msa_sra_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -4998,7 +5012,7 @@ void helper_msa_sra_b(CPUMIPSState *env, pwd->b[15] =3D msa_sra_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_sra_h(CPUMIPSState *env, +void HELPER(msa_sra_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5015,7 +5029,7 @@ void helper_msa_sra_h(CPUMIPSState *env, pwd->h[7] =3D msa_sra_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_sra_w(CPUMIPSState *env, +void HELPER(msa_sra_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5028,7 +5042,7 @@ void helper_msa_sra_w(CPUMIPSState *env, pwd->w[3] =3D msa_sra_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_sra_d(CPUMIPSState *env, +void HELPER(msa_sra_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5051,7 +5065,7 @@ static inline int64_t msa_srar_df(uint32_t df, int64_= t arg1, int64_t arg2) } } =20 -void helper_msa_srar_b(CPUMIPSState *env, +void HELPER(msa_srar_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5076,7 +5090,7 @@ void helper_msa_srar_b(CPUMIPSState *env, pwd->b[15] =3D msa_srar_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_srar_h(CPUMIPSState *env, +void HELPER(msa_srar_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5093,7 +5107,7 @@ void helper_msa_srar_h(CPUMIPSState *env, pwd->h[7] =3D msa_srar_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_srar_w(CPUMIPSState *env, +void HELPER(msa_srar_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5106,7 +5120,7 @@ void helper_msa_srar_w(CPUMIPSState *env, pwd->w[3] =3D msa_srar_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_srar_d(CPUMIPSState *env, +void HELPER(msa_srar_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5125,7 +5139,7 @@ static inline int64_t msa_srl_df(uint32_t df, int64_t= arg1, int64_t arg2) return u_arg1 >> b_arg2; } =20 -void helper_msa_srl_b(CPUMIPSState *env, +void HELPER(msa_srl_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5150,7 +5164,7 @@ void helper_msa_srl_b(CPUMIPSState *env, pwd->b[15] =3D msa_srl_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_srl_h(CPUMIPSState *env, +void HELPER(msa_srl_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5167,7 +5181,7 @@ void helper_msa_srl_h(CPUMIPSState *env, pwd->h[7] =3D msa_srl_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_srl_w(CPUMIPSState *env, +void HELPER(msa_srl_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5180,7 +5194,7 @@ void helper_msa_srl_w(CPUMIPSState *env, pwd->w[3] =3D msa_srl_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_srl_d(CPUMIPSState *env, +void HELPER(msa_srl_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5204,7 +5218,7 @@ static inline int64_t msa_srlr_df(uint32_t df, int64_= t arg1, int64_t arg2) } } =20 -void helper_msa_srlr_b(CPUMIPSState *env, +void HELPER(msa_srlr_b)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5229,7 +5243,7 @@ void helper_msa_srlr_b(CPUMIPSState *env, pwd->b[15] =3D msa_srlr_df(DF_BYTE, pws->b[15], pwt->b[15]); } =20 -void helper_msa_srlr_h(CPUMIPSState *env, +void HELPER(msa_srlr_h)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5246,7 +5260,7 @@ void helper_msa_srlr_h(CPUMIPSState *env, pwd->h[7] =3D msa_srlr_df(DF_HALF, pws->h[7], pwt->h[7]); } =20 -void helper_msa_srlr_w(CPUMIPSState *env, +void HELPER(msa_srlr_w)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5259,7 +5273,7 @@ void helper_msa_srlr_w(CPUMIPSState *env, pwd->w[3] =3D msa_srlr_df(DF_WORD, pws->w[3], pwt->w[3]); } =20 -void helper_msa_srlr_d(CPUMIPSState *env, +void HELPER(msa_srlr_d)(CPUMIPSState *env, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5272,7 +5286,7 @@ void helper_msa_srlr_d(CPUMIPSState *env, =20 =20 #define MSA_FN_IMM8(FUNC, DEST, OPERATION) \ -void helper_msa_ ## FUNC(CPUMIPSState *env, uint32_t wd, uint32_t ws, \ +void HELPER(msa_ ## FUNC)(CPUMIPSState *env, uint32_t wd, uint32_t ws, \ uint32_t i8) \ { \ wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); \ @@ -5310,7 +5324,7 @@ MSA_FN_IMM8(bseli_b, pwd->b[i], =20 #define SHF_POS(i, imm) (((i) & 0xfc) + (((imm) >> (2 * ((i) & 0x03))) & 0= x03)) =20 -void helper_msa_shf_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_shf_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t imm) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5341,7 +5355,7 @@ void helper_msa_shf_df(CPUMIPSState *env, uint32_t df= , uint32_t wd, } =20 #define MSA_BINOP_IMM_DF(helper, func) \ -void helper_msa_ ## helper ## _df(CPUMIPSState *env, uint32_t df, \ +void HELPER(msa_ ## helper ## _df)(CPUMIPSState *env, uint32_t df, \ uint32_t wd, uint32_t ws, int32_t u5) \ { \ wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); \ @@ -5387,7 +5401,7 @@ MSA_BINOP_IMM_DF(mini_s, min_s) MSA_BINOP_IMM_DF(mini_u, min_u) #undef MSA_BINOP_IMM_DF =20 -void helper_msa_ldi_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ldi_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, int32_t s10) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5434,8 +5448,8 @@ static inline int64_t msa_sat_u_df(uint32_t df, int64= _t arg, uint32_t m) } =20 #define MSA_BINOP_IMMU_DF(helper, func) \ -void helper_msa_ ## helper ## _df(CPUMIPSState *env, uint32_t df, uint32_t= wd, \ - uint32_t ws, uint32_t u5) \ +void HELPER(msa_ ## helper ## _df)(CPUMIPSState *env, uint32_t df, \ + uint32_t wd, uint32_t ws, uint32_t u5) \ { \ wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); \ wr_t *pws =3D &(env->active_fpu.fpr[ws].wr); \ @@ -5480,7 +5494,7 @@ MSA_BINOP_IMMU_DF(srlri, srlr) #undef MSA_BINOP_IMMU_DF =20 #define MSA_TEROP_IMMU_DF(helper, func) \ -void helper_msa_ ## helper ## _df(CPUMIPSState *env, uint32_t df, \ +void HELPER(msa_ ## helper ## _df)(CPUMIPSState *env, uint32_t df, \ uint32_t wd, uint32_t ws, uint32_t u5) \ { \ wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); \ @@ -5587,7 +5601,7 @@ static inline int64_t msa_mulr_q_df(uint32_t df, int6= 4_t arg1, int64_t arg2) } =20 #define MSA_BINOP_DF(func) \ -void helper_msa_ ## func ## _df(CPUMIPSState *env, uint32_t df, \ +void HELPER(msa_ ## func ## _df)(CPUMIPSState *env, uint32_t df, \ uint32_t wd, uint32_t ws, uint32_t wt) \ { \ wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); \ @@ -5642,7 +5656,7 @@ MSA_BINOP_DF(mul_q) MSA_BINOP_DF(mulr_q) #undef MSA_BINOP_DF =20 -void helper_msa_sld_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_sld_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t rt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5710,7 +5724,7 @@ static inline int64_t msa_msubr_q_df(uint32_t df, int= 64_t dest, int64_t arg1, } =20 #define MSA_TEROP_DF(func) \ -void helper_msa_ ## func ## _df(CPUMIPSState *env, uint32_t df, uint32_t w= d, \ +void HELPER(msa_ ## func ## _df)(CPUMIPSState *env, uint32_t df, uint32_t = wd, \ uint32_t ws, uint32_t wt) = \ { = \ wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); = \ @@ -5817,7 +5831,7 @@ static inline void msa_splat_df(uint32_t df, wr_t *pw= d, } } =20 -void helper_msa_splat_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_splat_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t rt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5849,7 +5863,7 @@ void helper_msa_splat_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, } while (0) =20 #define MSA_FN_DF(FUNC) \ -void helper_msa_##FUNC(CPUMIPSState *env, uint32_t df, uint32_t wd, \ +void HELPER(msa_##FUNC)(CPUMIPSState *env, uint32_t df, uint32_t wd, \ uint32_t ws, uint32_t wt) \ { \ wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); \ @@ -5906,7 +5920,7 @@ MSA_FN_DF(vshf_df) #undef MSA_FN_DF =20 =20 -void helper_msa_sldi_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_sldi_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t n) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5915,7 +5929,7 @@ void helper_msa_sldi_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_sld_df(df, pwd, pws, n); } =20 -void helper_msa_splati_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_splati_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t n) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -5924,7 +5938,7 @@ void helper_msa_splati_df(CPUMIPSState *env, uint32_t= df, uint32_t wd, msa_splat_df(df, pwd, pws, n); } =20 -void helper_msa_copy_s_b(CPUMIPSState *env, uint32_t rd, +void HELPER(msa_copy_s_b)(CPUMIPSState *env, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D 16; @@ -5938,7 +5952,7 @@ void helper_msa_copy_s_b(CPUMIPSState *env, uint32_t = rd, env->active_tc.gpr[rd] =3D (int8_t)env->active_fpu.fpr[ws].wr.b[n]; } =20 -void helper_msa_copy_s_h(CPUMIPSState *env, uint32_t rd, +void HELPER(msa_copy_s_h)(CPUMIPSState *env, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D 8; @@ -5952,7 +5966,7 @@ void helper_msa_copy_s_h(CPUMIPSState *env, uint32_t = rd, env->active_tc.gpr[rd] =3D (int16_t)env->active_fpu.fpr[ws].wr.h[n]; } =20 -void helper_msa_copy_s_w(CPUMIPSState *env, uint32_t rd, +void HELPER(msa_copy_s_w)(CPUMIPSState *env, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D 4; @@ -5966,14 +5980,14 @@ void helper_msa_copy_s_w(CPUMIPSState *env, uint32_= t rd, env->active_tc.gpr[rd] =3D (int32_t)env->active_fpu.fpr[ws].wr.w[n]; } =20 -void helper_msa_copy_s_d(CPUMIPSState *env, uint32_t rd, +void HELPER(msa_copy_s_d)(CPUMIPSState *env, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D 2; env->active_tc.gpr[rd] =3D (int64_t)env->active_fpu.fpr[ws].wr.d[n]; } =20 -void helper_msa_copy_u_b(CPUMIPSState *env, uint32_t rd, +void HELPER(msa_copy_u_b)(CPUMIPSState *env, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D 16; @@ -5987,7 +6001,7 @@ void helper_msa_copy_u_b(CPUMIPSState *env, uint32_t = rd, env->active_tc.gpr[rd] =3D (uint8_t)env->active_fpu.fpr[ws].wr.b[n]; } =20 -void helper_msa_copy_u_h(CPUMIPSState *env, uint32_t rd, +void HELPER(msa_copy_u_h)(CPUMIPSState *env, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D 8; @@ -6001,7 +6015,7 @@ void helper_msa_copy_u_h(CPUMIPSState *env, uint32_t = rd, env->active_tc.gpr[rd] =3D (uint16_t)env->active_fpu.fpr[ws].wr.h[n]; } =20 -void helper_msa_copy_u_w(CPUMIPSState *env, uint32_t rd, +void HELPER(msa_copy_u_w)(CPUMIPSState *env, uint32_t rd, uint32_t ws, uint32_t n) { n %=3D 4; @@ -6015,7 +6029,7 @@ void helper_msa_copy_u_w(CPUMIPSState *env, uint32_t = rd, env->active_tc.gpr[rd] =3D (uint32_t)env->active_fpu.fpr[ws].wr.w[n]; } =20 -void helper_msa_insert_b(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_insert_b)(CPUMIPSState *env, uint32_t wd, uint32_t rs_num, uint32_t n) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6031,7 +6045,7 @@ void helper_msa_insert_b(CPUMIPSState *env, uint32_t = wd, pwd->b[n] =3D (int8_t)rs; } =20 -void helper_msa_insert_h(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_insert_h)(CPUMIPSState *env, uint32_t wd, uint32_t rs_num, uint32_t n) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6047,7 +6061,7 @@ void helper_msa_insert_h(CPUMIPSState *env, uint32_t = wd, pwd->h[n] =3D (int16_t)rs; } =20 -void helper_msa_insert_w(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_insert_w)(CPUMIPSState *env, uint32_t wd, uint32_t rs_num, uint32_t n) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6063,7 +6077,7 @@ void helper_msa_insert_w(CPUMIPSState *env, uint32_t = wd, pwd->w[n] =3D (int32_t)rs; } =20 -void helper_msa_insert_d(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_insert_d)(CPUMIPSState *env, uint32_t wd, uint32_t rs_num, uint32_t n) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6072,7 +6086,7 @@ void helper_msa_insert_d(CPUMIPSState *env, uint32_t = wd, pwd->d[n] =3D (int64_t)rs; } =20 -void helper_msa_insve_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_insve_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t n) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6096,7 +6110,7 @@ void helper_msa_insve_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, } } =20 -void helper_msa_ctcmsa(CPUMIPSState *env, target_ulong elm, uint32_t cd) +void HELPER(msa_ctcmsa)(CPUMIPSState *env, target_ulong elm, uint32_t cd) { switch (cd) { case 0: @@ -6113,7 +6127,7 @@ void helper_msa_ctcmsa(CPUMIPSState *env, target_ulon= g elm, uint32_t cd) } } =20 -target_ulong helper_msa_cfcmsa(CPUMIPSState *env, uint32_t cs) +target_ulong HELPER(msa_cfcmsa)(CPUMIPSState *env, uint32_t cs) { switch (cs) { case 0: @@ -6124,7 +6138,7 @@ target_ulong helper_msa_cfcmsa(CPUMIPSState *env, uin= t32_t cs) return 0; } =20 -void helper_msa_fill_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fill_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t rs) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6867,7 +6881,7 @@ static inline void compare_ne(CPUMIPSState *env, wr_t= *pwd, wr_t *pws, msa_move_v(pwd, pwx); } =20 -void helper_msa_fcaf_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcaf_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6876,7 +6890,7 @@ void helper_msa_fcaf_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_af(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fcun_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcun_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6885,7 +6899,7 @@ void helper_msa_fcun_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_un(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fceq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fceq_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6894,7 +6908,7 @@ void helper_msa_fceq_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_eq(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fcueq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcueq_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6903,7 +6917,7 @@ void helper_msa_fcueq_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_ueq(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fclt_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fclt_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6912,7 +6926,7 @@ void helper_msa_fclt_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_lt(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fcult_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcult_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6921,7 +6935,7 @@ void helper_msa_fcult_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_ult(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fcle_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcle_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6930,7 +6944,7 @@ void helper_msa_fcle_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_le(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fcule_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcule_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6939,7 +6953,7 @@ void helper_msa_fcule_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_ule(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fsaf_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsaf_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6948,7 +6962,7 @@ void helper_msa_fsaf_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_af(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fsun_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsun_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6957,7 +6971,7 @@ void helper_msa_fsun_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_un(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fseq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fseq_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6966,7 +6980,7 @@ void helper_msa_fseq_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_eq(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fsueq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsueq_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6975,7 +6989,7 @@ void helper_msa_fsueq_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_ueq(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fslt_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fslt_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6984,7 +6998,7 @@ void helper_msa_fslt_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_lt(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fsult_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsult_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -6993,7 +7007,7 @@ void helper_msa_fsult_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_ult(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fsle_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsle_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -7002,7 +7016,7 @@ void helper_msa_fsle_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_le(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fsule_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsule_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -7011,7 +7025,7 @@ void helper_msa_fsule_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_ule(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fcor_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcor_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -7020,7 +7034,7 @@ void helper_msa_fcor_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_or(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fcune_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcune_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -7029,7 +7043,7 @@ void helper_msa_fcune_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_une(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fcne_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fcne_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -7038,7 +7052,7 @@ void helper_msa_fcne_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_ne(env, pwd, pws, pwt, df, 1, GETPC()); } =20 -void helper_msa_fsor_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsor_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -7047,7 +7061,7 @@ void helper_msa_fsor_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, compare_or(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fsune_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsune_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -7056,7 +7070,7 @@ void helper_msa_fsune_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, compare_une(env, pwd, pws, pwt, df, 0, GETPC()); } =20 -void helper_msa_fsne_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsne_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -7086,7 +7100,7 @@ void helper_msa_fsne_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, } = \ } while (0) =20 -void helper_msa_fadd_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fadd_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7116,7 +7130,7 @@ void helper_msa_fadd_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fsub_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsub_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7146,7 +7160,7 @@ void helper_msa_fsub_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fmul_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fmul_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7177,7 +7191,7 @@ void helper_msa_fmul_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fdiv_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fdiv_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7222,7 +7236,7 @@ void helper_msa_fdiv_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, } = \ } while (0) =20 -void helper_msa_fmadd_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fmadd_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7255,7 +7269,7 @@ void helper_msa_fmadd_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fmsub_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fmsub_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7290,7 +7304,7 @@ void helper_msa_fmsub_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fexp2_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fexp2_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7341,7 +7355,7 @@ void helper_msa_fexp2_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, } = \ } while (0) =20 -void helper_msa_fexdo_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fexdo_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7394,7 +7408,7 @@ void helper_msa_fexdo_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, } = \ } while (0) =20 -void helper_msa_ftq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ftq_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { wr_t wx, *pwx =3D &wx; @@ -7463,7 +7477,7 @@ void helper_msa_ftq_df(CPUMIPSState *env, uint32_t df= , uint32_t wd, X =3D (as =3D=3D at || xd =3D=3D float## BITS ##_abs(xs)) ? xs : x= t; \ } while (0) =20 -void helper_msa_fmin_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fmin_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { float_status *status =3D &env->active_tc.msa_fp_status; @@ -7537,7 +7551,7 @@ void helper_msa_fmin_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fmin_a_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fmin_a_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { float_status *status =3D &env->active_tc.msa_fp_status; @@ -7565,7 +7579,7 @@ void helper_msa_fmin_a_df(CPUMIPSState *env, uint32_t= df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fmax_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fmax_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { float_status *status =3D &env->active_tc.msa_fp_status; @@ -7639,7 +7653,7 @@ void helper_msa_fmax_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fmax_a_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fmax_a_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws, uint32_t wt) { float_status *status =3D &env->active_tc.msa_fp_status; @@ -7667,7 +7681,7 @@ void helper_msa_fmax_a_df(CPUMIPSState *env, uint32_t= df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fclass_df(CPUMIPSState *env, uint32_t df, +void HELPER(msa_fclass_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { float_status *status =3D &env->active_tc.msa_fp_status; @@ -7703,7 +7717,7 @@ void helper_msa_fclass_df(CPUMIPSState *env, uint32_t= df, } = \ } while (0) =20 -void helper_msa_ftrunc_s_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ftrunc_s_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -7733,7 +7747,7 @@ void helper_msa_ftrunc_s_df(CPUMIPSState *env, uint32= _t df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_ftrunc_u_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ftrunc_u_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -7763,7 +7777,7 @@ void helper_msa_ftrunc_u_df(CPUMIPSState *env, uint32= _t df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fsqrt_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fsqrt_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -7810,7 +7824,7 @@ void helper_msa_fsqrt_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, } = \ } while (0) =20 -void helper_msa_frsqrt_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_frsqrt_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -7842,7 +7856,7 @@ void helper_msa_frsqrt_df(CPUMIPSState *env, uint32_t= df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_frcp_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_frcp_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -7872,7 +7886,7 @@ void helper_msa_frcp_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_frint_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_frint_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -7926,7 +7940,7 @@ void helper_msa_frint_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, } = \ } while (0) =20 -void helper_msa_flog2_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_flog2_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -7956,7 +7970,7 @@ void helper_msa_flog2_df(CPUMIPSState *env, uint32_t = df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fexupl_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fexupl_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -7992,7 +8006,7 @@ void helper_msa_fexupl_df(CPUMIPSState *env, uint32_t= df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_fexupr_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_fexupr_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -8028,7 +8042,7 @@ void helper_msa_fexupr_df(CPUMIPSState *env, uint32_t= df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_ffql_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ffql_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -8054,7 +8068,7 @@ void helper_msa_ffql_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_ffqr_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ffqr_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -8080,7 +8094,7 @@ void helper_msa_ffqr_df(CPUMIPSState *env, uint32_t d= f, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_ftint_s_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ftint_s_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -8110,7 +8124,7 @@ void helper_msa_ftint_s_df(CPUMIPSState *env, uint32_= t df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_ftint_u_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ftint_u_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -8146,7 +8160,7 @@ void helper_msa_ftint_u_df(CPUMIPSState *env, uint32_= t df, uint32_t wd, #define float64_from_int64 int64_to_float64 #define float64_from_uint64 uint64_to_float64 =20 -void helper_msa_ffint_s_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ffint_s_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -8176,7 +8190,7 @@ void helper_msa_ffint_s_df(CPUMIPSState *env, uint32_= t df, uint32_t wd, msa_move_v(pwd, pwx); } =20 -void helper_msa_ffint_u_df(CPUMIPSState *env, uint32_t df, uint32_t wd, +void HELPER(msa_ffint_u_df)(CPUMIPSState *env, uint32_t df, uint32_t wd, uint32_t ws) { wr_t wx, *pwx =3D &wx; @@ -8223,7 +8237,7 @@ static inline uint64_t bswap32x2(uint64_t x) return ror64(bswap64(x), 32); } =20 -void helper_msa_ld_b(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_ld_b)(CPUMIPSState *env, uint32_t wd, target_ulong addr) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -8237,7 +8251,7 @@ void helper_msa_ld_b(CPUMIPSState *env, uint32_t wd, pwd->d[1] =3D d1; } =20 -void helper_msa_ld_h(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_ld_h)(CPUMIPSState *env, uint32_t wd, target_ulong addr) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -8258,7 +8272,7 @@ void helper_msa_ld_h(CPUMIPSState *env, uint32_t wd, pwd->d[1] =3D d1; } =20 -void helper_msa_ld_w(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_ld_w)(CPUMIPSState *env, uint32_t wd, target_ulong addr) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -8279,7 +8293,7 @@ void helper_msa_ld_w(CPUMIPSState *env, uint32_t wd, pwd->d[1] =3D d1; } =20 -void helper_msa_ld_d(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_ld_d)(CPUMIPSState *env, uint32_t wd, target_ulong addr) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -8310,7 +8324,7 @@ static inline void ensure_writable_pages(CPUMIPSState= *env, } } =20 -void helper_msa_st_b(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_st_b)(CPUMIPSState *env, uint32_t wd, target_ulong addr) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -8324,7 +8338,7 @@ void helper_msa_st_b(CPUMIPSState *env, uint32_t wd, cpu_stq_le_data_ra(env, addr + 8, pwd->d[1], ra); } =20 -void helper_msa_st_h(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_st_h)(CPUMIPSState *env, uint32_t wd, target_ulong addr) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -8345,7 +8359,7 @@ void helper_msa_st_h(CPUMIPSState *env, uint32_t wd, cpu_stq_le_data_ra(env, addr + 8, d1, ra); } =20 -void helper_msa_st_w(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_st_w)(CPUMIPSState *env, uint32_t wd, target_ulong addr) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); @@ -8366,7 +8380,7 @@ void helper_msa_st_w(CPUMIPSState *env, uint32_t wd, cpu_stq_le_data_ra(env, addr + 8, d1, ra); } =20 -void helper_msa_st_d(CPUMIPSState *env, uint32_t wd, +void HELPER(msa_st_d)(CPUMIPSState *env, uint32_t wd, target_ulong addr) { wr_t *pwd =3D &(env->active_fpu.fpr[wd].wr); diff --git a/target/mips/tcg/octeon_crypto.c b/target/mips/tcg/octeon_crypt= o.c index 118397e6322..b061c91ef9c 100644 --- a/target/mips/tcg/octeon_crypto.c +++ b/target/mips/tcg/octeon_crypto.c @@ -1329,7 +1329,7 @@ static void octeon_aes_decrypt_common(MIPSOcteonCrypt= oState *crypto, bool cbc) } } =20 -void helper_octeon_cp2_mt_aes_enc_cbc1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_aes_enc_cbc1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -1337,7 +1337,7 @@ void helper_octeon_cp2_mt_aes_enc_cbc1(CPUMIPSState *= env, uint64_t value) octeon_aes_encrypt_common(crypto, true); } =20 -void helper_octeon_cp2_mt_aes_enc1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_aes_enc1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -1345,7 +1345,7 @@ void helper_octeon_cp2_mt_aes_enc1(CPUMIPSState *env,= uint64_t value) octeon_aes_encrypt_common(crypto, false); } =20 -void helper_octeon_cp2_mt_aes_dec_cbc1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_aes_dec_cbc1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -1353,7 +1353,7 @@ void helper_octeon_cp2_mt_aes_dec_cbc1(CPUMIPSState *= env, uint64_t value) octeon_aes_decrypt_common(crypto, true); } =20 -void helper_octeon_cp2_mt_aes_dec1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_aes_dec1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -1452,7 +1452,7 @@ static void octeon_sms4_crypt_common(MIPSOcteonCrypto= State *crypto, } } =20 -void helper_octeon_cp2_mt_sms4_enc_cbc1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_sms4_enc_cbc1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -1460,7 +1460,7 @@ void helper_octeon_cp2_mt_sms4_enc_cbc1(CPUMIPSState = *env, uint64_t value) octeon_sms4_crypt_common(crypto, true, true); } =20 -void helper_octeon_cp2_mt_sms4_enc1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_sms4_enc1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -1468,7 +1468,7 @@ void helper_octeon_cp2_mt_sms4_enc1(CPUMIPSState *env= , uint64_t value) octeon_sms4_crypt_common(crypto, true, false); } =20 -void helper_octeon_cp2_mt_sms4_dec_cbc1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_sms4_dec_cbc1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -1476,7 +1476,7 @@ void helper_octeon_cp2_mt_sms4_dec_cbc1(CPUMIPSState = *env, uint64_t value) octeon_sms4_crypt_common(crypto, false, true); } =20 -void helper_octeon_cp2_mt_sms4_dec1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_sms4_dec1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -1912,32 +1912,32 @@ static void octeon_kasumi_crypt_common(MIPSOcteonCr= yptoState *crypto, crypto->des3_result =3D block; } =20 -void helper_octeon_cp2_mt_des3_enc_cbc(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_des3_enc_cbc)(CPUMIPSState *env, uint64_t value) { octeon_3des_crypt_common(&env->octeon_crypto, value, true, true); } =20 -void helper_octeon_cp2_mt_kas_enc_cbc(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_kas_enc_cbc)(CPUMIPSState *env, uint64_t value) { octeon_kasumi_crypt_common(&env->octeon_crypto, value, true); } =20 -void helper_octeon_cp2_mt_des3_enc(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_des3_enc)(CPUMIPSState *env, uint64_t value) { octeon_3des_crypt_common(&env->octeon_crypto, value, true, false); } =20 -void helper_octeon_cp2_mt_kas_enc(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_kas_enc)(CPUMIPSState *env, uint64_t value) { octeon_kasumi_crypt_common(&env->octeon_crypto, value, false); } =20 -void helper_octeon_cp2_mt_des3_dec_cbc(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_des3_dec_cbc)(CPUMIPSState *env, uint64_t value) { octeon_3des_crypt_common(&env->octeon_crypto, value, false, true); } =20 -void helper_octeon_cp2_mt_des3_dec(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_des3_dec)(CPUMIPSState *env, uint64_t value) { octeon_3des_crypt_common(&env->octeon_crypto, value, false, false); } @@ -2053,68 +2053,68 @@ static void octeon_camellia_fl_layer(MIPSOcteonCryp= toState *crypto, camellia_fl(state, key); } =20 -void helper_octeon_cp2_mt_camellia_fl(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_camellia_fl)(CPUMIPSState *env, uint64_t value) { octeon_camellia_fl_layer(&env->octeon_crypto, value, false); } =20 -void helper_octeon_cp2_mt_camellia_flinv(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_camellia_flinv)(CPUMIPSState *env, uint64_t valu= e) { octeon_camellia_fl_layer(&env->octeon_crypto, value, true); } =20 -void helper_octeon_cp2_mt_camellia_round(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_camellia_round)(CPUMIPSState *env, uint64_t valu= e) { octeon_camellia_round(&env->octeon_crypto, value); } =20 -void helper_octeon_cp2_mt_snow3g_start(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_snow3g_start)(CPUMIPSState *env, uint64_t value) { octeon_snow3g_start(&env->octeon_crypto, value); } =20 -void helper_octeon_cp2_mt_snow3g_more(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_snow3g_more)(CPUMIPSState *env, uint64_t value) { (void)value; octeon_snow3g_more(&env->octeon_crypto); } =20 -void helper_octeon_cp2_mt_zuc_start(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_zuc_start)(CPUMIPSState *env, uint64_t value) { octeon_zuc_start(&env->octeon_crypto, value); } =20 -void helper_octeon_cp2_mt_zuc_more(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_zuc_more)(CPUMIPSState *env, uint64_t value) { octeon_zuc_more(&env->octeon_crypto, value); } =20 -void helper_octeon_cp2_mt_hsh_startsha1_compat(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_hsh_startsha1_compat)(CPUMIPSState *env, uint64_t value) { octeon_hsh_set_pair(env->octeon_crypto.hsh_dat, 7, value); octeon_sha1_transform(&env->octeon_crypto); } =20 -void helper_octeon_cp2_mt_hsh_startmd5(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_hsh_startmd5)(CPUMIPSState *env, uint64_t value) { octeon_hsh_set_pair(env->octeon_crypto.hsh_dat, 7, value); octeon_md5_transform(&env->octeon_crypto); } =20 -void helper_octeon_cp2_mt_hsh_startsha256(CPUMIPSState *env, uint64_t valu= e) +void HELPER(octeon_cp2_mt_hsh_startsha256)(CPUMIPSState *env, uint64_t val= ue) { octeon_hsh_set_pair(env->octeon_crypto.hsh_dat, 7, value); octeon_sha256_transform(&env->octeon_crypto); } =20 -void helper_octeon_cp2_mt_hsh_startsha(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_hsh_startsha)(CPUMIPSState *env, uint64_t value) { octeon_hsh_set_pair(env->octeon_crypto.hsh_dat, 7, value); octeon_sha1_transform(&env->octeon_crypto); } =20 -void helper_octeon_cp2_mt_hsh_startsha512(CPUMIPSState *env, uint64_t valu= e) +void HELPER(octeon_cp2_mt_hsh_startsha512)(CPUMIPSState *env, uint64_t val= ue) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 @@ -2122,7 +2122,7 @@ void helper_octeon_cp2_mt_hsh_startsha512(CPUMIPSStat= e *env, uint64_t value) octeon_sha512_transform(crypto); } =20 -uint64_t helper_octeon_cp2_mf_crc_iv_reflect(CPUMIPSState *env) +uint64_t HELPER(octeon_cp2_mf_crc_iv_reflect)(CPUMIPSState *env) { return octeon_crc_reflect32_by_byte(env->octeon_crypto.crc_iv); } @@ -2141,7 +2141,7 @@ static void octeon_gfm_xormul1_common(MIPSOcteonCrypt= oState *crypto, } } =20 -void helper_octeon_cp2_mt_gfm_xormul1_reflect(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_gfm_xormul1_reflect)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; @@ -2149,84 +2149,84 @@ void helper_octeon_cp2_mt_gfm_xormul1_reflect(CPUMI= PSState *env, octeon_gfm_xormul1_common(crypto, revbit64(value)); } =20 -void helper_octeon_cp2_mt_gfm_xormul1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_gfm_xormul1)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 octeon_gfm_xormul1_common(crypto, value); } =20 -void helper_octeon_cp2_mt_sha3_startop(CPUMIPSState *env) +void HELPER(octeon_cp2_mt_sha3_startop)(CPUMIPSState *env) { octeon_sha3_permute(&env->octeon_crypto); } =20 -void helper_octeon_cp2_mt_crc_write_iv_reflect(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_crc_write_iv_reflect)(CPUMIPSState *env, uint64_t value) { env->octeon_crypto.crc_iv =3D octeon_crc_reflect32_by_byte((uint32_t)value); } =20 -void helper_octeon_cp2_mt_crc_write_polynomial_reflect(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_crc_write_polynomial_reflect)(CPUMIPSState *env, uint64_t value) { env->octeon_crypto.crc_poly =3D octeon_crc_reflect32_by_byte((uint32_t)value); } =20 -void helper_octeon_cp2_mt_crc_write_byte(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_crc_write_byte)(CPUMIPSState *env, uint64_t valu= e) { octeon_crc_update_normal(&env->octeon_crypto, value, 1); } =20 -void helper_octeon_cp2_mt_crc_write_half(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_crc_write_half)(CPUMIPSState *env, uint64_t valu= e) { octeon_crc_update_normal(&env->octeon_crypto, value, 2); } =20 -void helper_octeon_cp2_mt_crc_write_word(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_crc_write_word)(CPUMIPSState *env, uint64_t valu= e) { octeon_crc_update_normal(&env->octeon_crypto, value, 4); } =20 -void helper_octeon_cp2_mt_crc_write_dword(CPUMIPSState *env, uint64_t valu= e) +void HELPER(octeon_cp2_mt_crc_write_dword)(CPUMIPSState *env, uint64_t val= ue) { octeon_crc_update_normal(&env->octeon_crypto, value, 8); } =20 -void helper_octeon_cp2_mt_crc_write_var(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_crc_write_var)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; =20 octeon_crc_update_normal(crypto, value, MIN(8U, crypto->crc_len & 0xf)= ); } =20 -void helper_octeon_cp2_mt_crc_write_byte_reflect(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_crc_write_byte_reflect)(CPUMIPSState *env, uint64_t value) { octeon_crc_update_reflect(&env->octeon_crypto, value, 1); } =20 -void helper_octeon_cp2_mt_crc_write_half_reflect(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_crc_write_half_reflect)(CPUMIPSState *env, uint64_t value) { octeon_crc_update_reflect(&env->octeon_crypto, value, 2); } =20 -void helper_octeon_cp2_mt_crc_write_word_reflect(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_crc_write_word_reflect)(CPUMIPSState *env, uint64_t value) { octeon_crc_update_reflect(&env->octeon_crypto, value, 4); } =20 -void helper_octeon_cp2_mt_crc_write_dword_reflect(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_crc_write_dword_reflect)(CPUMIPSState *env, uint64_t value) { octeon_crc_update_reflect(&env->octeon_crypto, value, 8); } =20 -void helper_octeon_cp2_mt_crc_write_var_reflect(CPUMIPSState *env, +void HELPER(octeon_cp2_mt_crc_write_var_reflect)(CPUMIPSState *env, uint64_t value) { MIPSOcteonCryptoState *crypto =3D &env->octeon_crypto; @@ -2234,42 +2234,42 @@ void helper_octeon_cp2_mt_crc_write_var_reflect(CPU= MIPSState *env, octeon_crc_update_reflect(crypto, value, MIN(8U, crypto->crc_len & 0xf= )); } =20 -void helper_octeon_cp2_mt_llm_read_addr0(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_llm_read_addr0)(CPUMIPSState *env, uint64_t valu= e) { octeon_llm_read(&env->octeon_crypto, 0, value, false); } =20 -void helper_octeon_cp2_mt_llm_write_addr0(CPUMIPSState *env, uint64_t valu= e) +void HELPER(octeon_cp2_mt_llm_write_addr0)(CPUMIPSState *env, uint64_t val= ue) { octeon_llm_write(&env->octeon_crypto, 0, value, false); } =20 -void helper_octeon_cp2_mt_llm_read64_addr0(CPUMIPSState *env, uint64_t val= ue) +void HELPER(octeon_cp2_mt_llm_read64_addr0)(CPUMIPSState *env, uint64_t va= lue) { octeon_llm_read(&env->octeon_crypto, 0, value, true); } =20 -void helper_octeon_cp2_mt_llm_write64_addr0(CPUMIPSState *env, uint64_t va= lue) +void HELPER(octeon_cp2_mt_llm_write64_addr0)(CPUMIPSState *env, uint64_t v= alue) { octeon_llm_write(&env->octeon_crypto, 0, value, true); } =20 -void helper_octeon_cp2_mt_llm_read_addr1(CPUMIPSState *env, uint64_t value) +void HELPER(octeon_cp2_mt_llm_read_addr1)(CPUMIPSState *env, uint64_t valu= e) { octeon_llm_read(&env->octeon_crypto, 1, value, false); } =20 -void helper_octeon_cp2_mt_llm_write_addr1(CPUMIPSState *env, uint64_t valu= e) +void HELPER(octeon_cp2_mt_llm_write_addr1)(CPUMIPSState *env, uint64_t val= ue) { octeon_llm_write(&env->octeon_crypto, 1, value, false); } =20 -void helper_octeon_cp2_mt_llm_read64_addr1(CPUMIPSState *env, uint64_t val= ue) +void HELPER(octeon_cp2_mt_llm_read64_addr1)(CPUMIPSState *env, uint64_t va= lue) { octeon_llm_read(&env->octeon_crypto, 1, value, true); } =20 -void helper_octeon_cp2_mt_llm_write64_addr1(CPUMIPSState *env, uint64_t va= lue) +void HELPER(octeon_cp2_mt_llm_write64_addr1)(CPUMIPSState *env, uint64_t v= alue) { octeon_llm_write(&env->octeon_crypto, 1, value, true); } diff --git a/target/mips/tcg/op_helper.c b/target/mips/tcg/op_helper.c index df1b5c37347..c3f0c05bc31 100644 --- a/target/mips/tcg/op_helper.c +++ b/target/mips/tcg/op_helper.c @@ -40,18 +40,18 @@ static inline target_ulong bitswap(target_ulong v) } =20 #ifdef TARGET_MIPS64 -target_ulong helper_dbitswap(target_ulong rt) +target_ulong HELPER(dbitswap)(target_ulong rt) { return bitswap(rt); } #endif =20 -target_ulong helper_bitswap(target_ulong rt) +target_ulong HELPER(bitswap)(target_ulong rt) { return (int32_t)bitswap(rt); } =20 -target_ulong helper_rotx(target_ulong rs, uint32_t shift, uint32_t shiftx, +target_ulong HELPER(rotx)(target_ulong rs, uint32_t shift, uint32_t shiftx, uint32_t stripe) { int i; @@ -146,7 +146,7 @@ target_ulong helper_rotx(target_ulong rs, uint32_t shif= t, uint32_t shiftx, } =20 /* these crc32 functions are based on target/loongarch/tcg/op_helper.c */ -target_ulong helper_crc32(target_ulong val, target_ulong m, uint32_t sz) +target_ulong HELPER(crc32)(target_ulong val, target_ulong m, uint32_t sz) { uint8_t buf[8]; target_ulong mask =3D ((sz * 8) =3D=3D 64) ? @@ -158,7 +158,7 @@ target_ulong helper_crc32(target_ulong val, target_ulon= g m, uint32_t sz) return (int32_t) (crc32(val ^ 0xffffffff, buf, sz) ^ 0xffffffff); } =20 -target_ulong helper_crc32c(target_ulong val, target_ulong m, uint32_t sz) +target_ulong HELPER(crc32c)(target_ulong val, target_ulong m, uint32_t sz) { uint8_t buf[8]; target_ulong mask =3D ((sz * 8) =3D=3D 64) ? @@ -169,7 +169,7 @@ target_ulong helper_crc32c(target_ulong val, target_ulo= ng m, uint32_t sz) return (int32_t) (crc32c(val, buf, sz) ^ 0xffffffff); } =20 -void helper_fork(target_ulong arg1, target_ulong arg2) +void HELPER(fork)(target_ulong arg1, target_ulong arg2) { /* * arg1 =3D rt, arg2 =3D rs @@ -177,7 +177,7 @@ void helper_fork(target_ulong arg1, target_ulong arg2) */ } =20 -target_ulong helper_yield(CPUMIPSState *env, target_ulong arg) +target_ulong HELPER(yield)(CPUMIPSState *env, target_ulong arg) { target_long arg1 =3D arg; =20 @@ -216,19 +216,19 @@ static inline void check_hwrena(CPUMIPSState *env, in= t reg, uintptr_t pc) do_raise_exception(env, EXCP_RI, pc); } =20 -target_ulong helper_rdhwr_cpunum(CPUMIPSState *env) +target_ulong HELPER(rdhwr_cpunum)(CPUMIPSState *env) { check_hwrena(env, 0, GETPC()); return env->CP0_EBase & 0x3ff; } =20 -target_ulong helper_rdhwr_synci_step(CPUMIPSState *env) +target_ulong HELPER(rdhwr_synci_step)(CPUMIPSState *env) { check_hwrena(env, 1, GETPC()); return env->SYNCI_Step; } =20 -target_ulong helper_rdhwr_cc(CPUMIPSState *env) +target_ulong HELPER(rdhwr_cc)(CPUMIPSState *env) { check_hwrena(env, 2, GETPC()); #ifdef CONFIG_USER_ONLY @@ -238,31 +238,31 @@ target_ulong helper_rdhwr_cc(CPUMIPSState *env) #endif } =20 -target_ulong helper_rdhwr_ccres(CPUMIPSState *env) +target_ulong HELPER(rdhwr_ccres)(CPUMIPSState *env) { check_hwrena(env, 3, GETPC()); return env->CCRes; } =20 -target_ulong helper_rdhwr_performance(CPUMIPSState *env) +target_ulong HELPER(rdhwr_performance)(CPUMIPSState *env) { check_hwrena(env, 4, GETPC()); return env->CP0_Performance0; } =20 -target_ulong helper_rdhwr_xnp(CPUMIPSState *env) +target_ulong HELPER(rdhwr_xnp)(CPUMIPSState *env) { check_hwrena(env, 5, GETPC()); return (env->CP0_Config5 >> CP0C5_XNP) & 1; } =20 -target_ulong helper_rdhwr_chord(CPUMIPSState *env) +target_ulong HELPER(rdhwr_chord)(CPUMIPSState *env) { check_hwrena(env, 30, GETPC()); return env->octeon_crypto.chord; } =20 -target_ulong helper_rdhwr_cvmcount(CPUMIPSState *env) +target_ulong HELPER(rdhwr_cvmcount)(CPUMIPSState *env) { check_hwrena(env, 31, GETPC()); #ifdef CONFIG_USER_ONLY @@ -272,7 +272,7 @@ target_ulong helper_rdhwr_cvmcount(CPUMIPSState *env) #endif } =20 -void helper_pmon(CPUMIPSState *env, int function) +void HELPER(pmon)(CPUMIPSState *env, int function) { function /=3D 2; switch (function) { @@ -300,7 +300,7 @@ void helper_pmon(CPUMIPSState *env, int function) } =20 #ifdef TARGET_MIPS64 -target_ulong helper_lcsr_cpucfg(CPUMIPSState *env, target_ulong rs) +target_ulong HELPER(lcsr_cpucfg)(CPUMIPSState *env, target_ulong rs) { switch (rs) { case 0: diff --git a/target/mips/tcg/system/cp0_helper.c b/target/mips/tcg/system/c= p0_helper.c index ba6b487b751..ceffcc37323 100644 --- a/target/mips/tcg/system/cp0_helper.c +++ b/target/mips/tcg/system/cp0_helper.c @@ -227,35 +227,35 @@ uint32_t cpu_mips_get_random(CPUMIPSState *env) } =20 /* CP0 helpers */ -target_ulong helper_mfc0_mvpcontrol(CPUMIPSState *env) +target_ulong HELPER(mfc0_mvpcontrol)(CPUMIPSState *env) { MIPSCPU *cpu =3D env_archcpu(env); return cpu->mvp->CP0_MVPControl; } =20 -target_ulong helper_mfc0_mvpconf0(CPUMIPSState *env) +target_ulong HELPER(mfc0_mvpconf0)(CPUMIPSState *env) { MIPSCPU *cpu =3D env_archcpu(env); return cpu->mvp->CP0_MVPConf0; } =20 -target_ulong helper_mfc0_mvpconf1(CPUMIPSState *env) +target_ulong HELPER(mfc0_mvpconf1)(CPUMIPSState *env) { MIPSCPU *cpu =3D env_archcpu(env); return cpu->mvp->CP0_MVPConf1; } =20 -target_ulong helper_mfc0_random(CPUMIPSState *env) +target_ulong HELPER(mfc0_random)(CPUMIPSState *env) { return (int32_t)cpu_mips_get_random(env); } =20 -target_ulong helper_mfc0_tcstatus(CPUMIPSState *env) +target_ulong HELPER(mfc0_tcstatus)(CPUMIPSState *env) { return env->active_tc.CP0_TCStatus; } =20 -target_ulong helper_mftc0_tcstatus(CPUMIPSState *env) +target_ulong HELPER(mftc0_tcstatus)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -267,12 +267,12 @@ target_ulong helper_mftc0_tcstatus(CPUMIPSState *env) } } =20 -target_ulong helper_mfc0_tcbind(CPUMIPSState *env) +target_ulong HELPER(mfc0_tcbind)(CPUMIPSState *env) { return env->active_tc.CP0_TCBind; } =20 -target_ulong helper_mftc0_tcbind(CPUMIPSState *env) +target_ulong HELPER(mftc0_tcbind)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -284,12 +284,12 @@ target_ulong helper_mftc0_tcbind(CPUMIPSState *env) } } =20 -target_ulong helper_mfc0_tcrestart(CPUMIPSState *env) +target_ulong HELPER(mfc0_tcrestart)(CPUMIPSState *env) { return env->active_tc.PC; } =20 -target_ulong helper_mftc0_tcrestart(CPUMIPSState *env) +target_ulong HELPER(mftc0_tcrestart)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -301,12 +301,12 @@ target_ulong helper_mftc0_tcrestart(CPUMIPSState *env) } } =20 -target_ulong helper_mfc0_tchalt(CPUMIPSState *env) +target_ulong HELPER(mfc0_tchalt)(CPUMIPSState *env) { return env->active_tc.CP0_TCHalt; } =20 -target_ulong helper_mftc0_tchalt(CPUMIPSState *env) +target_ulong HELPER(mftc0_tchalt)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -318,12 +318,12 @@ target_ulong helper_mftc0_tchalt(CPUMIPSState *env) } } =20 -target_ulong helper_mfc0_tccontext(CPUMIPSState *env) +target_ulong HELPER(mfc0_tccontext)(CPUMIPSState *env) { return env->active_tc.CP0_TCContext; } =20 -target_ulong helper_mftc0_tccontext(CPUMIPSState *env) +target_ulong HELPER(mftc0_tccontext)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -335,12 +335,12 @@ target_ulong helper_mftc0_tccontext(CPUMIPSState *env) } } =20 -target_ulong helper_mfc0_tcschedule(CPUMIPSState *env) +target_ulong HELPER(mfc0_tcschedule)(CPUMIPSState *env) { return env->active_tc.CP0_TCSchedule; } =20 -target_ulong helper_mftc0_tcschedule(CPUMIPSState *env) +target_ulong HELPER(mftc0_tcschedule)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -352,12 +352,12 @@ target_ulong helper_mftc0_tcschedule(CPUMIPSState *en= v) } } =20 -target_ulong helper_mfc0_tcschefback(CPUMIPSState *env) +target_ulong HELPER(mfc0_tcschefback)(CPUMIPSState *env) { return env->active_tc.CP0_TCScheFBack; } =20 -target_ulong helper_mftc0_tcschefback(CPUMIPSState *env) +target_ulong HELPER(mftc0_tcschefback)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -369,12 +369,12 @@ target_ulong helper_mftc0_tcschefback(CPUMIPSState *e= nv) } } =20 -target_ulong helper_mfc0_count(CPUMIPSState *env) +target_ulong HELPER(mfc0_count)(CPUMIPSState *env) { return (int32_t)cpu_mips_get_count(env); } =20 -target_ulong helper_mftc0_entryhi(CPUMIPSState *env) +target_ulong HELPER(mftc0_entryhi)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -382,7 +382,7 @@ target_ulong helper_mftc0_entryhi(CPUMIPSState *env) return other->CP0_EntryHi; } =20 -target_ulong helper_mftc0_cause(CPUMIPSState *env) +target_ulong HELPER(mftc0_cause)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -390,7 +390,7 @@ target_ulong helper_mftc0_cause(CPUMIPSState *env) return other->CP0_Cause; } =20 -target_ulong helper_mftc0_status(CPUMIPSState *env) +target_ulong HELPER(mftc0_status)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -398,37 +398,37 @@ target_ulong helper_mftc0_status(CPUMIPSState *env) return other->CP0_Status; } =20 -target_ulong helper_mfc0_lladdr(CPUMIPSState *env) +target_ulong HELPER(mfc0_lladdr)(CPUMIPSState *env) { return (int32_t)(env->CP0_LLAddr >> env->CP0_LLAddr_shift); } =20 -target_ulong helper_mfc0_maar(CPUMIPSState *env) +target_ulong HELPER(mfc0_maar)(CPUMIPSState *env) { return (int32_t) env->CP0_MAAR[env->CP0_MAARI]; } =20 -target_ulong helper_mfhc0_maar(CPUMIPSState *env) +target_ulong HELPER(mfhc0_maar)(CPUMIPSState *env) { return env->CP0_MAAR[env->CP0_MAARI] >> 32; } =20 -target_ulong helper_mfc0_watchlo(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(mfc0_watchlo)(CPUMIPSState *env, uint32_t sel) { return (int32_t)env->CP0_WatchLo[sel]; } =20 -target_ulong helper_mfc0_watchhi(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(mfc0_watchhi)(CPUMIPSState *env, uint32_t sel) { return (int32_t) env->CP0_WatchHi[sel]; } =20 -target_ulong helper_mfhc0_watchhi(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(mfhc0_watchhi)(CPUMIPSState *env, uint32_t sel) { return env->CP0_WatchHi[sel] >> 32; } =20 -target_ulong helper_mfc0_debug(CPUMIPSState *env) +target_ulong HELPER(mfc0_debug)(CPUMIPSState *env) { target_ulong t0 =3D env->CP0_Debug; if (env->hflags & MIPS_HFLAG_DM) { @@ -438,7 +438,7 @@ target_ulong helper_mfc0_debug(CPUMIPSState *env) return t0; } =20 -target_ulong helper_mftc0_debug(CPUMIPSState *env) +target_ulong HELPER(mftc0_debug)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); int32_t tcstatus; @@ -456,54 +456,54 @@ target_ulong helper_mftc0_debug(CPUMIPSState *env) } =20 #if defined(TARGET_MIPS64) -target_ulong helper_dmfc0_tcrestart(CPUMIPSState *env) +target_ulong HELPER(dmfc0_tcrestart)(CPUMIPSState *env) { return env->active_tc.PC; } =20 -target_ulong helper_dmfc0_tchalt(CPUMIPSState *env) +target_ulong HELPER(dmfc0_tchalt)(CPUMIPSState *env) { return env->active_tc.CP0_TCHalt; } =20 -target_ulong helper_dmfc0_tccontext(CPUMIPSState *env) +target_ulong HELPER(dmfc0_tccontext)(CPUMIPSState *env) { return env->active_tc.CP0_TCContext; } =20 -target_ulong helper_dmfc0_tcschedule(CPUMIPSState *env) +target_ulong HELPER(dmfc0_tcschedule)(CPUMIPSState *env) { return env->active_tc.CP0_TCSchedule; } =20 -target_ulong helper_dmfc0_tcschefback(CPUMIPSState *env) +target_ulong HELPER(dmfc0_tcschefback)(CPUMIPSState *env) { return env->active_tc.CP0_TCScheFBack; } =20 -target_ulong helper_dmfc0_lladdr(CPUMIPSState *env) +target_ulong HELPER(dmfc0_lladdr)(CPUMIPSState *env) { return env->CP0_LLAddr >> env->CP0_LLAddr_shift; } =20 -target_ulong helper_dmfc0_maar(CPUMIPSState *env) +target_ulong HELPER(dmfc0_maar)(CPUMIPSState *env) { return env->CP0_MAAR[env->CP0_MAARI]; } =20 -target_ulong helper_dmfc0_watchlo(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(dmfc0_watchlo)(CPUMIPSState *env, uint32_t sel) { return env->CP0_WatchLo[sel]; } =20 -target_ulong helper_dmfc0_watchhi(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(dmfc0_watchhi)(CPUMIPSState *env, uint32_t sel) { return env->CP0_WatchHi[sel]; } =20 #endif /* TARGET_MIPS64 */ =20 -void helper_mtc0_index(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_index)(CPUMIPSState *env, target_ulong arg1) { uint32_t index_p =3D env->CP0_Index & 0x80000000; uint32_t tlb_index =3D arg1 & 0x7fffffff; @@ -515,7 +515,7 @@ void helper_mtc0_index(CPUMIPSState *env, target_ulong = arg1) } } =20 -void helper_mtc0_mvpcontrol(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_mvpcontrol)(CPUMIPSState *env, target_ulong arg1) { MIPSCPU *cpu =3D env_archcpu(env); uint32_t mask =3D 0; @@ -535,7 +535,7 @@ void helper_mtc0_mvpcontrol(CPUMIPSState *env, target_u= long arg1) cpu->mvp->CP0_MVPControl =3D newval; } =20 -void helper_mtc0_vpecontrol(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_vpecontrol)(CPUMIPSState *env, target_ulong arg1) { uint32_t mask; uint32_t newval; @@ -554,7 +554,7 @@ void helper_mtc0_vpecontrol(CPUMIPSState *env, target_u= long arg1) env->CP0_VPEControl =3D newval; } =20 -void helper_mttc0_vpecontrol(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_vpecontrol)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -570,7 +570,7 @@ void helper_mttc0_vpecontrol(CPUMIPSState *env, target_= ulong arg1) other->CP0_VPEControl =3D newval; } =20 -target_ulong helper_mftc0_vpecontrol(CPUMIPSState *env) +target_ulong HELPER(mftc0_vpecontrol)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -578,7 +578,7 @@ target_ulong helper_mftc0_vpecontrol(CPUMIPSState *env) return other->CP0_VPEControl; } =20 -target_ulong helper_mftc0_vpeconf0(CPUMIPSState *env) +target_ulong HELPER(mftc0_vpeconf0)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -586,7 +586,7 @@ target_ulong helper_mftc0_vpeconf0(CPUMIPSState *env) return other->CP0_VPEConf0; } =20 -void helper_mtc0_vpeconf0(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_vpeconf0)(CPUMIPSState *env, target_ulong arg1) { uint32_t mask =3D 0; uint32_t newval; @@ -604,7 +604,7 @@ void helper_mtc0_vpeconf0(CPUMIPSState *env, target_ulo= ng arg1) env->CP0_VPEConf0 =3D newval; } =20 -void helper_mttc0_vpeconf0(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_vpeconf0)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -618,7 +618,7 @@ void helper_mttc0_vpeconf0(CPUMIPSState *env, target_ul= ong arg1) other->CP0_VPEConf0 =3D newval; } =20 -void helper_mtc0_vpeconf1(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_vpeconf1)(CPUMIPSState *env, target_ulong arg1) { MIPSCPU *cpu =3D env_archcpu(env); uint32_t mask =3D 0; @@ -637,20 +637,20 @@ void helper_mtc0_vpeconf1(CPUMIPSState *env, target_u= long arg1) env->CP0_VPEConf1 =3D newval; } =20 -void helper_mtc0_yqmask(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_yqmask)(CPUMIPSState *env, target_ulong arg1) { /* Yield qualifier inputs not implemented. */ env->CP0_YQMask =3D 0x00000000; } =20 -void helper_mtc0_vpeopt(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_vpeopt)(CPUMIPSState *env, target_ulong arg1) { env->CP0_VPEOpt =3D arg1 & 0x0000ffff; } =20 #define MTC0_ENTRYLO_MASK(env) ((env->PAMask >> 6) & 0x3FFFFFFF) =20 -void helper_mtc0_entrylo0(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_entrylo0)(CPUMIPSState *env, target_ulong arg1) { /* 1k pages not implemented */ target_ulong rxi =3D arg1 & (env->CP0_PageGrain & (3u << CP0PG_XIE)); @@ -661,14 +661,14 @@ void helper_mtc0_entrylo0(CPUMIPSState *env, target_u= long arg1) #if defined(TARGET_MIPS64) #define DMTC0_ENTRYLO_MASK(env) (env->PAMask >> 6) =20 -void helper_dmtc0_entrylo0(CPUMIPSState *env, uint64_t arg1) +void HELPER(dmtc0_entrylo0)(CPUMIPSState *env, uint64_t arg1) { uint64_t rxi =3D arg1 & ((env->CP0_PageGrain & (3ull << CP0PG_XIE)) <<= 32); env->CP0_EntryLo0 =3D (arg1 & DMTC0_ENTRYLO_MASK(env)) | rxi; } #endif =20 -void helper_mtc0_tcstatus(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_tcstatus)(CPUMIPSState *env, target_ulong arg1) { uint32_t mask =3D env->CP0_TCStatus_rw_bitmask; uint32_t newval; @@ -679,7 +679,7 @@ void helper_mtc0_tcstatus(CPUMIPSState *env, target_ulo= ng arg1) sync_c0_tcstatus(env, env->current_tc, newval); } =20 -void helper_mttc0_tcstatus(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_tcstatus)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -692,7 +692,7 @@ void helper_mttc0_tcstatus(CPUMIPSState *env, target_ul= ong arg1) sync_c0_tcstatus(other, other_tc, arg1); } =20 -void helper_mtc0_tcbind(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_tcbind)(CPUMIPSState *env, target_ulong arg1) { MIPSCPU *cpu =3D env_archcpu(env); uint32_t mask =3D (1 << CP0TCBd_TBE); @@ -705,7 +705,7 @@ void helper_mtc0_tcbind(CPUMIPSState *env, target_ulong= arg1) env->active_tc.CP0_TCBind =3D newval; } =20 -void helper_mttc0_tcbind(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_tcbind)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); uint32_t mask =3D (1 << CP0TCBd_TBE); @@ -725,7 +725,7 @@ void helper_mttc0_tcbind(CPUMIPSState *env, target_ulon= g arg1) } } =20 -void helper_mtc0_tcrestart(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_tcrestart)(CPUMIPSState *env, target_ulong arg1) { env->active_tc.PC =3D arg1; env->active_tc.CP0_TCStatus &=3D ~(1 << CP0TCSt_TDS); @@ -734,7 +734,7 @@ void helper_mtc0_tcrestart(CPUMIPSState *env, target_ul= ong arg1) /* MIPS16 not implemented. */ } =20 -void helper_mttc0_tcrestart(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_tcrestart)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -754,7 +754,7 @@ void helper_mttc0_tcrestart(CPUMIPSState *env, target_u= long arg1) } } =20 -void helper_mtc0_tchalt(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_tchalt)(CPUMIPSState *env, target_ulong arg1) { MIPSCPU *cpu =3D env_archcpu(env); =20 @@ -768,7 +768,7 @@ void helper_mtc0_tchalt(CPUMIPSState *env, target_ulong= arg1) } } =20 -void helper_mttc0_tchalt(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_tchalt)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -789,12 +789,12 @@ void helper_mttc0_tchalt(CPUMIPSState *env, target_ul= ong arg1) } } =20 -void helper_mtc0_tccontext(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_tccontext)(CPUMIPSState *env, target_ulong arg1) { env->active_tc.CP0_TCContext =3D arg1; } =20 -void helper_mttc0_tccontext(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_tccontext)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -806,12 +806,12 @@ void helper_mttc0_tccontext(CPUMIPSState *env, target= _ulong arg1) } } =20 -void helper_mtc0_tcschedule(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_tcschedule)(CPUMIPSState *env, target_ulong arg1) { env->active_tc.CP0_TCSchedule =3D arg1; } =20 -void helper_mttc0_tcschedule(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_tcschedule)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -823,12 +823,12 @@ void helper_mttc0_tcschedule(CPUMIPSState *env, targe= t_ulong arg1) } } =20 -void helper_mtc0_tcschefback(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_tcschefback)(CPUMIPSState *env, target_ulong arg1) { env->active_tc.CP0_TCScheFBack =3D arg1; } =20 -void helper_mttc0_tcschefback(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_tcschefback)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -840,7 +840,7 @@ void helper_mttc0_tcschefback(CPUMIPSState *env, target= _ulong arg1) } } =20 -void helper_mtc0_entrylo1(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_entrylo1)(CPUMIPSState *env, target_ulong arg1) { /* 1k pages not implemented */ target_ulong rxi =3D arg1 & (env->CP0_PageGrain & (3u << CP0PG_XIE)); @@ -849,19 +849,19 @@ void helper_mtc0_entrylo1(CPUMIPSState *env, target_u= long arg1) } =20 #if defined(TARGET_MIPS64) -void helper_dmtc0_entrylo1(CPUMIPSState *env, uint64_t arg1) +void HELPER(dmtc0_entrylo1)(CPUMIPSState *env, uint64_t arg1) { uint64_t rxi =3D arg1 & ((env->CP0_PageGrain & (3ull << CP0PG_XIE)) <<= 32); env->CP0_EntryLo1 =3D (arg1 & DMTC0_ENTRYLO_MASK(env)) | rxi; } #endif =20 -void helper_mtc0_context(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_context)(CPUMIPSState *env, target_ulong arg1) { env->CP0_Context =3D (env->CP0_Context & 0x007FFFFF) | (arg1 & ~0x007F= FFFF); } =20 -void helper_mtc0_memorymapid(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_memorymapid)(CPUMIPSState *env, target_ulong arg1) { int32_t old; old =3D env->CP0_MemoryMapID; @@ -887,12 +887,12 @@ uint32_t compute_pagemask(uint32_t val) } } =20 -void helper_mtc0_pagemask(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_pagemask)(CPUMIPSState *env, target_ulong arg1) { env->CP0_PageMask =3D compute_pagemask(arg1); } =20 -void helper_mtc0_pagegrain(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_pagegrain)(CPUMIPSState *env, target_ulong arg1) { /* SmartMIPS not implemented */ /* 1k pages not implemented */ @@ -902,7 +902,7 @@ void helper_mtc0_pagegrain(CPUMIPSState *env, target_ul= ong arg1) restore_pamask(env); } =20 -void helper_mtc0_segctl0(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_segctl0)(CPUMIPSState *env, target_ulong arg1) { CPUState *cs =3D env_cpu(env); =20 @@ -910,7 +910,7 @@ void helper_mtc0_segctl0(CPUMIPSState *env, target_ulon= g arg1) tlb_flush(cs); } =20 -void helper_mtc0_segctl1(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_segctl1)(CPUMIPSState *env, target_ulong arg1) { CPUState *cs =3D env_cpu(env); =20 @@ -918,7 +918,7 @@ void helper_mtc0_segctl1(CPUMIPSState *env, target_ulon= g arg1) tlb_flush(cs); } =20 -void helper_mtc0_segctl2(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_segctl2)(CPUMIPSState *env, target_ulong arg1) { CPUState *cs =3D env_cpu(env); =20 @@ -926,7 +926,7 @@ void helper_mtc0_segctl2(CPUMIPSState *env, target_ulon= g arg1) tlb_flush(cs); } =20 -void helper_mtc0_pwfield(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_pwfield)(CPUMIPSState *env, target_ulong arg1) { #if defined(TARGET_MIPS64) uint64_t mask =3D 0x3F3FFFFFFFULL; @@ -988,7 +988,7 @@ void helper_mtc0_pwfield(CPUMIPSState *env, target_ulon= g arg1) #endif } =20 -void helper_mtc0_pwsize(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_pwsize)(CPUMIPSState *env, target_ulong arg1) { #if defined(TARGET_MIPS64) env->CP0_PWSize =3D arg1 & 0x3F7FFFFFFFULL; @@ -997,7 +997,7 @@ void helper_mtc0_pwsize(CPUMIPSState *env, target_ulong= arg1) #endif } =20 -void helper_mtc0_wired(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_wired)(CPUMIPSState *env, target_ulong arg1) { if (env->insn_flags & ISA_MIPS_R6) { if (arg1 < env->tlb->nb_tlb) { @@ -1008,7 +1008,7 @@ void helper_mtc0_wired(CPUMIPSState *env, target_ulon= g arg1) } } =20 -void helper_mtc0_pwctl(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_pwctl)(CPUMIPSState *env, target_ulong arg1) { #if defined(TARGET_MIPS64) /* PWEn =3D 0. Hardware page table walking is not implemented. */ @@ -1018,32 +1018,32 @@ void helper_mtc0_pwctl(CPUMIPSState *env, target_ul= ong arg1) #endif } =20 -void helper_mtc0_srsconf0(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_srsconf0)(CPUMIPSState *env, target_ulong arg1) { env->CP0_SRSConf0 |=3D arg1 & env->CP0_SRSConf0_rw_bitmask; } =20 -void helper_mtc0_srsconf1(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_srsconf1)(CPUMIPSState *env, target_ulong arg1) { env->CP0_SRSConf1 |=3D arg1 & env->CP0_SRSConf1_rw_bitmask; } =20 -void helper_mtc0_srsconf2(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_srsconf2)(CPUMIPSState *env, target_ulong arg1) { env->CP0_SRSConf2 |=3D arg1 & env->CP0_SRSConf2_rw_bitmask; } =20 -void helper_mtc0_srsconf3(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_srsconf3)(CPUMIPSState *env, target_ulong arg1) { env->CP0_SRSConf3 |=3D arg1 & env->CP0_SRSConf3_rw_bitmask; } =20 -void helper_mtc0_srsconf4(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_srsconf4)(CPUMIPSState *env, target_ulong arg1) { env->CP0_SRSConf4 |=3D arg1 & env->CP0_SRSConf4_rw_bitmask; } =20 -void helper_mtc0_hwrena(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_hwrena)(CPUMIPSState *env, target_ulong arg1) { uint32_t mask =3D 0x0000000F; =20 @@ -1067,12 +1067,12 @@ void helper_mtc0_hwrena(CPUMIPSState *env, target_u= long arg1) env->CP0_HWREna =3D arg1 & mask; } =20 -void helper_mtc0_count(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_count)(CPUMIPSState *env, target_ulong arg1) { cpu_mips_store_count(env, arg1); } =20 -void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_entryhi)(CPUMIPSState *env, target_ulong arg1) { target_ulong old, val, mask; mask =3D (TARGET_PAGE_MASK << 1) | env->CP0_EntryHi_ASID_mask; @@ -1107,7 +1107,7 @@ void helper_mtc0_entryhi(CPUMIPSState *env, target_ul= ong arg1) } } =20 -void helper_mttc0_entryhi(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_entryhi)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1116,12 +1116,12 @@ void helper_mttc0_entryhi(CPUMIPSState *env, target= _ulong arg1) sync_c0_entryhi(other, other_tc); } =20 -void helper_mtc0_compare(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_compare)(CPUMIPSState *env, target_ulong arg1) { cpu_mips_store_compare(env, arg1); } =20 -void helper_mtc0_status(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_status)(CPUMIPSState *env, target_ulong arg1) { uint32_t val, old; =20 @@ -1154,7 +1154,7 @@ void helper_mtc0_status(CPUMIPSState *env, target_ulo= ng arg1) } } =20 -void helper_mttc0_status(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_status)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); uint32_t mask =3D env->CP0_Status_rw_bitmask & ~0xf1000018; @@ -1164,23 +1164,23 @@ void helper_mttc0_status(CPUMIPSState *env, target_= ulong arg1) sync_c0_status(env, other, other_tc); } =20 -void helper_mtc0_intctl(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_intctl)(CPUMIPSState *env, target_ulong arg1) { env->CP0_IntCtl =3D (env->CP0_IntCtl & ~0x000003e0) | (arg1 & 0x000003= e0); } =20 -void helper_mtc0_srsctl(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_srsctl)(CPUMIPSState *env, target_ulong arg1) { uint32_t mask =3D (0xf << CP0SRSCtl_ESS) | (0xf << CP0SRSCtl_PSS); env->CP0_SRSCtl =3D (env->CP0_SRSCtl & ~mask) | (arg1 & mask); } =20 -void helper_mtc0_cause(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_cause)(CPUMIPSState *env, target_ulong arg1) { cpu_mips_store_cause(env, arg1); } =20 -void helper_mttc0_cause(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_cause)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1188,7 +1188,7 @@ void helper_mttc0_cause(CPUMIPSState *env, target_ulo= ng arg1) cpu_mips_store_cause(other, arg1); } =20 -target_ulong helper_mftc0_epc(CPUMIPSState *env) +target_ulong HELPER(mftc0_epc)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1196,7 +1196,7 @@ target_ulong helper_mftc0_epc(CPUMIPSState *env) return other->CP0_EPC; } =20 -target_ulong helper_mftc0_ebase(CPUMIPSState *env) +target_ulong HELPER(mftc0_ebase)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1204,7 +1204,7 @@ target_ulong helper_mftc0_ebase(CPUMIPSState *env) return other->CP0_EBase; } =20 -void helper_mtc0_ebase(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_ebase)(CPUMIPSState *env, target_ulong arg1) { target_ulong mask =3D 0x3FFFF000 | env->CP0_EBaseWG_rw_bitmask; if (arg1 & env->CP0_EBaseWG_rw_bitmask) { @@ -1213,7 +1213,7 @@ void helper_mtc0_ebase(CPUMIPSState *env, target_ulon= g arg1) env->CP0_EBase =3D (env->CP0_EBase & ~mask) | (arg1 & mask); } =20 -void helper_mttc0_ebase(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_ebase)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1224,7 +1224,7 @@ void helper_mttc0_ebase(CPUMIPSState *env, target_ulo= ng arg1) other->CP0_EBase =3D (other->CP0_EBase & ~mask) | (arg1 & mask); } =20 -target_ulong helper_mftc0_configx(CPUMIPSState *env, target_ulong idx) +target_ulong HELPER(mftc0_configx)(CPUMIPSState *env, target_ulong idx) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1243,18 +1243,18 @@ target_ulong helper_mftc0_configx(CPUMIPSState *env= , target_ulong idx) return 0; } =20 -void helper_mtc0_config0(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_config0)(CPUMIPSState *env, target_ulong arg1) { env->CP0_Config0 =3D (env->CP0_Config0 & 0x81FFFFF8) | (arg1 & 0x00000= 007); } =20 -void helper_mtc0_config2(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_config2)(CPUMIPSState *env, target_ulong arg1) { /* tertiary/secondary caches not implemented */ env->CP0_Config2 =3D (env->CP0_Config2 & 0x8FFF0FFF); } =20 -void helper_mtc0_config3(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_config3)(CPUMIPSState *env, target_ulong arg1) { if (env->insn_flags & ASE_MICROMIPS) { env->CP0_Config3 =3D (env->CP0_Config3 & ~(1 << CP0C3_ISA_ON_EXC))= | @@ -1262,13 +1262,13 @@ void helper_mtc0_config3(CPUMIPSState *env, target_= ulong arg1) } } =20 -void helper_mtc0_config4(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_config4)(CPUMIPSState *env, target_ulong arg1) { env->CP0_Config4 =3D (env->CP0_Config4 & (~env->CP0_Config4_rw_bitmask= )) | (arg1 & env->CP0_Config4_rw_bitmask); } =20 -void helper_mtc0_config5(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_config5)(CPUMIPSState *env, target_ulong arg1) { env->CP0_Config5 =3D (env->CP0_Config5 & (~env->CP0_Config5_rw_bitmask= )) | (arg1 & env->CP0_Config5_rw_bitmask); @@ -1277,7 +1277,7 @@ void helper_mtc0_config5(CPUMIPSState *env, target_ul= ong arg1) compute_hflags(env); } =20 -void helper_mtc0_lladdr(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_lladdr)(CPUMIPSState *env, target_ulong arg1) { target_long mask =3D env->CP0_LLAddr_rw_bitmask; arg1 =3D arg1 << env->CP0_LLAddr_shift; @@ -1287,19 +1287,19 @@ void helper_mtc0_lladdr(CPUMIPSState *env, target_u= long arg1) #define MTC0_MAAR_MASK(env) \ ((0x1ULL << 63) | ((env->PAMask >> 4) & ~0xFFFull) | 0x3) =20 -void helper_mtc0_maar(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_maar)(CPUMIPSState *env, target_ulong arg1) { env->CP0_MAAR[env->CP0_MAARI] =3D arg1 & MTC0_MAAR_MASK(env); } =20 -void helper_mthc0_maar(CPUMIPSState *env, target_ulong arg1) +void HELPER(mthc0_maar)(CPUMIPSState *env, target_ulong arg1) { env->CP0_MAAR[env->CP0_MAARI] =3D (((uint64_t) arg1 << 32) & MTC0_MAAR_MASK(env)) | (env->CP0_MAAR[env->CP0_MAARI] & 0x00000000ffffffffULL); } =20 -void helper_mtc0_maari(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_maari)(CPUMIPSState *env, target_ulong arg1) { int index =3D arg1 & 0x3f; if (index =3D=3D 0x3f) { @@ -1317,7 +1317,7 @@ void helper_mtc0_maari(CPUMIPSState *env, target_ulon= g arg1) */ } =20 -void helper_mtc0_watchlo(CPUMIPSState *env, target_ulong arg1, uint32_t se= l) +void HELPER(mtc0_watchlo)(CPUMIPSState *env, target_ulong arg1, uint32_t s= el) { /* * Watch exceptions for instructions, data loads, data stores @@ -1326,7 +1326,7 @@ void helper_mtc0_watchlo(CPUMIPSState *env, target_ul= ong arg1, uint32_t sel) env->CP0_WatchLo[sel] =3D (arg1 & ~0x7); } =20 -void helper_mtc0_watchhi(CPUMIPSState *env, target_ulong arg1, uint32_t se= l) +void HELPER(mtc0_watchhi)(CPUMIPSState *env, target_ulong arg1, uint32_t s= el) { uint64_t mask =3D 0x40000FF8 | (env->CP0_EntryHi_ASID_mask << CP0WH_AS= ID); uint64_t m_bit =3D env->CP0_WatchHi[sel] & (1 << CP0WH_M); /* read-onl= y */ @@ -1337,24 +1337,24 @@ void helper_mtc0_watchhi(CPUMIPSState *env, target_= ulong arg1, uint32_t sel) env->CP0_WatchHi[sel] &=3D ~(env->CP0_WatchHi[sel] & arg1 & 0x7); } =20 -void helper_mthc0_watchhi(CPUMIPSState *env, target_ulong arg1, uint32_t s= el) +void HELPER(mthc0_watchhi)(CPUMIPSState *env, target_ulong arg1, uint32_t = sel) { env->CP0_WatchHi[sel] =3D ((uint64_t) (arg1) << 32) | (env->CP0_WatchHi[sel] & 0x00000000ffffffffULL= ); } =20 -void helper_mtc0_xcontext(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_xcontext)(CPUMIPSState *env, target_ulong arg1) { target_ulong mask =3D (1ULL << (env->SEGBITS - 7)) - 1; env->CP0_XContext =3D (env->CP0_XContext & mask) | (arg1 & ~mask); } =20 -void helper_mtc0_framemask(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_framemask)(CPUMIPSState *env, target_ulong arg1) { env->CP0_Framemask =3D arg1; /* XXX */ } =20 -void helper_mtc0_debug(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_debug)(CPUMIPSState *env, target_ulong arg1) { env->CP0_Debug =3D (env->CP0_Debug & 0x8C03FC1F) | (arg1 & 0x13300120); if (arg1 & (1 << CP0DB_DM)) { @@ -1364,7 +1364,7 @@ void helper_mtc0_debug(CPUMIPSState *env, target_ulon= g arg1) } } =20 -void helper_mttc0_debug(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttc0_debug)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); uint32_t val =3D arg1 & ((1 << CP0DB_SSt) | (1 << CP0DB_Halt)); @@ -1381,12 +1381,12 @@ void helper_mttc0_debug(CPUMIPSState *env, target_u= long arg1) (arg1 & ~((1 << CP0DB_SSt) | (1 << CP0DB_Halt))); } =20 -void helper_mtc0_performance0(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_performance0)(CPUMIPSState *env, target_ulong arg1) { env->CP0_Performance0 =3D arg1 & 0x000007ff; } =20 -void helper_mtc0_errctl(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_errctl)(CPUMIPSState *env, target_ulong arg1) { int32_t wst =3D arg1 & (1 << CP0EC_WST); int32_t spr =3D arg1 & (1 << CP0EC_SPR); @@ -1401,7 +1401,7 @@ void helper_mtc0_errctl(CPUMIPSState *env, target_ulo= ng arg1) } } =20 -void helper_mtc0_taglo(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_taglo)(CPUMIPSState *env, target_ulong arg1) { if (env->hflags & MIPS_HFLAG_ITC_CACHE) { /* @@ -1415,23 +1415,23 @@ void helper_mtc0_taglo(CPUMIPSState *env, target_ul= ong arg1) } } =20 -void helper_mtc0_datalo(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_datalo)(CPUMIPSState *env, target_ulong arg1) { env->CP0_DataLo =3D arg1; /* XXX */ } =20 -void helper_mtc0_taghi(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_taghi)(CPUMIPSState *env, target_ulong arg1) { env->CP0_TagHi =3D arg1; /* XXX */ } =20 -void helper_mtc0_datahi(CPUMIPSState *env, target_ulong arg1) +void HELPER(mtc0_datahi)(CPUMIPSState *env, target_ulong arg1) { env->CP0_DataHi =3D arg1; /* XXX */ } =20 /* MIPS MT functions */ -target_ulong helper_mftgpr(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(mftgpr)(CPUMIPSState *env, uint32_t sel) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1443,7 +1443,7 @@ target_ulong helper_mftgpr(CPUMIPSState *env, uint32_= t sel) } } =20 -target_ulong helper_mftlo(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(mftlo)(CPUMIPSState *env, uint32_t sel) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1455,7 +1455,7 @@ target_ulong helper_mftlo(CPUMIPSState *env, uint32_t= sel) } } =20 -target_ulong helper_mfthi(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(mfthi)(CPUMIPSState *env, uint32_t sel) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1467,7 +1467,7 @@ target_ulong helper_mfthi(CPUMIPSState *env, uint32_t= sel) } } =20 -target_ulong helper_mftacx(CPUMIPSState *env, uint32_t sel) +target_ulong HELPER(mftacx)(CPUMIPSState *env, uint32_t sel) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1479,7 +1479,7 @@ target_ulong helper_mftacx(CPUMIPSState *env, uint32_= t sel) } } =20 -target_ulong helper_mftdsp(CPUMIPSState *env) +target_ulong HELPER(mftdsp)(CPUMIPSState *env) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1491,7 +1491,7 @@ target_ulong helper_mftdsp(CPUMIPSState *env) } } =20 -void helper_mttgpr(CPUMIPSState *env, target_ulong arg1, uint32_t sel) +void HELPER(mttgpr)(CPUMIPSState *env, target_ulong arg1, uint32_t sel) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1503,7 +1503,7 @@ void helper_mttgpr(CPUMIPSState *env, target_ulong ar= g1, uint32_t sel) } } =20 -void helper_mttlo(CPUMIPSState *env, target_ulong arg1, uint32_t sel) +void HELPER(mttlo)(CPUMIPSState *env, target_ulong arg1, uint32_t sel) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1515,7 +1515,7 @@ void helper_mttlo(CPUMIPSState *env, target_ulong arg= 1, uint32_t sel) } } =20 -void helper_mtthi(CPUMIPSState *env, target_ulong arg1, uint32_t sel) +void HELPER(mtthi)(CPUMIPSState *env, target_ulong arg1, uint32_t sel) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1527,7 +1527,7 @@ void helper_mtthi(CPUMIPSState *env, target_ulong arg= 1, uint32_t sel) } } =20 -void helper_mttacx(CPUMIPSState *env, target_ulong arg1, uint32_t sel) +void HELPER(mttacx)(CPUMIPSState *env, target_ulong arg1, uint32_t sel) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1539,7 +1539,7 @@ void helper_mttacx(CPUMIPSState *env, target_ulong ar= g1, uint32_t sel) } } =20 -void helper_mttdsp(CPUMIPSState *env, target_ulong arg1) +void HELPER(mttdsp)(CPUMIPSState *env, target_ulong arg1) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); CPUMIPSState *other =3D mips_cpu_map_tc(env, &other_tc); @@ -1552,19 +1552,19 @@ void helper_mttdsp(CPUMIPSState *env, target_ulong = arg1) } =20 /* MIPS MT functions */ -target_ulong helper_dmt(void) +target_ulong HELPER(dmt)(void) { /* TODO */ return 0; } =20 -target_ulong helper_emt(void) +target_ulong HELPER(emt)(void) { /* TODO */ return 0; } =20 -target_ulong helper_dvpe(CPUMIPSState *env) +target_ulong HELPER(dvpe)(CPUMIPSState *env) { MIPSCPU *cpu =3D env_archcpu(env); target_ulong prev =3D cpu->mvp->CP0_MVPControl; @@ -1584,7 +1584,7 @@ target_ulong helper_dvpe(CPUMIPSState *env) return prev; } =20 -target_ulong helper_evpe(CPUMIPSState *env) +target_ulong HELPER(evpe)(CPUMIPSState *env) { MIPSCPU *cpu =3D env_archcpu(env); target_ulong prev =3D cpu->mvp->CP0_MVPControl; @@ -1608,7 +1608,7 @@ target_ulong helper_evpe(CPUMIPSState *env) } =20 /* R6 Multi-threading */ -target_ulong helper_dvp(CPUMIPSState *env) +target_ulong HELPER(dvp)(CPUMIPSState *env) { target_ulong prev =3D env->CP0_VPControl; =20 @@ -1627,7 +1627,7 @@ target_ulong helper_dvp(CPUMIPSState *env) return prev; } =20 -target_ulong helper_evp(CPUMIPSState *env) +target_ulong HELPER(evp)(CPUMIPSState *env) { target_ulong prev =3D env->CP0_VPControl; =20 diff --git a/target/mips/tcg/system/lcsr_helper.c b/target/mips/tcg/system/= lcsr_helper.c index 25e03572fe9..5d7e5cb5422 100644 --- a/target/mips/tcg/system/lcsr_helper.c +++ b/target/mips/tcg/system/lcsr_helper.c @@ -13,26 +13,26 @@ #define GET_MEMTXATTRS(cas) \ ((MemTxAttrs){.requester_id =3D env_cpu(cas)->cpu_index}) =20 -uint64_t helper_lcsr_rdcsr(CPUMIPSState *env, target_ulong r_addr) +uint64_t HELPER(lcsr_rdcsr)(CPUMIPSState *env, target_ulong r_addr) { return address_space_ldl(&env->iocsr.as, r_addr, GET_MEMTXATTRS(env), NULL); } =20 -uint64_t helper_lcsr_drdcsr(CPUMIPSState *env, target_ulong r_addr) +uint64_t HELPER(lcsr_drdcsr)(CPUMIPSState *env, target_ulong r_addr) { return address_space_ldq(&env->iocsr.as, r_addr, GET_MEMTXATTRS(env), NULL); } =20 -void helper_lcsr_wrcsr(CPUMIPSState *env, target_ulong w_addr, +void HELPER(lcsr_wrcsr)(CPUMIPSState *env, target_ulong w_addr, target_ulong val) { address_space_stl(&env->iocsr.as, w_addr, val, GET_MEMTXATTRS(env), NULL); } =20 -void helper_lcsr_dwrcsr(CPUMIPSState *env, target_ulong w_addr, +void HELPER(lcsr_dwrcsr)(CPUMIPSState *env, target_ulong w_addr, target_ulong val) { address_space_stq(&env->iocsr.as, w_addr, diff --git a/target/mips/tcg/system/special_helper.c b/target/mips/tcg/syst= em/special_helper.c index b54cbe88a38..cc46542806e 100644 --- a/target/mips/tcg/system/special_helper.c +++ b/target/mips/tcg/system/special_helper.c @@ -26,7 +26,7 @@ #include "internal.h" =20 /* Specials */ -target_ulong helper_di(CPUMIPSState *env) +target_ulong HELPER(di)(CPUMIPSState *env) { target_ulong t0 =3D env->CP0_Status; =20 @@ -34,7 +34,7 @@ target_ulong helper_di(CPUMIPSState *env) return t0; } =20 -target_ulong helper_ei(CPUMIPSState *env) +target_ulong HELPER(ei)(CPUMIPSState *env) { target_ulong t0 =3D env->CP0_Status; =20 @@ -115,19 +115,19 @@ static inline void exception_return(CPUMIPSState *env) debug_post_eret(env); } =20 -void helper_eret(CPUMIPSState *env) +void HELPER(eret)(CPUMIPSState *env) { exception_return(env); env->CP0_LLAddr =3D 1; env->lladdr =3D 1; } =20 -void helper_eretnc(CPUMIPSState *env) +void HELPER(eretnc)(CPUMIPSState *env) { exception_return(env); } =20 -void helper_deret(CPUMIPSState *env) +void HELPER(deret)(CPUMIPSState *env) { debug_pre_eret(env); =20 @@ -139,7 +139,7 @@ void helper_deret(CPUMIPSState *env) debug_post_eret(env); } =20 -void helper_cache(CPUMIPSState *env, target_ulong addr, uint32_t op) +void HELPER(cache)(CPUMIPSState *env, target_ulong addr, uint32_t op) { static const char *const type_name[] =3D { "Primary Instruction", diff --git a/target/mips/tcg/system/tlb_helper.c b/target/mips/tcg/system/t= lb_helper.c index 4398c6f80b4..0ff0c9c8717 100644 --- a/target/mips/tcg/system/tlb_helper.c +++ b/target/mips/tcg/system/tlb_helper.c @@ -273,32 +273,32 @@ static void r4k_helper_tlbr(CPUMIPSState *env) } } =20 -void helper_tlbwi(CPUMIPSState *env) +void HELPER(tlbwi)(CPUMIPSState *env) { env->tlb->helper_tlbwi(env); } =20 -void helper_tlbwr(CPUMIPSState *env) +void HELPER(tlbwr)(CPUMIPSState *env) { env->tlb->helper_tlbwr(env); } =20 -void helper_tlbp(CPUMIPSState *env) +void HELPER(tlbp)(CPUMIPSState *env) { env->tlb->helper_tlbp(env); } =20 -void helper_tlbr(CPUMIPSState *env) +void HELPER(tlbr)(CPUMIPSState *env) { env->tlb->helper_tlbr(env); } =20 -void helper_tlbinv(CPUMIPSState *env) +void HELPER(tlbinv)(CPUMIPSState *env) { env->tlb->helper_tlbinv(env); } =20 -void helper_tlbinvf(CPUMIPSState *env) +void HELPER(tlbinvf)(CPUMIPSState *env) { env->tlb->helper_tlbinvf(env); } @@ -338,7 +338,7 @@ static void global_invalidate_tlb(CPUMIPSState *env, cpu_mips_tlb_flush(env); } =20 -void helper_ginvt(CPUMIPSState *env, target_ulong arg, uint32_t type) +void HELPER(ginvt)(CPUMIPSState *env, target_ulong arg, uint32_t type) { bool invAll =3D type =3D=3D 0; bool invVA =3D type =3D=3D 1; diff --git a/target/mips/tcg/vr54xx_helper.c b/target/mips/tcg/vr54xx_helpe= r.c index 2255bd11163..6c47fa7edb4 100644 --- a/target/mips/tcg/vr54xx_helper.c +++ b/target/mips/tcg/vr54xx_helper.c @@ -44,97 +44,97 @@ static inline target_ulong set_HI_LOT0(CPUMIPSState *en= v, uint64_t HILO) } =20 /* Multiplication variants of the vr54xx. */ -target_ulong helper_muls(CPUMIPSState *env, target_ulong arg1, - target_ulong arg2) +target_ulong HELPER(muls)(CPUMIPSState *env, target_ulong arg1, + target_ulong arg2) { return set_HI_LOT0(env, 0 - ((int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2)); } =20 -target_ulong helper_mulsu(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(mulsu)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HI_LOT0(env, 0 - (uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2); } =20 -target_ulong helper_macc(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(macc)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HI_LOT0(env, (int64_t)get_HILO(env) + (int64_t)(int32_t)arg= 1 * (int64_t)(int32_t)arg= 2); } =20 -target_ulong helper_macchi(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(macchi)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HIT0_LO(env, (int64_t)get_HILO(env) + (int64_t)(int32_t)arg= 1 * (int64_t)(int32_t)arg2); } =20 -target_ulong helper_maccu(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(maccu)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HI_LOT0(env, (uint64_t)get_HILO(env) + (uint64_t)(uint32_t)= arg1 * (uint64_t)(uint32_t)= arg2); } =20 -target_ulong helper_macchiu(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(macchiu)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HIT0_LO(env, (uint64_t)get_HILO(env) + (uint64_t)(uint32_t)= arg1 * (uint64_t)(uint32_t)= arg2); } =20 -target_ulong helper_msac(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(msac)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HI_LOT0(env, (int64_t)get_HILO(env) - (int64_t)(int32_t)arg= 1 * (int64_t)(int32_t)arg= 2); } =20 -target_ulong helper_msachi(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(msachi)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HIT0_LO(env, (int64_t)get_HILO(env) - (int64_t)(int32_t)arg= 1 * (int64_t)(int32_t)arg= 2); } =20 -target_ulong helper_msacu(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(msacu)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HI_LOT0(env, (uint64_t)get_HILO(env) - (uint64_t)(uint32_t)= arg1 * (uint64_t)(uint32_t)= arg2); } =20 -target_ulong helper_msachiu(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(msachiu)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HIT0_LO(env, (uint64_t)get_HILO(env) - (uint64_t)(uint32_t)= arg1 * (uint64_t)(uint32_t)= arg2); } =20 -target_ulong helper_mulhi(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(mulhi)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HIT0_LO(env, (int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg= 2); } =20 -target_ulong helper_mulhiu(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(mulhiu)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HIT0_LO(env, (uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2); } =20 -target_ulong helper_mulshi(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(mulshi)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HIT0_LO(env, 0 - (int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2); } =20 -target_ulong helper_mulshiu(CPUMIPSState *env, target_ulong arg1, +target_ulong HELPER(mulshiu)(CPUMIPSState *env, target_ulong arg1, target_ulong arg2) { return set_HIT0_LO(env, 0 - (uint64_t)(uint32_t)arg1 * --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772702; cv=none; d=zohomail.com; s=zohoarc; b=DRyi8iRxUD3w+AxKaIn56bRoeRTuQzK2CLWoi+yzgubekWPNQ9Ej4TBDj0ooW+fGlopbxhxsl6Mz1fFbhiAy3aTJTkibTg31yPfW7tSvw1OOcO0PFUvR5msykfK25y7Vwu/uEb6GLH+E1wEN4Uj12O76nTtsovN+yrH+faZciBk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772702; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=2FL0W+f79pWQwOpI6aYfBDDNVTS9hr4EUrQnY0Ni014=; b=aMSaXw+VZnViTQDiV6Kf1sVwn+knBDnFzGGdF4Xq5qMBOKfAA1uAc4jRYDCJ/a7nT3J/ww6ygUkWrmbcJ573i5kCDr4uZYyJM4ziWwbpM2bVdCHBo7NU8UbRudpjoEbZnf97uQb8tvIBzkAIAisd80KhFeNPfbFHd9MobCTS9jY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772702264350.4273162832085; Fri, 23 Oct 2026 09:25:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI26-00048j-28; Fri, 23 Oct 2026 12:22:18 -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 1xKI1o-0003oP-OV for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:02 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI1l-00034R-V1 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:21:59 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6qu33001100 for ; Fri, 23 Oct 2026 16:21:55 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7cn0wf7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:21:55 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93ca9b53afaso321127485a.0 for ; Fri, 23 Oct 2026 09:21:55 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2a92a4444sm16540645e9.5.2026.10.23.09.21.53 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 2FL0W+f79pWQwOpI6aYfBDDNVTS9hr4EUrQnY0Ni014=; b=KQ1xJn0OpdBBlJ5z FdX5X3Wz4bz0Y4d8d/4FXfhrz49rw9Z86g1FkqmhG9mEfNFCorJTXmVTLtsMPv0b wOeLLaWnWqzRGCL7pMowMll8BS6BngahtD4xAfKE6rGovxsxcsYK8J1RhCz437t5 RCvDf7xRPvFxezILuYBjnZFlS9EV19NxP5TeeWr2O6c18jdWjgSJiWRAGC7wS+mn ZAaYdk/zf9vhkZ5lKG5dRj5NhvVMyi3SiCp7G9Y+bBVsJjxOE4msIB6qH3ncePrJ DfkW7I0ARQ64gvSraIXOx5rMRaUd/7k4TKTviOcLW4B5/xjXzvWR/oLN7snLAXwY /c5EZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772515; x=1793377315; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2FL0W+f79pWQwOpI6aYfBDDNVTS9hr4EUrQnY0Ni014=; b=FGUSegQdF6vqE0qHJVvYcu3dnKvGS+7llEtormq6W0NGmjO9c6WeH5JeanRLofXi+v 9tmbAhsritpfSBYOL6s5fdZt/tRFJt5zVKOdRLc9y8RfgRCSHy8l23IDhLD0en9PL0TZ E+PEb2blqg95NeT8Cd5eT5UidPdTNFQRDvegSOA+cD4aTocDO+EQNCXT4KXNIAr7rC0J 4Jeusj12I2ELW0ZxTJlU2wdDwryIfAqGAT88hNc7eFesLXWpfpIL9ibqUnrcZqBBTkPD vod7d8+XNpicJ7k9B13nVPiQqlKXrJzSK5JBrIqVAAtycrHg0ReK1myky5oHbUCFclDQ 5n2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772515; x=1793377315; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=2FL0W+f79pWQwOpI6aYfBDDNVTS9hr4EUrQnY0Ni014=; b=TgsA1El4w+fkQdfVcRniu5FbkpoS3UpAM8JGYL/ZZPctZ+EwVImtyCIHW/AbehzvNm dzluhHzO9wT4d9awMjuZAGfeYyrYA+hyFbFpstIqqhePoYBj9MfItwiDYRlFyYGNNw2l m/ImU+r+XppmRLvL0TWzInAHKfDm0vw6NfRjOErWFdsb357Lxx9THZrBlByam+Wha9YL FyqRWMLrO4IH8MDnGQ2vfofYhYe0Hv4KrZb8/GVsRJuyu0qij2nXh3o2C0Lw3fJttZKL 8K8s6th/3V8PBvfdKo0LZx0tXEOn1gRZOyThGuOblr7x1wk5NWzM4jUhVIC4XKhfZ/Se 6TNA== X-Gm-Message-State: AFq9FYK9VuI7MMmSqWqnpgYaroZ3WoHtqYp5x1qdRU3AqLH7Q6svF7mw vce1x63s0uTtZ0Ll2zipTQ1J8o/Esrgvot0xE9SLXl5lGbDe7L3K4eg79zCtdEMeqhFIEClWT1/ u/fifF7Cj3foXmoeXrEsfx5gWUBGKYckYCOxU8G4J/HC2KqkIaYsesZ47S2eEeYnrQZNa X-Gm-Gg: AYBFou3RWuHdSdEhPRN+GpRwDB+eypD3u5Y7s9ZfhezEylEabbNpQp4weiyalkAht8f cnw0TtX1FTcajpVgCR06IX11EiJqlGagknqMuW/GwnIGVKo2rMGWztHSe3Ko+fRmq74XBgkaYrX 4DvmBFLjDPcev1OO8ao37Rc/OVG/+fAVzJFRFL8Qp0xWXE3kB04jDDMXRVx3hQtjtZkvH4sP0p4 /DxQYfT98i/pZg3p5PLA71xzYD4L6Z53a0wdmYj7LNPWQ+5B7KgWaGvnZbuttoNo48QWVCvgOTR vbH0JY48poAAbCfsiCuWJQSjSuNcBFq3HYizoIZYLBEgyULmGJskB5C1Rcfly/Vy0ruXdhh2sag +wlOMDvold6FI5Xg0JjrlSETL3JzUHDfIvdlmH0Nx X-Received: by 2002:a05:620a:4515:b0:93f:26d6:d70b with SMTP id af79cd13be357-93f6f787243mr517704185a.29.1792772515033; Fri, 23 Oct 2026 09:21:55 -0700 (PDT) X-Received: by 2002:a05:620a:4515:b0:93f:26d6:d70b with SMTP id af79cd13be357-93f6f787243mr517696585a.29.1792772514193; Fri, 23 Oct 2026 09:21:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 69/83] target/or1k: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:17 +0200 Message-ID: <20261023161332.60153-70-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX9WWGe79ANP9F IpbBWHP2AoA1fyh4UqAd4TS/ngyHu8LrDkhf/HyFskHB8t9bdpK7qAYx6tHx9cZ5oBRloDDx/kf ZI8xkldP9yki03G2LWu0CwSrJpy+hTFpwHH+OWhkgKhn7pihp433yOof0XGj8ONZU483JUg9/8H wuXEonuT/ZblUWwNu83QRdHmEk04PN7Km+M+XnjEiE1JGP8CoFiUsuwrk8JEXFfXkRhOuKQqC3I OWWeDjbwSSfnq5vycoMQ1pHSurZeOP4dRElRo4GT7gdIH67LkdZ1keznw+/M2zrn2C3KuuPn1DH Y1pnCAxswPfWcgMD58rvtfHlBB+KnoIeY/d+M334QUprkDsEvjK7m3WeC9aDIh7K/UTgCshWfpo QH9SlkRWAU5eqjc/SIAXz1AFw9AGD/lJ5qS97nqlu9CWSbmtSiW8SARx1vOKUlWr38x1+6w3b2a RWApHp8R/nkwz2yzB9Q== X-Proofpoint-GUID: 2aXw59U5-xyx60CC7ew5httZ30Z2jEvb X-Authority-Analysis: v=2.4 cv=a9mlZkSF c=1 sm=1 tr=0 ts=6adb89a3 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=UVNzukUmG7bquJPxmdsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: 2aXw59U5-xyx60CC7ew5httZ30Z2jEvb X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX9H2y/BEdeLSE cJGlsETyTgQZ+I2EXwpgHUJk6BibCFOu2x9Gk8Hgdr9VMD9kJIKXsVuIbv9kmCPw10U0ENiU+4j UliCXyrc50rd86BJYJxQL3Yo+CsDTvA= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772703959158501 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-11-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/or1k/fpu_helper.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/or1k/fpu_helper.c b/target/or1k/fpu_helper.c index e680606d4da..3c2aff64e9a 100644 --- a/target/or1k/fpu_helper.c +++ b/target/or1k/fpu_helper.c @@ -114,10 +114,10 @@ uint32_t HELPER(dtos)(CPUOpenRISCState *env, uint64_t= val) } =20 #define FLOAT_CALC(name) \ -uint64_t helper_float_ ## name ## _d(CPUOpenRISCState *env, \ +uint64_t HELPER(float_ ## name ## _d)(CPUOpenRISCState *env, \ uint64_t fdt0, uint64_t fdt1) \ { return float64_ ## name(fdt0, fdt1, &env->fp_status); } \ -uint32_t helper_float_ ## name ## _s(CPUOpenRISCState *env, \ +uint32_t HELPER(float_ ## name ## _s)(CPUOpenRISCState *env, \ uint32_t fdt0, uint32_t fdt1) \ { return float32_ ## name(fdt0, fdt1, &env->fp_status); } =20 @@ -129,7 +129,7 @@ FLOAT_CALC(rem) #undef FLOAT_CALC =20 =20 -uint64_t helper_float_madd_d(CPUOpenRISCState *env, uint64_t a, +uint64_t HELPER(float_madd_d)(CPUOpenRISCState *env, uint64_t a, uint64_t b, uint64_t c) { /* Note that or1ksim doesn't use fused operation. */ @@ -137,7 +137,7 @@ uint64_t helper_float_madd_d(CPUOpenRISCState *env, uin= t64_t a, return float64_add(a, b, &env->fp_status); } =20 -uint32_t helper_float_madd_s(CPUOpenRISCState *env, uint32_t a, +uint32_t HELPER(float_madd_s)(CPUOpenRISCState *env, uint32_t a, uint32_t b, uint32_t c) { /* Note that or1ksim doesn't use fused operation. */ @@ -147,10 +147,10 @@ uint32_t helper_float_madd_s(CPUOpenRISCState *env, u= int32_t a, =20 =20 #define FLOAT_CMP(name, impl) \ -uint32_t helper_float_ ## name ## _d(CPUOpenRISCState *env, \ +uint32_t HELPER(float_ ## name ## _d)(CPUOpenRISCState *env, \ uint64_t fdt0, uint64_t fdt1) \ { return float64_ ## impl(fdt0, fdt1, &env->fp_status); } \ -uint32_t helper_float_ ## name ## _s(CPUOpenRISCState *env, \ +uint32_t HELPER(float_ ## name ## _s)(CPUOpenRISCState *env, \ uint32_t fdt0, uint32_t fdt1) \ { return float32_ ## impl(fdt0, fdt1, &env->fp_status); } =20 @@ -161,13 +161,13 @@ FLOAT_CMP(un, unordered_quiet) #undef FLOAT_CMP =20 #define FLOAT_UCMP(name, expr) \ -uint32_t helper_float_ ## name ## _d(CPUOpenRISCState *env, \ +uint32_t HELPER(float_ ## name ## _d)(CPUOpenRISCState *env, \ uint64_t fdt0, uint64_t fdt1) \ { \ FloatRelation r =3D float64_compare_quiet(fdt0, fdt1, &env->fp_status)= ; \ return expr; \ } \ -uint32_t helper_float_ ## name ## _s(CPUOpenRISCState *env, \ +uint32_t HELPER(float_ ## name ## _s)(CPUOpenRISCState *env, \ uint32_t fdt0, uint32_t fdt1) \ { \ FloatRelation r =3D float32_compare_quiet(fdt0, fdt1, &env->fp_status)= ; \ --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772546; cv=none; d=zohomail.com; s=zohoarc; b=lGQJnxUOWp6/JbnVIj6S4rz+9kZ1xOVgd5X/l4SJBD6FlWiKv/TubQhI8RvvgMCbJakI6wryJkU1yAD9zV9Dnr+eKptPiEhJkyWpzYtffIGgyBQHFzCznXr4SOC42jbR/up/00hjsIfwQfycvb/cbUn9BBac9Pa9ugGIip2sXLY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772546; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Cfo5Zjz+G8fT9wy1RQd9UsnnSTsGLIYNjqx/yW9Iekk=; b=ZTP+sENyP3O0c8eRuT9vau1TbvBBpNEL0MDZ9zeI7yp+beSMWZ+O7Tg4ny7zmix1ovl0Q4h+x3dxtVSZQAcdYQrNqR73o2zHOAo2t239A8VEV3IZUMptuMqECifBYdzRvIhZeIQyiKKC+0Cku9QdxRoBL8IAzxIlygycz165Sbg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772546705571.2590728409368; Fri, 23 Oct 2026 09:22:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI28-0004T1-Sc; Fri, 23 Oct 2026 12:22:21 -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 1xKI21-0003yk-Gp for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:13 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI1w-00035E-TD for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:13 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG3r5T3812282 for ; Fri, 23 Oct 2026 16:22:07 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas882e2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:22:07 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-92e82060977so215938785a.1 for ; Fri, 23 Oct 2026 09:22:07 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d235ebesm749153f8f.0.2026.10.23.09.22.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Cfo5Zjz+G8fT9wy1RQd9UsnnSTsGLIYNjqx/yW9Iekk=; b=VPdO4f/wBvW8u0lK fuBTfTKFR4V7RaHdon5A5bSlgPfzAyrogmYz4u/fFsxffvURV8YwO5Y7L8tc5zgz xGLw9yj2qTS/zn4q0te33QodjbS96O0qqQ7qu27cN/d+kPFscWvu4Dfu8fUGZSkd oyoGb23r0Lse2JW45jsGyQJpZLX2alDj2wHvo/Ryfc8/OhNHosZWs9Nz7JXLk3sL M7GvYbVK0Gt0Wks4mk/mHglcroPD0xNgHmcjMqfFgVwtIqyuHyxWvNX9KJUdROjx MVHHWs9IqPpsWaeSci16oFND4mVUAF56lP2a4BhAywcaTI2/8AwPmtnzYYVD6Pfh bu+qbg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772526; x=1793377326; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Cfo5Zjz+G8fT9wy1RQd9UsnnSTsGLIYNjqx/yW9Iekk=; b=StvRqFAbxPGslDVKx1pi7D/oJQgxh4hrynCukEde+H3hXwA3qDgsAH8l23FA+tL+VP 8msAtGRQdO4jv3D2L+Y0w4Tv9UVd2mO9/fkBDPw8Ate4zs+PPerUxHe7+SlmxN2LDlR5 0DVrMYXlcUjjEbZT3lASHV+WCIIjF7j0OM4t1AfzGg4PPR774URXyuAMDLMLIQPrfKHM onFE2uUuwd9rkzLW524fUw4Kfc+MDbkm1CjeXqNMueXyLZ0cSwVXGvFhdp4ygXg0pOpm H3eO/a9n7QzNaRRG/ajUwQWrC6/6fJfA71ahFbCFAP+HBAyvRF9H1Y5aVLLGOPAkCiJ1 074Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772526; x=1793377326; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Cfo5Zjz+G8fT9wy1RQd9UsnnSTsGLIYNjqx/yW9Iekk=; b=VS994caYUnGRltnUqoEXk+/Bfhh/Z2YOynx5vAN1zyAHV/eY96/8O8QP0G5JHh8XSK vhaMg7usXFHaMuUHDuw2oW8cXwiSg2oDxJ9md1fX8xMRG3Ch4iL7Q7AknfL7km92kqun Xg9lcpTBeQyU547lkfShRHoApLEDCgy8B6dPJFnm0wttQQpfH8UGmS9uqRzCrk5b0qAf WulhJE/KbEhJLi9/F+bioORjat1SQJgqLNVRYV6+Zbo8FDY9yZRVLsqvmv4P34QsdWT9 qf9L3S+u5ScIWVAHfL8Q8rz6YYH5fyrv3cLApXkqH4ehJj59bQbTcnt0Yumo4h3gO8sT 72ug== X-Gm-Message-State: AFq9FYKveARxerGQvJ0uxH3Xj2VRdNEifglcXQh8sWQ+sK6QspNIpFMz mj6l9bhg+dSG/QveHJFx9QkShlBxVtKk6HwauCqk1MhY31Iy4QWkG0hlys2wsVNinxAqVNj3Y9Z 81qJ4sWL2LQ14+PBZSGvfeU7oVME8TwwnpR/x03gwOTMZQWPs+DC0HZdl6FMmlYsd58C+ X-Gm-Gg: AYBFou11RJ27DRoYE6jh9WHpD/4LhkYMiCdyAWOihE2DJq+t1NZb5PkqiAxYcwQbUn1 v0aFFBzp0yNX/7J52JLGSGvgJ+mI7BAZLyfqlz/liP/fMOTuZj6R1K9xwoXv4cVvqrAD3DvASmL NvXXwCERMghW9cwr6OSGCvqN9cCS/3EZO7fs6rJM/AVHbfXdur9LIDKpr52KjBLXofqqdqOvn6R mDfCPUYod1Aydvb+kYAXZAkL7HezaZXzs1AeOD+8idHY4Hw/9pFtbcrEUtXwRSyIOlm5Ei2nt94 yjL+6ogcXdjx36BiBy7l75ThiHDlZJJBSgNOhzk3qKRJMLPHxajaTfNrcW+rKPrT9jOVOlStFo8 ozfL7lWEloBHFQmexI4I66Anlq/sRWlc6Ku2y5Xo5 X-Received: by 2002:a05:620a:29d6:b0:93f:3120:6c65 with SMTP id af79cd13be357-93f62795ea4mr981094085a.32.1792772523987; Fri, 23 Oct 2026 09:22:03 -0700 (PDT) X-Received: by 2002:a05:620a:29d6:b0:93f:3120:6c65 with SMTP id af79cd13be357-93f62795ea4mr981079285a.32.1792772521960; Fri, 23 Oct 2026 09:22:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 70/83] target/ppc: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:18 +0200 Message-ID: <20261023161332.60153-71-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX0S/6fb/Ml2I8 hrXPZiC1tNt8RvB+MyPL6XYghrtzYz10RDaYz+PpxqTPat431mS3QnkbBDFqRDpxFM9KtJlPnJJ QzGUP17tGfPpsTXwReQTc92AYZQmLFA= X-Authority-Analysis: v=2.4 cv=OPqyTiaB c=1 sm=1 tr=0 ts=6adb89af cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=ZaxVYpkp1FYCZxp_qcgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=O8hF6Hzn-FEA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX7Rc+yOlRy18l A6LVBXQsyNJ5jYOvoHMqXNxbJLrs+sNwjurlVmuIXY0T0A7rFwm+eZuOjZq/0hj1oOToQQOTAJ5 6xRVbjnhL88Y/1M/2XdFRoinPcaOF+6ztdprTxAzssmoeUru+5Oaxjr7ZvodRGEoNvx+o0qBhE1 a6BE3ITJ2LrdcspUoJwTxHQXbF1MLyN42dZaf+Mt4wiuGaGgSnSnkLb0DfydA7Ob/CcoY9DZhwP J1JGw5ogPHyC7XxP3wR02Dcq3e0y7A5RsHgYOwx5AMedBkNcd1eDy/MhGHmGiNqGnUnUjKcz64K Re+/NSd1jRMj1lF7bO7VM2i+tKzSA6vnYk8wnafqTBkJHtUns94mfl8eKl29GeQ83hPeStPo4cR 6D77fJnzhE4EowA5DMnSE/JQpI85mfCfQ9HpSIuCNzxzCknnPy/Ll4haXTh+hfWlxV8H65oAUy6 +C0BXNlbkAkHAmHtBTQ== X-Proofpoint-GUID: ZQRQ8JrugOqDjLdNgGBxpouJ09DhANSB X-Proofpoint-ORIG-GUID: ZQRQ8JrugOqDjLdNgGBxpouJ09DhANSB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772547086158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-12-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/ppc/internal.h | 7 +- target/ppc/dfp_helper.c | 52 ++-- target/ppc/fpu_helper.c | 396 ++++++++++++++-------------- target/ppc/int_helper.c | 292 ++++++++++---------- target/ppc/mem_helper.c | 28 +- target/ppc/misc_helper.c | 56 ++-- target/ppc/mmu-hash64.c | 18 +- target/ppc/mmu_helper.c | 70 ++--- target/ppc/power8-pmu.c | 14 +- target/ppc/tcg-excp_helper.c | 56 ++-- target/ppc/timebase_helper.c | 54 ++-- target/ppc/translate/vsx-impl.c.inc | 2 +- 12 files changed, 526 insertions(+), 519 deletions(-) diff --git a/target/ppc/internal.h b/target/ppc/internal.h index 11fa4ee5417..8ba12eb63db 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -22,6 +22,7 @@ #include "exec/memop.h" #include "hw/core/registerfields.h" #include "exec/page-protection.h" +#include "exec/helper-head.h.inc" =20 /** * ppc_env_is_64bit: @@ -241,9 +242,9 @@ EXTRACT_HELPER(IMM8, 11, 8); EXTRACT_HELPER(DCMX, 16, 7); EXTRACT_HELPER_SPLIT_3(DCMX_XV, 5, 16, 0, 1, 2, 5, 1, 6, 6); =20 -void helper_compute_fprf_float16(CPUPPCState *env, float16 arg); -void helper_compute_fprf_float32(CPUPPCState *env, float32 arg); -void helper_compute_fprf_float128(CPUPPCState *env, float128 arg); +void HELPER(compute_fprf_float16)(CPUPPCState *env, float16 arg); +void HELPER(compute_fprf_float32)(CPUPPCState *env, float32 arg); +void HELPER(compute_fprf_float128)(CPUPPCState *env, float128 arg); =20 /* translate.c */ =20 diff --git a/target/ppc/dfp_helper.c b/target/ppc/dfp_helper.c index ecc3f793267..b529e1cb486 100644 --- a/target/ppc/dfp_helper.c +++ b/target/ppc/dfp_helper.c @@ -427,7 +427,7 @@ static inline int dfp_get_digit(decNumber *dn, int n) } =20 #define DFP_HELPER_TAB(op, dnop, postprocs, size) = \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, = \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, = \ ppc_fprp_t *b) = \ { = \ struct PPC_DFP dfp; = \ @@ -493,7 +493,7 @@ DFP_HELPER_TAB(DDIV, decNumberDivide, DIV_PPs, 64) DFP_HELPER_TAB(DDIVQ, decNumberDivide, DIV_PPs, 128) =20 #define DFP_HELPER_BF_AB(op, dnop, postprocs, size) = \ -uint32_t helper_##op(CPUPPCState *env, ppc_fprp_t *a, ppc_fprp_t *b) = \ +uint32_t HELPER(op)(CPUPPCState *env, ppc_fprp_t *a, ppc_fprp_t *b) = \ { = \ struct PPC_DFP dfp; = \ dfp_prepare_decimal##size(&dfp, a, b, env); = \ @@ -525,7 +525,7 @@ DFP_HELPER_BF_AB(DCMPO, decNumberCompare, CMPO_PPs, 64) DFP_HELPER_BF_AB(DCMPOQ, decNumberCompare, CMPO_PPs, 128) =20 #define DFP_HELPER_TSTDC(op, size) \ -uint32_t helper_##op(CPUPPCState *env, ppc_fprp_t *a, uint32_t dcm) \ +uint32_t HELPER(op)(CPUPPCState *env, ppc_fprp_t *a, uint32_t dcm) \ { \ struct PPC_DFP dfp; \ int match =3D 0; = \ @@ -553,7 +553,7 @@ DFP_HELPER_TSTDC(DTSTDC, 64) DFP_HELPER_TSTDC(DTSTDCQ, 128) =20 #define DFP_HELPER_TSTDG(op, size) \ -uint32_t helper_##op(CPUPPCState *env, ppc_fprp_t *a, uint32_t dcm) \ +uint32_t HELPER(op)(CPUPPCState *env, ppc_fprp_t *a, uint32_t dcm) \ { \ struct PPC_DFP dfp; \ int minexp, maxexp, nzero_digits, nzero_idx, is_negative, is_zero, \ @@ -608,7 +608,7 @@ DFP_HELPER_TSTDG(DTSTDG, 64) DFP_HELPER_TSTDG(DTSTDGQ, 128) =20 #define DFP_HELPER_TSTEX(op, size) \ -uint32_t helper_##op(CPUPPCState *env, ppc_fprp_t *a, ppc_fprp_t *b) \ +uint32_t HELPER(op)(CPUPPCState *env, ppc_fprp_t *a, ppc_fprp_t *b) \ { \ struct PPC_DFP dfp; \ int expa, expb, a_is_special, b_is_special; \ @@ -640,7 +640,7 @@ DFP_HELPER_TSTEX(DTSTEX, 64) DFP_HELPER_TSTEX(DTSTEXQ, 128) =20 #define DFP_HELPER_TSTSF(op, size) \ -uint32_t helper_##op(CPUPPCState *env, ppc_fprp_t *a, ppc_fprp_t *b) \ +uint32_t HELPER(op)(CPUPPCState *env, ppc_fprp_t *a, ppc_fprp_t *b) \ { \ struct PPC_DFP dfp; \ unsigned k; \ @@ -677,7 +677,7 @@ DFP_HELPER_TSTSF(DTSTSF, 64) DFP_HELPER_TSTSF(DTSTSFQ, 128) =20 #define DFP_HELPER_TSTSFI(op, size) \ -uint32_t helper_##op(CPUPPCState *env, uint32_t a, ppc_fprp_t *b) \ +uint32_t HELPER(op)(CPUPPCState *env, uint32_t a, ppc_fprp_t *b) \ { \ struct PPC_DFP dfp; \ unsigned uim; \ @@ -737,7 +737,7 @@ static void dfp_quantize(uint8_t rmc, struct PPC_DFP *d= fp) } =20 #define DFP_HELPER_QUAI(op, size) \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b, \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b, \ uint32_t te, uint32_t rmc) \ { \ struct PPC_DFP dfp; \ @@ -758,7 +758,7 @@ DFP_HELPER_QUAI(DQUAI, 64) DFP_HELPER_QUAI(DQUAIQ, 128) =20 #define DFP_HELPER_QUA(op, size) \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ ppc_fprp_t *b, uint32_t rmc) \ { \ struct PPC_DFP dfp; \ @@ -830,7 +830,7 @@ static void _dfp_reround(uint8_t rmc, int32_t ref_sig, = int32_t xmax, } =20 #define DFP_HELPER_RRND(op, size) \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ ppc_fprp_t *b, uint32_t rmc) \ { \ struct PPC_DFP dfp; \ @@ -854,7 +854,7 @@ DFP_HELPER_RRND(DRRND, 64) DFP_HELPER_RRND(DRRNDQ, 128) =20 #define DFP_HELPER_RINT(op, postprocs, size) = \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b, = \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b, = \ uint32_t r, uint32_t rmc) = \ { = \ struct PPC_DFP dfp; = \ @@ -888,7 +888,7 @@ static void RINTN_PPs(struct PPC_DFP *dfp) DFP_HELPER_RINT(DRINTN, RINTN_PPs, 64) DFP_HELPER_RINT(DRINTNQ, RINTN_PPs, 128) =20 -void helper_DCTDP(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) +void HELPER(DCTDP)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) { struct PPC_DFP dfp; ppc_vsr_t vb; @@ -904,7 +904,7 @@ void helper_DCTDP(CPUPPCState *env, ppc_fprp_t *t, ppc_= fprp_t *b) dfp_set_FPRF_from_FRT(&dfp); } =20 -void helper_DCTQPQ(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) +void HELPER(DCTQPQ)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) { struct PPC_DFP dfp; ppc_vsr_t vb; @@ -919,7 +919,7 @@ void helper_DCTQPQ(CPUPPCState *env, ppc_fprp_t *t, ppc= _fprp_t *b) set_dfp128(t, &dfp.vt); } =20 -void helper_DRSP(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) +void HELPER(DRSP)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) { struct PPC_DFP dfp; uint32_t t_short =3D 0; @@ -937,7 +937,7 @@ void helper_DRSP(CPUPPCState *env, ppc_fprp_t *t, ppc_f= prp_t *b) set_dfp64(t, &vt); } =20 -void helper_DRDPQ(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) +void HELPER(DRDPQ)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) { struct PPC_DFP dfp; dfp_prepare_decimal128(&dfp, 0, b, env); @@ -956,7 +956,7 @@ void helper_DRDPQ(CPUPPCState *env, ppc_fprp_t *t, ppc_= fprp_t *b) } =20 #define DFP_HELPER_CFFIX(op, size) = \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) = \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) = \ { = \ struct PPC_DFP dfp; = \ ppc_vsr_t vb; = \ @@ -978,7 +978,7 @@ static void CFFIX_PPs(struct PPC_DFP *dfp) DFP_HELPER_CFFIX(DCFFIX, 64) DFP_HELPER_CFFIX(DCFFIXQ, 128) =20 -void helper_DCFFIXQQ(CPUPPCState *env, ppc_fprp_t *t, ppc_avr_t *b) +void HELPER(DCFFIXQQ)(CPUPPCState *env, ppc_fprp_t *t, ppc_avr_t *b) { struct PPC_DFP dfp; =20 @@ -991,7 +991,7 @@ void helper_DCFFIXQQ(CPUPPCState *env, ppc_fprp_t *t, p= pc_avr_t *b) } =20 #define DFP_HELPER_CTFIX(op, size) = \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) = \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) = \ { = \ struct PPC_DFP dfp; = \ dfp_prepare_decimal##size(&dfp, 0, b, env); = \ @@ -1028,7 +1028,7 @@ void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc= _fprp_t *b) \ DFP_HELPER_CTFIX(DCTFIX, 64) DFP_HELPER_CTFIX(DCTFIXQ, 128) =20 -void helper_DCTFIXQQ(CPUPPCState *env, ppc_avr_t *t, ppc_fprp_t *b) +void HELPER(DCTFIXQQ)(CPUPPCState *env, ppc_avr_t *t, ppc_fprp_t *b) { struct PPC_DFP dfp; dfp_prepare_decimal128(&dfp, 0, b, env); @@ -1103,7 +1103,7 @@ static inline void dfp_set_sign_128(ppc_vsr_t *t, uin= t8_t sgn) } =20 #define DFP_HELPER_DEDPD(op, size) \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b, \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b, \ uint32_t sp) \ { \ struct PPC_DFP dfp; \ @@ -1168,7 +1168,7 @@ static inline void dfp_invalid_op_vxcvi_128(struct PP= C_DFP *dfp) } =20 #define DFP_HELPER_ENBCD(op, size) = \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b, = \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b, = \ uint32_t s) = \ { = \ struct PPC_DFP dfp; = \ @@ -1228,7 +1228,7 @@ DFP_HELPER_ENBCD(DENBCD, 64) DFP_HELPER_ENBCD(DENBCDQ, 128) =20 #define DFP_HELPER_XEX(op, size) \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *b) \ { \ struct PPC_DFP dfp; \ ppc_vsr_t vt; \ @@ -1274,7 +1274,7 @@ static void dfp_set_raw_exp_128(ppc_vsr_t *t, uint64_= t raw) } =20 #define DFP_HELPER_IEX(op, size) \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ ppc_fprp_t *b) \ { \ struct PPC_DFP dfp; \ @@ -1368,7 +1368,7 @@ static void dfp_clear_lmd_from_g5msb(uint64_t *t) } =20 #define DFP_HELPER_SHIFT(op, size, shift_left) \ -void helper_##op(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ +void HELPER(op)(CPUPPCState *env, ppc_fprp_t *t, ppc_fprp_t *a, \ uint32_t sh) \ { \ struct PPC_DFP dfp; \ @@ -1417,7 +1417,7 @@ DFP_HELPER_SHIFT(DSCLIQ, 128, 1) DFP_HELPER_SHIFT(DSCRI, 64, 0) DFP_HELPER_SHIFT(DSCRIQ, 128, 0) =20 -target_ulong helper_CDTBCD(target_ulong s) +target_ulong HELPER(CDTBCD)(target_ulong s) { uint64_t res =3D 0; uint32_t dec32, declets; @@ -1443,7 +1443,7 @@ target_ulong helper_CDTBCD(target_ulong s) return res; } =20 -target_ulong helper_CBCDTD(target_ulong s) +target_ulong HELPER(CBCDTD)(target_ulong s) { uint64_t res =3D 0; uint32_t dec32; diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index c1bdde9e104..b2ca14a1584 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -60,7 +60,7 @@ static inline bool fp_exceptions_enabled(CPUPPCState *env) * This is the non-arithmatic conversion that happens e.g. on loads. * In the Power ISA pseudocode, this is called DOUBLE. */ -uint64_t helper_todouble(uint32_t arg) +uint64_t HELPER(todouble)(uint32_t arg) { uint32_t abs_arg =3D arg & 0x7fffffff; uint64_t ret; @@ -104,7 +104,7 @@ uint64_t helper_todouble(uint32_t arg) * This is the non-arithmatic conversion that happens e.g. on stores. * In the Power ISA pseudocode, this is called SINGLE. */ -uint32_t helper_tosingle(uint64_t arg) +uint32_t HELPER(tosingle)(uint64_t arg) { int exp =3D extract64(arg, 52, 11); uint32_t ret; @@ -141,7 +141,7 @@ static inline int ppc_float64_get_unbiased_exp(float64 = f) } =20 #define COMPUTE_FPRF(tp) \ -void helper_compute_fprf_##tp(CPUPPCState *env, tp arg) \ +void HELPER(compute_fprf_##tp)(CPUPPCState *env, tp arg) \ { \ bool neg =3D tp##_is_neg(arg); \ target_ulong fprf; \ @@ -354,7 +354,7 @@ static inline void float_inexact_excp(CPUPPCState *env) } } =20 -void helper_fpscr_clrbit(CPUPPCState *env, uint32_t bit) +void HELPER(fpscr_clrbit)(CPUPPCState *env, uint32_t bit) { uint32_t mask =3D 1u << bit; if (env->fpscr & mask) { @@ -362,7 +362,7 @@ void helper_fpscr_clrbit(CPUPPCState *env, uint32_t bit) } } =20 -void helper_fpscr_setbit(CPUPPCState *env, uint32_t bit) +void HELPER(fpscr_setbit)(CPUPPCState *env, uint32_t bit) { uint32_t mask =3D 1u << bit; if (!(env->fpscr & mask)) { @@ -370,7 +370,7 @@ void helper_fpscr_setbit(CPUPPCState *env, uint32_t bit) } } =20 -void helper_store_fpscr(CPUPPCState *env, uint64_t val, uint32_t nibbles) +void HELPER(store_fpscr)(CPUPPCState *env, uint64_t val, uint32_t nibbles) { target_ulong mask =3D 0; int i; @@ -434,7 +434,7 @@ static void do_fpscr_check_status(CPUPPCState *env, uin= tptr_t raddr) } } =20 -void helper_fpscr_check_status(CPUPPCState *env) +void HELPER(fpscr_check_status)(CPUPPCState *env) { do_fpscr_check_status(env, GETPC()); } @@ -468,12 +468,12 @@ static void do_float_check_status(CPUPPCState *env, b= ool change_fi, } } =20 -void helper_float_check_status(CPUPPCState *env) +void HELPER(float_check_status)(CPUPPCState *env) { do_float_check_status(env, true, GETPC()); } =20 -void helper_reset_fpstatus(CPUPPCState *env) +void HELPER(reset_fpstatus)(CPUPPCState *env) { set_float_exception_flags(0, &env->fp_status); } @@ -552,7 +552,7 @@ static uint64_t float_invalid_cvt(CPUPPCState *env, int= flags, } =20 #define FPU_FCTI(op, cvt, nanval) \ -uint64_t helper_##op(CPUPPCState *env, float64 arg) \ +uint64_t HELPER(op)(CPUPPCState *env, float64 arg) \ { \ uint64_t ret =3D float64_to_##cvt(arg, &env->fp_status); \ int flags =3D get_float_exception_flags(&env->fp_status); \ @@ -572,7 +572,7 @@ FPU_FCTI(FCTIDU, uint64, 0x0000000000000000ULL) FPU_FCTI(FCTIDUZ, uint64_round_to_zero, 0x0000000000000000ULL) =20 #define FPU_FCFI(op, cvtr, is_single) \ -uint64_t helper_##op(CPUPPCState *env, uint64_t arg) \ +uint64_t HELPER(op)(CPUPPCState *env, uint64_t arg) \ { \ CPU_DoubleU farg; \ \ @@ -613,22 +613,22 @@ static uint64_t do_fri(CPUPPCState *env, uint64_t arg, return arg; } =20 -uint64_t helper_FRIN(CPUPPCState *env, uint64_t arg) +uint64_t HELPER(FRIN)(CPUPPCState *env, uint64_t arg) { return do_fri(env, arg, float_round_ties_away); } =20 -uint64_t helper_FRIZ(CPUPPCState *env, uint64_t arg) +uint64_t HELPER(FRIZ)(CPUPPCState *env, uint64_t arg) { return do_fri(env, arg, float_round_to_zero); } =20 -uint64_t helper_FRIP(CPUPPCState *env, uint64_t arg) +uint64_t HELPER(FRIP)(CPUPPCState *env, uint64_t arg) { return do_fri(env, arg, float_round_up); } =20 -uint64_t helper_FRIM(CPUPPCState *env, uint64_t arg) +uint64_t HELPER(FRIM)(CPUPPCState *env, uint64_t arg) { return do_fri(env, arg, float_round_down); } @@ -668,10 +668,10 @@ static uint64_t do_fmadds(CPUPPCState *env, float64 a= , float64 b, } =20 #define FPU_FMADD(op, madd_flags) \ - uint64_t helper_##op(CPUPPCState *env, uint64_t arg1, \ + uint64_t HELPER(op)(CPUPPCState *env, uint64_t arg1, \ uint64_t arg2, uint64_t arg3) \ { return do_fmadd(env, arg1, arg2, arg3, madd_flags, GETPC()); } \ - uint64_t helper_##op##S(CPUPPCState *env, uint64_t arg1, \ + uint64_t HELPER(op##S)(CPUPPCState *env, uint64_t arg1, \ uint64_t arg2, uint64_t arg3) \ { return do_fmadds(env, arg1, arg2, arg3, madd_flags, GETPC()); } =20 @@ -694,10 +694,10 @@ static uint64_t do_frsp(CPUPPCState *env, uint64_t ar= g, uintptr_t retaddr) if (unlikely(flags & float_flag_invalid_snan)) { float_invalid_op_vxsnan(env, retaddr); } - return helper_todouble(f32); + return HELPER(todouble)(f32); } =20 -uint64_t helper_FRSP(CPUPPCState *env, uint64_t arg) +uint64_t HELPER(FRSP)(CPUPPCState *env, uint64_t arg) { return do_frsp(env, arg, GETPC()); } @@ -713,7 +713,7 @@ static void float_invalid_op_sqrt(CPUPPCState *env, int= flags, } =20 #define FPU_FSQRT(name, op) = \ -float64 helper_##name(CPUPPCState *env, float64 arg) = \ +float64 HELPER(name)(CPUPPCState *env, float64 arg) = \ { = \ float64 ret =3D op(arg, &env->fp_status); = \ int flags =3D get_float_exception_flags(&env->fp_status); = \ @@ -729,7 +729,7 @@ FPU_FSQRT(FSQRT, float64_sqrt) FPU_FSQRT(FSQRTS, float64r32_sqrt) =20 #define FPU_FRE(name, op) = \ -float64 helper_##name(CPUPPCState *env, float64 arg) = \ +float64 HELPER(name)(CPUPPCState *env, float64 arg) = \ { = \ /* "Estimate" the reciprocal with actual division. */ = \ float64 ret =3D op(float64_one, arg, &env->fp_status); = \ @@ -748,7 +748,7 @@ float64 helper_##name(CPUPPCState *env, float64 arg) = \ } =20 #define FPU_FRSQRTE(name, op) = \ -float64 helper_##name(CPUPPCState *env, float64 arg) = \ +float64 HELPER(name)(CPUPPCState *env, float64 arg) = \ { = \ /* "Estimate" the reciprocal with actual division. */ = \ float64 rets =3D float64_sqrt(arg, &env->fp_status); = \ @@ -767,7 +767,7 @@ float64 helper_##name(CPUPPCState *env, float64 arg) = \ } =20 #define FPU_HELPER(name, op, flags_handler) = \ -float64 helper_##name(CPUPPCState *env, float64 arg1, float64 arg2) = \ +float64 HELPER(name)(CPUPPCState *env, float64 arg1, float64 arg2) = \ { = \ float64 ret =3D op(arg1, arg2, &env->fp_status); = \ int flags =3D get_float_exception_flags(&env->fp_status); = \ @@ -790,7 +790,7 @@ FPU_HELPER(FDIV, float64_div, div_flags_handler) FPU_HELPER(FDIVS, float64r32_div, div_flags_handler) =20 /* fsel - fsel. */ -uint64_t helper_FSEL(uint64_t a, uint64_t b, uint64_t c) +uint64_t HELPER(FSEL)(uint64_t a, uint64_t b, uint64_t c) { CPU_DoubleU fa; =20 @@ -804,7 +804,7 @@ uint64_t helper_FSEL(uint64_t a, uint64_t b, uint64_t c) } } =20 -uint32_t helper_FTDIV(uint64_t fra, uint64_t frb) +uint32_t HELPER(FTDIV)(uint64_t fra, uint64_t frb) { int fe_flag =3D 0; int fg_flag =3D 0; @@ -840,7 +840,7 @@ uint32_t helper_FTDIV(uint64_t fra, uint64_t frb) return 0x8 | (fg_flag ? 4 : 0) | (fe_flag ? 2 : 0); } =20 -uint32_t helper_FTSQRT(uint64_t frb) +uint32_t HELPER(FTSQRT)(uint64_t frb) { int fe_flag =3D 0; int fg_flag =3D 0; @@ -871,7 +871,7 @@ uint32_t helper_FTSQRT(uint64_t frb) return 0x8 | (fg_flag ? 4 : 0) | (fe_flag ? 2 : 0); } =20 -void helper_FCMPU(CPUPPCState *env, uint64_t arg1, uint64_t arg2, +void HELPER(FCMPU)(CPUPPCState *env, uint64_t arg1, uint64_t arg2, uint32_t crfD) { CPU_DoubleU farg1, farg2; @@ -902,7 +902,7 @@ void helper_FCMPU(CPUPPCState *env, uint64_t arg1, uint= 64_t arg2, } } =20 -void helper_FCMPO(CPUPPCState *env, uint64_t arg1, uint64_t arg2, +void HELPER(FCMPO)(CPUPPCState *env, uint64_t arg1, uint64_t arg2, uint32_t crfD) { CPU_DoubleU farg1, farg2; @@ -1063,7 +1063,7 @@ static inline uint32_t efsctuf(CPUPPCState *env, uint= 32_t val) } =20 #define HELPER_SPE_SINGLE_CONV(name) \ - uint32_t helper_e##name(CPUPPCState *env, uint32_t val) \ + uint32_t HELPER(e##name)(CPUPPCState *env, uint32_t val) \ { \ return e##name(env, val); \ } @@ -1089,7 +1089,7 @@ HELPER_SPE_SINGLE_CONV(fsctsf); HELPER_SPE_SINGLE_CONV(fsctuf); =20 #define HELPER_SPE_VECTOR_CONV(name) \ - uint64_t helper_ev##name(CPUPPCState *env, uint64_t val) \ + uint64_t HELPER(ev##name)(CPUPPCState *env, uint64_t val) \ { \ return ((uint64_t)e##name(env, val >> 32) << 32) | \ (uint64_t)e##name(env, val); \ @@ -1157,7 +1157,7 @@ static inline uint32_t efsdiv(CPUPPCState *env, uint3= 2_t op1, uint32_t op2) } =20 #define HELPER_SPE_SINGLE_ARITH(name) \ - uint32_t helper_e##name(CPUPPCState *env, uint32_t op1, uint32_t op2) \ + uint32_t HELPER(e##name)(CPUPPCState *env, uint32_t op1, uint32_t op2)= \ { \ return e##name(env, op1, op2); \ } @@ -1171,7 +1171,7 @@ HELPER_SPE_SINGLE_ARITH(fsmul); HELPER_SPE_SINGLE_ARITH(fsdiv); =20 #define HELPER_SPE_VECTOR_ARITH(name) \ - uint64_t helper_ev##name(CPUPPCState *env, uint64_t op1, uint64_t op2)= \ + uint64_t HELPER(ev##name)(CPUPPCState *env, uint64_t op1, uint64_t op2= ) \ { \ return ((uint64_t)e##name(env, op1 >> 32, op2 >> 32) << 32) | \ (uint64_t)e##name(env, op1, op2); \ @@ -1232,7 +1232,7 @@ static inline uint32_t efststeq(CPUPPCState *env, uin= t32_t op1, uint32_t op2) } =20 #define HELPER_SINGLE_SPE_CMP(name) \ - uint32_t helper_e##name(CPUPPCState *env, uint32_t op1, uint32_t op2) \ + uint32_t HELPER(e##name)(CPUPPCState *env, uint32_t op1, uint32_t op2)= \ { \ return e##name(env, op1, op2); \ } @@ -1255,7 +1255,7 @@ static inline uint32_t evcmp_merge(int t0, int t1) } =20 #define HELPER_VECTOR_SPE_CMP(name) \ - uint32_t helper_ev##name(CPUPPCState *env, uint64_t op1, uint64_t op2)= \ + uint32_t HELPER(ev##name)(CPUPPCState *env, uint64_t op1, uint64_t op2= ) \ { \ return evcmp_merge(e##name(env, op1 >> 32, op2 >> 32), \ e##name(env, op1, op2)); \ @@ -1274,7 +1274,7 @@ HELPER_VECTOR_SPE_CMP(fscmpgt); HELPER_VECTOR_SPE_CMP(fscmpeq); =20 /* Double-precision floating-point conversion */ -uint64_t helper_efdcfsi(CPUPPCState *env, uint32_t val) +uint64_t HELPER(efdcfsi)(CPUPPCState *env, uint32_t val) { CPU_DoubleU u; =20 @@ -1283,7 +1283,7 @@ uint64_t helper_efdcfsi(CPUPPCState *env, uint32_t va= l) return u.ll; } =20 -uint64_t helper_efdcfsid(CPUPPCState *env, uint64_t val) +uint64_t HELPER(efdcfsid)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; =20 @@ -1292,7 +1292,7 @@ uint64_t helper_efdcfsid(CPUPPCState *env, uint64_t v= al) return u.ll; } =20 -uint64_t helper_efdcfui(CPUPPCState *env, uint32_t val) +uint64_t HELPER(efdcfui)(CPUPPCState *env, uint32_t val) { CPU_DoubleU u; =20 @@ -1301,7 +1301,7 @@ uint64_t helper_efdcfui(CPUPPCState *env, uint32_t va= l) return u.ll; } =20 -uint64_t helper_efdcfuid(CPUPPCState *env, uint64_t val) +uint64_t HELPER(efdcfuid)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; =20 @@ -1310,7 +1310,7 @@ uint64_t helper_efdcfuid(CPUPPCState *env, uint64_t v= al) return u.ll; } =20 -uint32_t helper_efdctsi(CPUPPCState *env, uint64_t val) +uint32_t HELPER(efdctsi)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; =20 @@ -1323,7 +1323,7 @@ uint32_t helper_efdctsi(CPUPPCState *env, uint64_t va= l) return float64_to_int32(u.d, &env->vec_status); } =20 -uint32_t helper_efdctui(CPUPPCState *env, uint64_t val) +uint32_t HELPER(efdctui)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; =20 @@ -1336,7 +1336,7 @@ uint32_t helper_efdctui(CPUPPCState *env, uint64_t va= l) return float64_to_uint32(u.d, &env->vec_status); } =20 -uint32_t helper_efdctsiz(CPUPPCState *env, uint64_t val) +uint32_t HELPER(efdctsiz)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; =20 @@ -1349,7 +1349,7 @@ uint32_t helper_efdctsiz(CPUPPCState *env, uint64_t v= al) return float64_to_int32_round_to_zero(u.d, &env->vec_status); } =20 -uint64_t helper_efdctsidz(CPUPPCState *env, uint64_t val) +uint64_t HELPER(efdctsidz)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; =20 @@ -1362,7 +1362,7 @@ uint64_t helper_efdctsidz(CPUPPCState *env, uint64_t = val) return float64_to_int64_round_to_zero(u.d, &env->vec_status); } =20 -uint32_t helper_efdctuiz(CPUPPCState *env, uint64_t val) +uint32_t HELPER(efdctuiz)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; =20 @@ -1375,7 +1375,7 @@ uint32_t helper_efdctuiz(CPUPPCState *env, uint64_t v= al) return float64_to_uint32_round_to_zero(u.d, &env->vec_status); } =20 -uint64_t helper_efdctuidz(CPUPPCState *env, uint64_t val) +uint64_t HELPER(efdctuidz)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; =20 @@ -1388,7 +1388,7 @@ uint64_t helper_efdctuidz(CPUPPCState *env, uint64_t = val) return float64_to_uint64_round_to_zero(u.d, &env->vec_status); } =20 -uint64_t helper_efdcfsf(CPUPPCState *env, uint32_t val) +uint64_t HELPER(efdcfsf)(CPUPPCState *env, uint32_t val) { CPU_DoubleU u; float64 tmp; @@ -1400,7 +1400,7 @@ uint64_t helper_efdcfsf(CPUPPCState *env, uint32_t va= l) return u.ll; } =20 -uint64_t helper_efdcfuf(CPUPPCState *env, uint32_t val) +uint64_t HELPER(efdcfuf)(CPUPPCState *env, uint32_t val) { CPU_DoubleU u; float64 tmp; @@ -1412,7 +1412,7 @@ uint64_t helper_efdcfuf(CPUPPCState *env, uint32_t va= l) return u.ll; } =20 -uint32_t helper_efdctsf(CPUPPCState *env, uint64_t val) +uint32_t HELPER(efdctsf)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; float64 tmp; @@ -1428,7 +1428,7 @@ uint32_t helper_efdctsf(CPUPPCState *env, uint64_t va= l) return float64_to_int32(u.d, &env->vec_status); } =20 -uint32_t helper_efdctuf(CPUPPCState *env, uint64_t val) +uint32_t HELPER(efdctuf)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u; float64 tmp; @@ -1444,7 +1444,7 @@ uint32_t helper_efdctuf(CPUPPCState *env, uint64_t va= l) return float64_to_uint32(u.d, &env->vec_status); } =20 -uint32_t helper_efscfd(CPUPPCState *env, uint64_t val) +uint32_t HELPER(efscfd)(CPUPPCState *env, uint64_t val) { CPU_DoubleU u1; CPU_FloatU u2; @@ -1455,7 +1455,7 @@ uint32_t helper_efscfd(CPUPPCState *env, uint64_t val) return u2.l; } =20 -uint64_t helper_efdcfs(CPUPPCState *env, uint32_t val) +uint64_t HELPER(efdcfs)(CPUPPCState *env, uint32_t val) { CPU_DoubleU u2; CPU_FloatU u1; @@ -1467,7 +1467,7 @@ uint64_t helper_efdcfs(CPUPPCState *env, uint32_t val) } =20 /* Double precision fixed-point arithmetic */ -uint64_t helper_efdadd(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint64_t HELPER(efdadd)(CPUPPCState *env, uint64_t op1, uint64_t op2) { CPU_DoubleU u1, u2; =20 @@ -1477,7 +1477,7 @@ uint64_t helper_efdadd(CPUPPCState *env, uint64_t op1= , uint64_t op2) return u1.ll; } =20 -uint64_t helper_efdsub(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint64_t HELPER(efdsub)(CPUPPCState *env, uint64_t op1, uint64_t op2) { CPU_DoubleU u1, u2; =20 @@ -1487,7 +1487,7 @@ uint64_t helper_efdsub(CPUPPCState *env, uint64_t op1= , uint64_t op2) return u1.ll; } =20 -uint64_t helper_efdmul(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint64_t HELPER(efdmul)(CPUPPCState *env, uint64_t op1, uint64_t op2) { CPU_DoubleU u1, u2; =20 @@ -1497,7 +1497,7 @@ uint64_t helper_efdmul(CPUPPCState *env, uint64_t op1= , uint64_t op2) return u1.ll; } =20 -uint64_t helper_efddiv(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint64_t HELPER(efddiv)(CPUPPCState *env, uint64_t op1, uint64_t op2) { CPU_DoubleU u1, u2; =20 @@ -1508,7 +1508,7 @@ uint64_t helper_efddiv(CPUPPCState *env, uint64_t op1= , uint64_t op2) } =20 /* Double precision floating point helpers */ -uint32_t helper_efdtstlt(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint32_t HELPER(efdtstlt)(CPUPPCState *env, uint64_t op1, uint64_t op2) { CPU_DoubleU u1, u2; =20 @@ -1517,7 +1517,7 @@ uint32_t helper_efdtstlt(CPUPPCState *env, uint64_t o= p1, uint64_t op2) return float64_lt(u1.d, u2.d, &env->vec_status) ? 4 : 0; } =20 -uint32_t helper_efdtstgt(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint32_t HELPER(efdtstgt)(CPUPPCState *env, uint64_t op1, uint64_t op2) { CPU_DoubleU u1, u2; =20 @@ -1526,7 +1526,7 @@ uint32_t helper_efdtstgt(CPUPPCState *env, uint64_t o= p1, uint64_t op2) return float64_le(u1.d, u2.d, &env->vec_status) ? 0 : 4; } =20 -uint32_t helper_efdtsteq(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint32_t HELPER(efdtsteq)(CPUPPCState *env, uint64_t op1, uint64_t op2) { CPU_DoubleU u1, u2; =20 @@ -1535,22 +1535,22 @@ uint32_t helper_efdtsteq(CPUPPCState *env, uint64_t= op1, uint64_t op2) return float64_eq_quiet(u1.d, u2.d, &env->vec_status) ? 4 : 0; } =20 -uint32_t helper_efdcmplt(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint32_t HELPER(efdcmplt)(CPUPPCState *env, uint64_t op1, uint64_t op2) { /* XXX: TODO: test special values (NaN, infinites, ...) */ - return helper_efdtstlt(env, op1, op2); + return HELPER(efdtstlt)(env, op1, op2); } =20 -uint32_t helper_efdcmpgt(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint32_t HELPER(efdcmpgt)(CPUPPCState *env, uint64_t op1, uint64_t op2) { /* XXX: TODO: test special values (NaN, infinites, ...) */ - return helper_efdtstgt(env, op1, op2); + return HELPER(efdtstgt)(env, op1, op2); } =20 -uint32_t helper_efdcmpeq(CPUPPCState *env, uint64_t op1, uint64_t op2) +uint32_t HELPER(efdcmpeq)(CPUPPCState *env, uint64_t op1, uint64_t op2) { /* XXX: TODO: test special values (NaN, infinites, ...) */ - return helper_efdtsteq(env, op1, op2); + return HELPER(efdtsteq)(env, op1, op2); } =20 #define float64_to_float64(x, env) x @@ -1566,13 +1566,13 @@ uint32_t helper_efdcmpeq(CPUPPCState *env, uint64_t= op1, uint64_t op2) * sfifprf - set FI and FPRF */ #define VSX_ADD_SUB(name, op, nels, tp, fld, sfifprf, r2sp) = \ -void helper_##name(CPUPPCState *env, ppc_vsr_t *xt, = \ +void HELPER(name)(CPUPPCState *env, ppc_vsr_t *xt, = \ ppc_vsr_t *xa, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ int i; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ for (i =3D 0; i < nels; i++) { = \ float_status tstat =3D env->fp_status; = \ @@ -1590,7 +1590,7 @@ void helper_##name(CPUPPCState *env, ppc_vsr_t *xt, = \ } = \ = \ if (sfifprf) { = \ - helper_compute_fprf_float64(env, t.fld); = \ + HELPER(compute_fprf_float64)(env, t.fld); = \ } = \ } = \ *xt =3D t; = \ @@ -1606,13 +1606,13 @@ VSX_ADD_SUB(XSSUBSP, sub, 1, float64, VsrD(0), 1, 1) VSX_ADD_SUB(XVSUBDP, sub, 2, float64, VsrD(i), 0, 0) VSX_ADD_SUB(XVSUBSP, sub, 4, float32, VsrW(i), 0, 0) =20 -void helper_xsaddqp(CPUPPCState *env, uint32_t opcode, +void HELPER(xsaddqp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xt, ppc_vsr_t *xa, ppc_vsr_t *xb) { ppc_vsr_t t =3D *xt; float_status tstat; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 tstat =3D env->fp_status; if (unlikely(Rc(opcode) !=3D 0)) { @@ -1627,7 +1627,7 @@ void helper_xsaddqp(CPUPPCState *env, uint32_t opcode, float_invalid_op_addsub(env, tstat.float_exception_flags, 1, GETPC= ()); } =20 - helper_compute_fprf_float128(env, t.f128); + HELPER(compute_fprf_float128)(env, t.f128); =20 *xt =3D t; do_float_check_status(env, true, GETPC()); @@ -1642,13 +1642,13 @@ void helper_xsaddqp(CPUPPCState *env, uint32_t opco= de, * sfifprf - set FI and FPRF */ #define VSX_MUL(op, nels, tp, fld, sfifprf, r2sp) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, = \ ppc_vsr_t *xa, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ int i; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ for (i =3D 0; i < nels; i++) { = \ float_status tstat =3D env->fp_status; = \ @@ -1666,7 +1666,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, = \ } = \ = \ if (sfifprf) { = \ - helper_compute_fprf_float64(env, t.fld); = \ + HELPER(compute_fprf_float64)(env, t.fld); = \ } = \ } = \ = \ @@ -1679,13 +1679,13 @@ VSX_MUL(XSMULSP, 1, float64, VsrD(0), 1, 1) VSX_MUL(XVMULDP, 2, float64, VsrD(i), 0, 0) VSX_MUL(XVMULSP, 4, float32, VsrW(i), 0, 0) =20 -void helper_xsmulqp(CPUPPCState *env, uint32_t opcode, +void HELPER(xsmulqp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xt, ppc_vsr_t *xa, ppc_vsr_t *xb) { ppc_vsr_t t =3D *xt; float_status tstat; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); tstat =3D env->fp_status; if (unlikely(Rc(opcode) !=3D 0)) { set_float_rounding_mode(float_round_to_odd, &tstat); @@ -1698,7 +1698,7 @@ void helper_xsmulqp(CPUPPCState *env, uint32_t opcode, if (unlikely(tstat.float_exception_flags & float_flag_invalid)) { float_invalid_op_mul(env, tstat.float_exception_flags, 1, GETPC()); } - helper_compute_fprf_float128(env, t.f128); + HELPER(compute_fprf_float128)(env, t.f128); =20 *xt =3D t; do_float_check_status(env, true, GETPC()); @@ -1713,13 +1713,13 @@ void helper_xsmulqp(CPUPPCState *env, uint32_t opco= de, * sfifprf - set FI and FPRF */ #define VSX_DIV(op, nels, tp, fld, sfifprf, r2sp) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, = \ ppc_vsr_t *xa, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ int i; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ for (i =3D 0; i < nels; i++) { = \ float_status tstat =3D env->fp_status; = \ @@ -1740,7 +1740,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, = \ } = \ = \ if (sfifprf) { = \ - helper_compute_fprf_float64(env, t.fld); = \ + HELPER(compute_fprf_float64)(env, t.fld); = \ } = \ } = \ = \ @@ -1753,13 +1753,13 @@ VSX_DIV(XSDIVSP, 1, float64, VsrD(0), 1, 1) VSX_DIV(XVDIVDP, 2, float64, VsrD(i), 0, 0) VSX_DIV(XVDIVSP, 4, float32, VsrW(i), 0, 0) =20 -void helper_xsdivqp(CPUPPCState *env, uint32_t opcode, +void HELPER(xsdivqp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xt, ppc_vsr_t *xa, ppc_vsr_t *xb) { ppc_vsr_t t =3D *xt; float_status tstat; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); tstat =3D env->fp_status; if (unlikely(Rc(opcode) !=3D 0)) { set_float_rounding_mode(float_round_to_odd, &tstat); @@ -1776,7 +1776,7 @@ void helper_xsdivqp(CPUPPCState *env, uint32_t opcode, float_zero_divide_excp(env, GETPC()); } =20 - helper_compute_fprf_float128(env, t.f128); + HELPER(compute_fprf_float128)(env, t.f128); *xt =3D t; do_float_check_status(env, true, GETPC()); } @@ -1790,12 +1790,12 @@ void helper_xsdivqp(CPUPPCState *env, uint32_t opco= de, * sfifprf - set FI and FPRF */ #define VSX_RE(op, nels, tp, fld, sfifprf, r2sp) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ int i; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ for (i =3D 0; i < nels; i++) { = \ if (unlikely(tp##_is_signaling_nan(xb->fld, &env->fp_status))) { = \ @@ -1808,7 +1808,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *xb) \ } = \ = \ if (sfifprf) { = \ - helper_compute_fprf_float64(env, t.fld); = \ + HELPER(compute_fprf_float64)(env, t.fld); = \ } = \ } = \ = \ @@ -1830,12 +1830,12 @@ VSX_RE(xvresp, 4, float32, VsrW(i), 0, 0) * sfifprf - set FI and FPRF */ #define VSX_SQRT(op, nels, tp, fld, sfifprf, r2sp) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ int i; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ for (i =3D 0; i < nels; i++) { = \ float_status tstat =3D env->fp_status; = \ @@ -1853,7 +1853,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *xb) \ } = \ = \ if (sfifprf) { = \ - helper_compute_fprf_float64(env, t.fld); = \ + HELPER(compute_fprf_float64)(env, t.fld); = \ } = \ } = \ = \ @@ -1875,12 +1875,12 @@ VSX_SQRT(xvsqrtsp, 4, float32, VsrW(i), 0, 0) * sfifprf - set FI and FPRF */ #define VSX_RSQRTE(op, nels, tp, fld, sfifprf, r2sp) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ int i; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ for (i =3D 0; i < nels; i++) { = \ float_status tstat =3D env->fp_status; = \ @@ -1897,7 +1897,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *xb) \ } = \ = \ if (sfifprf) { = \ - helper_compute_fprf_float64(env, t.fld); = \ + HELPER(compute_fprf_float64)(env, t.fld); = \ } = \ } = \ = \ @@ -1921,7 +1921,7 @@ VSX_RSQRTE(xvrsqrtesp, 4, float32, VsrW(i), 0, 0) * nbits - number of fraction bits */ #define VSX_TDIV(op, nels, tp, fld, emin, emax, nbits) \ -void helper_##op(CPUPPCState *env, uint32_t opcode, \ +void HELPER(op)(CPUPPCState *env, uint32_t opcode, \ ppc_vsr_t *xa, ppc_vsr_t *xb) \ { \ int i; \ @@ -1978,7 +1978,7 @@ VSX_TDIV(xvtdivsp, 4, float32, VsrW(i), -126, 127, 23) * nbits - number of fraction bits */ #define VSX_TSQRT(op, nels, tp, fld, emin, nbits) \ -void helper_##op(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xb) \ +void HELPER(op)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xb) \ { \ int i; \ int fe_flag =3D 0; \ @@ -2031,13 +2031,13 @@ VSX_TSQRT(xvtsqrtsp, 4, float32, VsrW(i), -126, 23) * sfifprf - set FI and FPRF */ #define VSX_MADD(op, nels, tp, fld, maddflgs, sfifprf) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, = \ ppc_vsr_t *s1, ppc_vsr_t *s2, ppc_vsr_t *s3) = \ { = \ ppc_vsr_t t =3D { }; = \ int i; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ for (i =3D 0; i < nels; i++) { = \ float_status tstat =3D env->fp_status; = \ @@ -2051,7 +2051,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, = \ } = \ = \ if (sfifprf) { = \ - helper_compute_fprf_float64(env, t.fld); = \ + HELPER(compute_fprf_float64)(env, t.fld); = \ } = \ } = \ *xt =3D t; = \ @@ -2085,12 +2085,12 @@ VSX_MADD(xvnmsubsp, 4, float32, VsrW(i), NMSUB_FLGS= , 0) * ro - round to odd */ #define VSX_MADDQ(op, maddflgs, ro) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *s1, ppc_vsr_t= *s2,\ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *s1, ppc_vsr_t = *s2, \ ppc_vsr_t *s3) = \ { = \ ppc_vsr_t t =3D *xt; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ float_status tstat =3D env->fp_status; = \ set_float_exception_flags(0, &tstat); = \ @@ -2105,7 +2105,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *s1, ppc_vsr_t *s2,\ false, GETPC()); = \ } = \ = \ - helper_compute_fprf_float128(env, t.f128); = \ + HELPER(compute_fprf_float128)(env, t.f128); = \ *xt =3D t; = \ do_float_check_status(env, true, GETPC()); = \ } @@ -2128,13 +2128,13 @@ VSX_MADDQ(XSNMSUBQPO, NMSUB_FLGS, 0) * svxvc - set VXVC bit */ #define VSX_SCALAR_CMP(op, tp, cmp, fld, svxvc) = \ - void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, = \ + void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, = \ ppc_vsr_t *xa, ppc_vsr_t *xb) = \ { = \ int flags; = \ bool r, vxvc; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ if (svxvc) { = \ r =3D tp##_##cmp(xb->fld, xa->fld, &env->fp_status); = \ @@ -2166,7 +2166,7 @@ VSX_SCALAR_CMP(XSCMPEQQP, float128, eq, f128, 0) VSX_SCALAR_CMP(XSCMPGEQP, float128, le, f128, 1) VSX_SCALAR_CMP(XSCMPGTQP, float128, lt, f128, 1) =20 -void helper_xscmpexpdp(CPUPPCState *env, uint32_t opcode, +void HELPER(xscmpexpdp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, ppc_vsr_t *xb) { int64_t exp_a, exp_b; @@ -2195,7 +2195,7 @@ void helper_xscmpexpdp(CPUPPCState *env, uint32_t opc= ode, do_float_check_status(env, false, GETPC()); } =20 -void helper_xscmpexpqp(CPUPPCState *env, uint32_t opcode, +void HELPER(xscmpexpqp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, ppc_vsr_t *xb) { int64_t exp_a, exp_b; @@ -2230,7 +2230,7 @@ static inline void do_scalar_cmp(CPUPPCState *env, pp= c_vsr_t *xa, ppc_vsr_t *xb, uint32_t cc; bool vxsnan_flag =3D false, vxvc_flag =3D false; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 switch (float64_compare(xa->VsrD(0), xb->VsrD(0), &env->fp_status)) { case float_relation_less: @@ -2277,13 +2277,13 @@ static inline void do_scalar_cmp(CPUPPCState *env, = ppc_vsr_t *xa, ppc_vsr_t *xb, do_float_check_status(env, false, GETPC()); } =20 -void helper_xscmpodp(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, +void HELPER(xscmpodp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, ppc_vsr_t *xb) { do_scalar_cmp(env, xa, xb, BF(opcode), true); } =20 -void helper_xscmpudp(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, +void HELPER(xscmpudp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, ppc_vsr_t *xb) { do_scalar_cmp(env, xa, xb, BF(opcode), false); @@ -2295,7 +2295,7 @@ static inline void do_scalar_cmpq(CPUPPCState *env, p= pc_vsr_t *xa, uint32_t cc; bool vxsnan_flag =3D false, vxvc_flag =3D false; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 switch (float128_compare(xa->f128, xb->f128, &env->fp_status)) { case float_relation_less: @@ -2342,13 +2342,13 @@ static inline void do_scalar_cmpq(CPUPPCState *env,= ppc_vsr_t *xa, do_float_check_status(env, false, GETPC()); } =20 -void helper_xscmpoqp(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, +void HELPER(xscmpoqp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, ppc_vsr_t *xb) { do_scalar_cmpq(env, xa, xb, BF(opcode), true); } =20 -void helper_xscmpuqp(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, +void HELPER(xscmpuqp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xa, ppc_vsr_t *xb) { do_scalar_cmpq(env, xa, xb, BF(opcode), false); @@ -2363,7 +2363,7 @@ void helper_xscmpuqp(CPUPPCState *env, uint32_t opcod= e, ppc_vsr_t *xa, * fld - vsr_t field (VsrD(*) or VsrW(*)) */ #define VSX_MAX_MIN(name, op, nels, tp, fld) = \ -void helper_##name(CPUPPCState *env, ppc_vsr_t *xt, = \ +void HELPER(name)(CPUPPCState *env, ppc_vsr_t *xt, = \ ppc_vsr_t *xa, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ @@ -2389,13 +2389,13 @@ VSX_MAX_MIN(XVMINDP, minnum, 2, float64, VsrD(i)) VSX_MAX_MIN(XVMINSP, minnum, 4, float32, VsrW(i)) =20 #define VSX_MAX_MINC(name, max, tp, fld) = \ -void helper_##name(CPUPPCState *env, = \ +void HELPER(name)(CPUPPCState *env, = \ ppc_vsr_t *xt, ppc_vsr_t *xa, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ bool first; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ if (max) { = \ first =3D tp##_le_quiet(xb->fld, xa->fld, &env->fp_status); = \ @@ -2421,7 +2421,7 @@ VSX_MAX_MINC(XSMAXCQP, true, float128, f128); VSX_MAX_MINC(XSMINCQP, false, float128, f128); =20 #define VSX_MAX_MINJ(name, max) = \ -void helper_##name(CPUPPCState *env, = \ +void HELPER(name)(CPUPPCState *env, = \ ppc_vsr_t *xt, ppc_vsr_t *xa, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ @@ -2486,7 +2486,7 @@ VSX_MAX_MINJ(XSMINJDP, 0); * exp - expected result of comparison */ #define VSX_CMP(op, nels, tp, fld, cmp, svxvc, exp) \ -uint32_t helper_##op(CPUPPCState *env, ppc_vsr_t *xt, \ +uint32_t HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, \ ppc_vsr_t *xa, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D *xt; = \ @@ -2495,7 +2495,7 @@ uint32_t helper_##op(CPUPPCState *env, ppc_vsr_t *xt,= \ int all_true =3D 1; = \ int all_false =3D 1; = \ \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ \ for (i =3D 0; i < nels; i++) { = \ if (unlikely(tp##_is_any_nan(xa->fld) || \ @@ -2545,12 +2545,12 @@ VSX_CMP(XVCMPNESP, 4, float32, VsrW(i), eq, 0, 0) * sfifprf - set FI and FPRF */ #define VSX_CVT_FP_TO_FP(op, nels, stp, ttp, sfld, tfld, sfifprf) \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D { }; \ int i; \ \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ \ for (i =3D 0; i < nels; i++) { \ t.tfld =3D stp##_to_##ttp(xb->sfld, &env->fp_status); \ @@ -2560,7 +2560,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *xb) \ t.tfld =3D ttp##_snan_to_qnan(t.tfld); \ } \ if (sfifprf) { \ - helper_compute_fprf_##ttp(env, t.tfld); \ + HELPER(compute_fprf_##ttp)(env, t.tfld); \ } \ } \ \ @@ -2572,12 +2572,12 @@ VSX_CVT_FP_TO_FP(xscvspdp, 1, float32, float64, Vsr= W(0), VsrD(0), 1) VSX_CVT_FP_TO_FP(xvcvspdp, 2, float32, float64, VsrW(2 * i), VsrD(i), 0) =20 #define VSX_CVT_FP_TO_FP2(op, nels, stp, ttp, sfifprf) \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D { }; \ int i; \ \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ \ for (i =3D 0; i < nels; i++) { \ t.VsrW(2 * i) =3D stp##_to_##ttp(xb->VsrD(i), &env->fp_status); \ @@ -2587,7 +2587,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *xb) \ t.VsrW(2 * i) =3D ttp##_snan_to_qnan(t.VsrW(2 * i)); \ } \ if (sfifprf) { \ - helper_compute_fprf_##ttp(env, t.VsrW(2 * i)); \ + HELPER(compute_fprf_##ttp)(env, t.VsrW(2 * i)); \ } \ t.VsrW(2 * i + 1) =3D t.VsrW(2 * i); \ } \ @@ -2610,13 +2610,13 @@ VSX_CVT_FP_TO_FP2(xscvdpsp, 1, float64, float32, 1) * sfprf - set FPRF */ #define VSX_CVT_FP_TO_FP_VECTOR(op, nels, stp, ttp, sfld, tfld, sfprf) \ -void helper_##op(CPUPPCState *env, uint32_t opcode, \ +void HELPER(op)(CPUPPCState *env, uint32_t opcode, \ ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D *xt; \ int i; \ \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ \ for (i =3D 0; i < nels; i++) { \ t.tfld =3D stp##_to_##ttp(xb->sfld, &env->fp_status); \ @@ -2626,7 +2626,7 @@ void helper_##op(CPUPPCState *env, uint32_t opcode, = \ t.tfld =3D ttp##_snan_to_qnan(t.tfld); \ } \ if (sfprf) { \ - helper_compute_fprf_##ttp(env, t.tfld); \ + HELPER(compute_fprf_##ttp)(env, t.tfld); \ } \ } \ \ @@ -2648,12 +2648,12 @@ VSX_CVT_FP_TO_FP_VECTOR(xscvdpqp, 1, float64, float= 128, VsrD(0), f128, 1) * sfifprf - set FI and FPRF */ #define VSX_CVT_FP_TO_FP_HP(op, nels, stp, ttp, sfld, tfld, sfifprf) \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D { }; \ int i; \ \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ \ for (i =3D 0; i < nels; i++) { \ t.tfld =3D stp##_to_##ttp(xb->sfld, 1, &env->fp_status); \ @@ -2663,7 +2663,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *xb) \ t.tfld =3D ttp##_snan_to_qnan(t.tfld); \ } \ if (sfifprf) { \ - helper_compute_fprf_##ttp(env, t.tfld); \ + HELPER(compute_fprf_##ttp)(env, t.tfld); \ } \ } \ \ @@ -2676,12 +2676,12 @@ VSX_CVT_FP_TO_FP_HP(xscvhpdp, 1, float16, float64, = VsrH(3), VsrD(0), 1) VSX_CVT_FP_TO_FP_HP(xvcvsphp, 4, float32, float16, VsrW(i), VsrH(2 * i + = 1), 0) VSX_CVT_FP_TO_FP_HP(xvcvhpsp, 4, float16, float32, VsrH(2 * i + 1), VsrW(i= ), 0) =20 -void helper_XVCVSPBF16(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) +void HELPER(XVCVSPBF16)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) { ppc_vsr_t t =3D { }; int i, status; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 for (i =3D 0; i < 4; i++) { t.VsrH(2 * i + 1) =3D float32_to_bfloat16(xb->VsrW(i), &env->fp_st= atus); @@ -2696,13 +2696,13 @@ void helper_XVCVSPBF16(CPUPPCState *env, ppc_vsr_t = *xt, ppc_vsr_t *xb) do_float_check_status(env, false, GETPC()); } =20 -void helper_XSCVQPDP(CPUPPCState *env, uint32_t ro, ppc_vsr_t *xt, +void HELPER(XSCVQPDP)(CPUPPCState *env, uint32_t ro, ppc_vsr_t *xt, ppc_vsr_t *xb) { ppc_vsr_t t =3D { }; float_status tstat; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 tstat =3D env->fp_status; if (ro !=3D 0) { @@ -2715,17 +2715,17 @@ void helper_XSCVQPDP(CPUPPCState *env, uint32_t ro,= ppc_vsr_t *xt, float_invalid_op_vxsnan(env, GETPC()); t.VsrD(0) =3D float64_snan_to_qnan(t.VsrD(0)); } - helper_compute_fprf_float64(env, t.VsrD(0)); + HELPER(compute_fprf_float64)(env, t.VsrD(0)); =20 *xt =3D t; do_float_check_status(env, true, GETPC()); } =20 -uint64_t helper_xscvdpspn(CPUPPCState *env, uint64_t xb) +uint64_t HELPER(xscvdpspn)(CPUPPCState *env, uint64_t xb) { uint64_t result, sign, exp, frac; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); float_status tstat =3D env->fp_status; set_float_exception_flags(0, &tstat); =20 @@ -2762,9 +2762,9 @@ uint64_t helper_xscvdpspn(CPUPPCState *env, uint64_t = xb) return (result << 32) | result; } =20 -uint64_t helper_XSCVSPDPN(uint64_t xb) +uint64_t HELPER(XSCVSPDPN)(uint64_t xb) { - return helper_todouble(xb >> 32); + return HELPER(todouble)(xb >> 32); } =20 /* @@ -2779,14 +2779,14 @@ uint64_t helper_XSCVSPDPN(uint64_t xb) * rnan - resulting NaN */ #define VSX_CVT_FP_TO_INT(op, nels, stp, ttp, sfld, tfld, sfi, rnan) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ { = \ int all_flags =3D 0; = \ ppc_vsr_t t =3D { }; = \ int i, flags; = \ = \ for (i =3D 0; i < nels; i++) { = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ t.tfld =3D stp##_to_##ttp##_round_to_zero(xb->sfld, &env->fp_statu= s); \ flags =3D env->fp_status.float_exception_flags; = \ all_flags |=3D flags; = \ @@ -2816,12 +2816,12 @@ VSX_CVT_FP_TO_INT(xvcvspuxds, 2, float32, uint64, V= srW(2 * i), VsrD(i), \ VSX_CVT_FP_TO_INT(xvcvspuxws, 4, float32, uint32, VsrW(i), VsrW(i), false,= 0U) =20 #define VSX_CVT_FP_TO_INT128(op, tp, rnan) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t; = \ int flags; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ t.s128 =3D float128_to_##tp##_round_to_zero(xb->f128, &env->fp_status)= ; \ flags =3D get_float_exception_flags(&env->fp_status); = \ if (unlikely(flags & float_flag_invalid)) { = \ @@ -2846,14 +2846,14 @@ VSX_CVT_FP_TO_INT128(XSCVQPSQZ, int128, 0x800000000= 0000000ULL); * is required by this version of the architecture. */ #define VSX_CVT_FP_TO_INT2(op, nels, stp, ttp, sfi, rnan) = \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) = \ { = \ int all_flags =3D 0; = \ ppc_vsr_t t =3D { }; = \ int i, flags; = \ = \ for (i =3D 0; i < nels; i++) { = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ t.VsrW(2 * i) =3D stp##_to_##ttp##_round_to_zero(xb->VsrD(i), = \ &env->fp_status); = \ flags =3D env->fp_status.float_exception_flags; = \ @@ -2885,13 +2885,13 @@ VSX_CVT_FP_TO_INT2(xvcvdpuxws, 2, float64, uint32, = false, 0U) * rnan - resulting NaN */ #define VSX_CVT_FP_TO_INT_VECTOR(op, stp, ttp, sfld, tfld, rnan) = \ -void helper_##op(CPUPPCState *env, uint32_t opcode, = \ +void HELPER(op)(CPUPPCState *env, uint32_t opcode, = \ ppc_vsr_t *xt, ppc_vsr_t *xb) = \ { = \ ppc_vsr_t t =3D { }; = \ int flags; = \ = \ - helper_reset_fpstatus(env); = \ + HELPER(reset_fpstatus)(env); = \ = \ t.tfld =3D stp##_to_##ttp##_round_to_zero(xb->sfld, &env->fp_status); = \ flags =3D get_float_exception_flags(&env->fp_status); = \ @@ -2922,12 +2922,12 @@ VSX_CVT_FP_TO_INT_VECTOR(xscvqpuwz, float128, uint3= 2, f128, VsrD(0), 0x0ULL) * sfifprf - set FI and FPRF */ #define VSX_CVT_INT_TO_FP(op, nels, stp, ttp, sfld, tfld, sfifprf, r2sp)\ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D { }; \ int i; \ \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ \ for (i =3D 0; i < nels; i++) { \ t.tfld =3D stp##_to_##ttp(xb->sfld, &env->fp_status); \ @@ -2935,7 +2935,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *xb) \ t.tfld =3D do_frsp(env, t.tfld, GETPC()); \ } \ if (sfifprf) { \ - helper_compute_fprf_float64(env, t.tfld); \ + HELPER(compute_fprf_float64)(env, t.tfld); \ } \ } \ \ @@ -2955,7 +2955,7 @@ VSX_CVT_INT_TO_FP(xvcvsxwsp, 4, int32, float32, VsrW(= i), VsrW(i), 0, 0) VSX_CVT_INT_TO_FP(xvcvuxwsp, 4, uint32, float32, VsrW(i), VsrW(i), 0, 0) =20 #define VSX_CVT_INT_TO_FP2(op, stp, ttp) \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D { }; \ int i; \ @@ -2973,11 +2973,11 @@ VSX_CVT_INT_TO_FP2(xvcvsxdsp, int64, float32) VSX_CVT_INT_TO_FP2(xvcvuxdsp, uint64, float32) =20 #define VSX_CVT_INT128_TO_FP(op, tp) \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb)\ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ xt->f128 =3D tp##_to_float128(xb->s128, &env->fp_status); \ - helper_compute_fprf_float128(env, xt->f128); \ + HELPER(compute_fprf_float128)(env, xt->f128); \ do_float_check_status(env, true, GETPC()); \ } =20 @@ -2993,14 +2993,14 @@ VSX_CVT_INT128_TO_FP(XSCVSQQP, int128); * tfld - target vsr_t field */ #define VSX_CVT_INT_TO_FP_VECTOR(op, stp, ttp, sfld, tfld) \ -void helper_##op(CPUPPCState *env, uint32_t opcode, \ +void HELPER(op)(CPUPPCState *env, uint32_t opcode, \ ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D *xt; \ \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ t.tfld =3D stp##_to_##ttp(xb->sfld, &env->fp_status); \ - helper_compute_fprf_##ttp(env, t.tfld); \ + HELPER(compute_fprf_##ttp)(env, t.tfld); \ \ *xt =3D t; \ do_float_check_status(env, true, GETPC()); \ @@ -3026,13 +3026,13 @@ VSX_CVT_INT_TO_FP_VECTOR(xscvudqp, uint64, float128= , VsrD(0), f128) * sfifprf - set FI and FPRF */ #define VSX_ROUND(op, nels, tp, fld, rmode, sfifprf) \ -void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ +void HELPER(op)(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb) \ { \ ppc_vsr_t t =3D { }; \ int i; \ FloatRoundMode curr_rounding_mode; \ \ - helper_reset_fpstatus(env); \ + HELPER(reset_fpstatus)(env); \ \ if (rmode !=3D FLOAT_ROUND_CURRENT) { \ curr_rounding_mode =3D get_float_rounding_mode(&env->fp_status); \ @@ -3048,7 +3048,7 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt, ppc= _vsr_t *xb) \ t.fld =3D tp##_round_to_int(xb->fld, &env->fp_status); \ } \ if (sfifprf) { \ - helper_compute_fprf_float64(env, t.fld); \ + HELPER(compute_fprf_float64)(env, t.fld); \ } \ } \ \ @@ -3084,18 +3084,18 @@ VSX_ROUND(xvrspim, 4, float32, VsrW(i), float_round= _down, 0) VSX_ROUND(xvrspip, 4, float32, VsrW(i), float_round_up, 0) VSX_ROUND(xvrspiz, 4, float32, VsrW(i), float_round_to_zero, 0) =20 -uint64_t helper_xsrsp(CPUPPCState *env, uint64_t xb) +uint64_t HELPER(xsrsp)(CPUPPCState *env, uint64_t xb) { - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 uint64_t xt =3D do_frsp(env, xb, GETPC()); =20 - helper_compute_fprf_float64(env, xt); + HELPER(compute_fprf_float64)(env, xt); do_float_check_status(env, true, GETPC()); return xt; } =20 -void helper_XVXSIGSP(ppc_vsr_t *xt, ppc_vsr_t *xb) +void HELPER(XVXSIGSP)(ppc_vsr_t *xt, ppc_vsr_t *xb) { ppc_vsr_t t =3D { }; uint32_t exp, i, fraction; @@ -3134,7 +3134,7 @@ VSX_TSTDC(float64) VSX_TSTDC(float128) #undef VSX_TSTDC =20 -void helper_XVTSTDCDP(ppc_vsr_t *t, ppc_vsr_t *b, uint64_t dcmx, uint32_t = v) +void HELPER(XVTSTDCDP)(ppc_vsr_t *t, ppc_vsr_t *b, uint64_t dcmx, uint32_t= v) { int i; for (i =3D 0; i < 2; i++) { @@ -3142,7 +3142,7 @@ void helper_XVTSTDCDP(ppc_vsr_t *t, ppc_vsr_t *b, uin= t64_t dcmx, uint32_t v) } } =20 -void helper_XVTSTDCSP(ppc_vsr_t *t, ppc_vsr_t *b, uint64_t dcmx, uint32_t = v) +void HELPER(XVTSTDCSP)(ppc_vsr_t *t, ppc_vsr_t *b, uint64_t dcmx, uint32_t= v) { int i; for (i =3D 0; i < 4; i++) { @@ -3152,7 +3152,7 @@ void helper_XVTSTDCSP(ppc_vsr_t *t, ppc_vsr_t *b, uin= t64_t dcmx, uint32_t v) =20 static bool not_SP_value(float64 val) { - return val !=3D helper_todouble(helper_tosingle(val)); + return val !=3D HELPER(todouble)(HELPER(tosingle)(val)); } =20 /* @@ -3162,7 +3162,7 @@ static bool not_SP_value(float64 val) * TP - type (float64 or float128) */ #define VSX_XS_TSTDC(NAME, FLD, TP) = \ - void helper_##NAME(CPUPPCState *env, uint32_t bf, = \ + void HELPER(NAME)(CPUPPCState *env, uint32_t bf, = \ uint32_t dcmx, ppc_vsr_t *b) = \ { = \ uint32_t cc, match, sign =3D TP##_is_neg(b->FLD); = \ @@ -3177,7 +3177,7 @@ VSX_XS_TSTDC(XSTSTDCDP, VsrD(0), float64) VSX_XS_TSTDC(XSTSTDCQP, f128, float128) #undef VSX_XS_TSTDC =20 -void helper_XSTSTDCSP(CPUPPCState *env, uint32_t bf, +void HELPER(XSTSTDCSP)(CPUPPCState *env, uint32_t bf, uint32_t dcmx, ppc_vsr_t *b) { uint32_t cc, match, sign =3D float64_is_neg(b->VsrD(0)); @@ -3190,7 +3190,7 @@ void helper_XSTSTDCSP(CPUPPCState *env, uint32_t bf, env->crf[bf] =3D cc; } =20 -void helper_xsrqpi(CPUPPCState *env, uint32_t opcode, +void HELPER(xsrqpi)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xt, ppc_vsr_t *xb) { ppc_vsr_t t =3D { }; @@ -3200,7 +3200,7 @@ void helper_xsrqpi(CPUPPCState *env, uint32_t opcode, uint8_t rmode =3D 0; float_status tstat; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 if (r =3D=3D 0 && rmc =3D=3D 0) { rmode =3D float_round_ties_away; @@ -3239,12 +3239,12 @@ void helper_xsrqpi(CPUPPCState *env, uint32_t opcod= e, env->fp_status.float_exception_flags &=3D ~float_flag_inexact; } =20 - helper_compute_fprf_float128(env, t.f128); + HELPER(compute_fprf_float128)(env, t.f128); do_float_check_status(env, true, GETPC()); *xt =3D t; } =20 -void helper_xsrqpxp(CPUPPCState *env, uint32_t opcode, +void HELPER(xsrqpxp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xt, ppc_vsr_t *xb) { ppc_vsr_t t =3D { }; @@ -3254,7 +3254,7 @@ void helper_xsrqpxp(CPUPPCState *env, uint32_t opcode, floatx80 round_res; float_status tstat; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 if (r =3D=3D 0 && rmc =3D=3D 0) { rmode =3D float_round_ties_away; @@ -3291,18 +3291,18 @@ void helper_xsrqpxp(CPUPPCState *env, uint32_t opco= de, t.f128 =3D float128_snan_to_qnan(t.f128); } =20 - helper_compute_fprf_float128(env, t.f128); + HELPER(compute_fprf_float128)(env, t.f128); *xt =3D t; do_float_check_status(env, true, GETPC()); } =20 -void helper_xssqrtqp(CPUPPCState *env, uint32_t opcode, +void HELPER(xssqrtqp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xt, ppc_vsr_t *xb) { ppc_vsr_t t =3D { }; float_status tstat; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 tstat =3D env->fp_status; if (unlikely(Rc(opcode) !=3D 0)) { @@ -3317,18 +3317,18 @@ void helper_xssqrtqp(CPUPPCState *env, uint32_t opc= ode, float_invalid_op_sqrt(env, tstat.float_exception_flags, 1, GETPC()= ); } =20 - helper_compute_fprf_float128(env, t.f128); + HELPER(compute_fprf_float128)(env, t.f128); *xt =3D t; do_float_check_status(env, true, GETPC()); } =20 -void helper_xssubqp(CPUPPCState *env, uint32_t opcode, +void HELPER(xssubqp)(CPUPPCState *env, uint32_t opcode, ppc_vsr_t *xt, ppc_vsr_t *xa, ppc_vsr_t *xb) { ppc_vsr_t t =3D *xt; float_status tstat; =20 - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); =20 tstat =3D env->fp_status; if (unlikely(Rc(opcode) !=3D 0)) { @@ -3343,7 +3343,7 @@ void helper_xssubqp(CPUPPCState *env, uint32_t opcode, float_invalid_op_addsub(env, tstat.float_exception_flags, 1, GETPC= ()); } =20 - helper_compute_fprf_float128(env, t.f128); + HELPER(compute_fprf_float128)(env, t.f128); *xt =3D t; do_float_check_status(env, true, GETPC()); } @@ -3491,7 +3491,7 @@ static void vsxger(CPUPPCState *env, ppc_vsr_t *a, pp= c_vsr_t *b, float_status *excp_ptr =3D &env->fp_status; op_flags =3D (neg_acc ^ neg_mul) ? float_muladd_negate_c : 0; op_flags |=3D (neg_mul) ? float_muladd_negate_result : 0; - helper_reset_fpstatus(env); + HELPER(reset_fpstatus)(env); for (i =3D 0, xmsk_bit =3D 1 << 3; i < 4; i++, xmsk_bit >>=3D 1) { for (j =3D 0, ymsk_bit =3D 1 << 3; j < 4; j++, ymsk_bit >>=3D 1) { if ((xmsk_bit & xmsk) && (ymsk_bit & ymsk)) { @@ -3509,77 +3509,77 @@ static void vsxger(CPUPPCState *env, ppc_vsr_t *a, = ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVBF16GER2(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVBF16GER2)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, false, false, false, extract_bf16); } =20 QEMU_FLATTEN -void helper_XVBF16GER2PP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVBF16GER2PP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, true, false, false, extract_bf16); } =20 QEMU_FLATTEN -void helper_XVBF16GER2PN(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVBF16GER2PN)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, true, false, true, extract_bf16); } =20 QEMU_FLATTEN -void helper_XVBF16GER2NP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVBF16GER2NP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, true, true, false, extract_bf16); } =20 QEMU_FLATTEN -void helper_XVBF16GER2NN(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVBF16GER2NN)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, true, true, true, extract_bf16); } =20 QEMU_FLATTEN -void helper_XVF16GER2(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF16GER2)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, false, false, false, extract_hf16); } =20 QEMU_FLATTEN -void helper_XVF16GER2PP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF16GER2PP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, true, false, false, extract_hf16); } =20 QEMU_FLATTEN -void helper_XVF16GER2PN(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF16GER2PN)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, true, false, true, extract_hf16); } =20 QEMU_FLATTEN -void helper_XVF16GER2NP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF16GER2NP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, true, true, false, extract_hf16); } =20 QEMU_FLATTEN -void helper_XVF16GER2NN(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF16GER2NN)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger16(env, a, b, at, mask, true, true, true, extract_hf16); } =20 QEMU_FLATTEN -void helper_XVF32GER(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF32GER)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, false, false, false, vsxger_mul32, @@ -3587,7 +3587,7 @@ void helper_XVF32GER(CPUPPCState *env, ppc_vsr_t *a, = ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF32GERPP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF32GERPP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, true, false, false, vsxger_mul32, @@ -3595,7 +3595,7 @@ void helper_XVF32GERPP(CPUPPCState *env, ppc_vsr_t *a= , ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF32GERPN(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF32GERPN)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, true, false, true, vsxger_mul32, @@ -3603,7 +3603,7 @@ void helper_XVF32GERPN(CPUPPCState *env, ppc_vsr_t *a= , ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF32GERNP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF32GERNP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, true, true, false, vsxger_mul32, @@ -3611,7 +3611,7 @@ void helper_XVF32GERNP(CPUPPCState *env, ppc_vsr_t *a= , ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF32GERNN(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF32GERNN)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, true, true, true, vsxger_mul32, @@ -3619,7 +3619,7 @@ void helper_XVF32GERNN(CPUPPCState *env, ppc_vsr_t *a= , ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF64GER(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF64GER)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, false, false, false, vsxger_mul64, @@ -3627,7 +3627,7 @@ void helper_XVF64GER(CPUPPCState *env, ppc_vsr_t *a, = ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF64GERPP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF64GERPP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, true, false, false, vsxger_mul64, @@ -3635,7 +3635,7 @@ void helper_XVF64GERPP(CPUPPCState *env, ppc_vsr_t *a= , ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF64GERPN(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF64GERPN)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, true, false, true, vsxger_mul64, @@ -3643,7 +3643,7 @@ void helper_XVF64GERPN(CPUPPCState *env, ppc_vsr_t *a= , ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF64GERNP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF64GERNP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, true, true, false, vsxger_mul64, @@ -3651,7 +3651,7 @@ void helper_XVF64GERNP(CPUPPCState *env, ppc_vsr_t *a= , ppc_vsr_t *b, } =20 QEMU_FLATTEN -void helper_XVF64GERNN(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVF64GERNN)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { vsxger(env, a, b, at, mask, true, true, true, vsxger_mul64, diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 86346f5b9ae..7d01be9d5fb 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -44,7 +44,7 @@ static inline void helper_update_ov_legacy(CPUPPCState *e= nv, int ov) } } =20 -target_ulong helper_DIVWEU(CPUPPCState *env, target_ulong ra, target_ulong= rb, +target_ulong HELPER(DIVWEU)(CPUPPCState *env, target_ulong ra, target_ulon= g rb, uint32_t oe) { uint64_t rt =3D 0; @@ -71,7 +71,7 @@ target_ulong helper_DIVWEU(CPUPPCState *env, target_ulong= ra, target_ulong rb, return (target_ulong)rt; } =20 -target_ulong helper_DIVWE(CPUPPCState *env, target_ulong ra, target_ulong = rb, +target_ulong HELPER(DIVWE)(CPUPPCState *env, target_ulong ra, target_ulong= rb, uint32_t oe) { int64_t rt =3D 0; @@ -101,7 +101,7 @@ target_ulong helper_DIVWE(CPUPPCState *env, target_ulon= g ra, target_ulong rb, =20 #if defined(TARGET_PPC64) =20 -uint64_t helper_DIVDEU(CPUPPCState *env, uint64_t ra, uint64_t rb, uint32_= t oe) +uint64_t HELPER(DIVDEU)(CPUPPCState *env, uint64_t ra, uint64_t rb, uint32= _t oe) { uint64_t rt =3D 0; int overflow =3D 0; @@ -120,7 +120,8 @@ uint64_t helper_DIVDEU(CPUPPCState *env, uint64_t ra, u= int64_t rb, uint32_t oe) return rt; } =20 -uint64_t helper_DIVDE(CPUPPCState *env, uint64_t rau, uint64_t rbu, uint32= _t oe) +uint64_t HELPER(DIVDE)(CPUPPCState *env, uint64_t rau, uint64_t rbu, + uint32_t oe) { uint64_t rt =3D 0; int64_t ra =3D (int64_t)rau; @@ -159,7 +160,7 @@ uint64_t helper_DIVDE(CPUPPCState *env, uint64_t rau, u= int64_t rbu, uint32_t oe) /* When you XOR the pattern and there is a match, that byte will be zero */ #define hasvalue(x, n) (haszero((x) ^ pattern(n))) =20 -uint32_t helper_CMPEQB(target_ulong ra, target_ulong rb) +uint32_t HELPER(CMPEQB)(target_ulong ra, target_ulong rb) { return hasvalue(rb, ra) ? CRF_GT : 0; } @@ -171,7 +172,7 @@ uint32_t helper_CMPEQB(target_ulong ra, target_ulong rb) /* * Return a random number. */ -uint64_t helper_DARN32(void) +uint64_t HELPER(DARN32)(void) { Error *err =3D NULL; uint32_t ret; @@ -186,7 +187,7 @@ uint64_t helper_DARN32(void) return ret; } =20 -uint64_t helper_DARN64(void) +uint64_t HELPER(DARN64)(void) { Error *err =3D NULL; uint64_t ret; @@ -201,7 +202,7 @@ uint64_t helper_DARN64(void) return ret; } =20 -uint64_t helper_BPERMD(uint64_t rs, uint64_t rb) +uint64_t HELPER(BPERMD)(uint64_t rs, uint64_t rb) { int i; uint64_t ra =3D 0; @@ -219,7 +220,7 @@ uint64_t helper_BPERMD(uint64_t rs, uint64_t rb) =20 #endif =20 -target_ulong helper_CMPB(target_ulong rs, target_ulong rb) +target_ulong HELPER(CMPB)(target_ulong rs, target_ulong rb) { target_ulong mask =3D 0xff; target_ulong ra =3D 0; @@ -235,7 +236,7 @@ target_ulong helper_CMPB(target_ulong rs, target_ulong = rb) } =20 /* shift right arithmetic helper */ -target_ulong helper_SRAW(CPUPPCState *env, target_ulong value, +target_ulong HELPER(SRAW)(CPUPPCState *env, target_ulong value, target_ulong shift) { int32_t ret; @@ -261,7 +262,7 @@ target_ulong helper_SRAW(CPUPPCState *env, target_ulong= value, } =20 #if defined(TARGET_PPC64) -target_ulong helper_SRAD(CPUPPCState *env, target_ulong value, +target_ulong HELPER(SRAD)(CPUPPCState *env, target_ulong value, target_ulong shift) { int64_t ret; @@ -288,7 +289,7 @@ target_ulong helper_SRAD(CPUPPCState *env, target_ulong= value, #endif =20 #if defined(TARGET_PPC64) -target_ulong helper_POPCNTB(target_ulong val) +target_ulong HELPER(POPCNTB)(target_ulong val) { /* Note that we don't fold past bytes */ val =3D (val & 0x5555555555555555ULL) + ((val >> 1) & @@ -300,7 +301,7 @@ target_ulong helper_POPCNTB(target_ulong val) return val; } =20 -target_ulong helper_POPCNTW(target_ulong val) +target_ulong HELPER(POPCNTW)(target_ulong val) { /* Note that we don't fold past words. */ val =3D (val & 0x5555555555555555ULL) + ((val >> 1) & @@ -316,7 +317,7 @@ target_ulong helper_POPCNTW(target_ulong val) return val; } #else -target_ulong helper_POPCNTB(target_ulong val) +target_ulong HELPER(POPCNTB)(target_ulong val) { /* Note that we don't fold past bytes */ val =3D (val & 0x55555555) + ((val >> 1) & 0x55555555); @@ -326,7 +327,7 @@ target_ulong helper_POPCNTB(target_ulong val) } #endif =20 -uint64_t helper_CFUGED(uint64_t src, uint64_t mask) +uint64_t HELPER(CFUGED)(uint64_t src, uint64_t mask) { /* * Instead of processing the mask bit-by-bit from the most significant= to @@ -388,7 +389,7 @@ uint64_t helper_CFUGED(uint64_t src, uint64_t mask) return left | (right >> n); } =20 -uint64_t helper_PDEPD(uint64_t src, uint64_t mask) +uint64_t HELPER(PDEPD)(uint64_t src, uint64_t mask) { int i, o; uint64_t result =3D 0; @@ -406,7 +407,7 @@ uint64_t helper_PDEPD(uint64_t src, uint64_t mask) return result; } =20 -uint64_t helper_PEXTD(uint64_t src, uint64_t mask) +uint64_t HELPER(PEXTD)(uint64_t src, uint64_t mask) { int i, o; uint64_t result =3D 0; @@ -477,12 +478,12 @@ SATCVT(sd, uw, int64_t, uint32_t, 0, UINT32_MAX) #undef SATCVT #undef SATCVTU =20 -void helper_mtvscr(CPUPPCState *env, uint32_t vscr) +void HELPER(mtvscr)(CPUPPCState *env, uint32_t vscr) { ppc_store_vscr(env, vscr); } =20 -uint32_t helper_mfvscr(CPUPPCState *env) +uint32_t HELPER(mfvscr)(CPUPPCState *env) { return ppc_get_vscr(env); } @@ -494,7 +495,7 @@ static inline void set_vscr_sat(CPUPPCState *env) } =20 /* vprtybq */ -void helper_VPRTYBQ(ppc_avr_t *r, ppc_avr_t *b, uint32_t v) +void HELPER(VPRTYBQ)(ppc_avr_t *r, ppc_avr_t *b, uint32_t v) { uint64_t res =3D b->u64[0] ^ b->u64[1]; res ^=3D res >> 32; @@ -505,7 +506,7 @@ void helper_VPRTYBQ(ppc_avr_t *r, ppc_avr_t *b, uint32_= t v) } =20 #define VARITHFP(suffix, func) \ - void helper_v##suffix(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, \ + void HELPER(v##suffix)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, \ ppc_avr_t *b) \ { \ int i; \ @@ -521,7 +522,7 @@ VARITHFP(maxfp, float32_max) #undef VARITHFP =20 #define VARITHFPFMA(suffix, type) \ - void helper_v##suffix(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, \ + void HELPER(v##suffix)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, \ ppc_avr_t *b, ppc_avr_t *c) \ { \ int i; \ @@ -541,7 +542,7 @@ VARITHFPFMA(nmsubfp, float_muladd_negate_result | float= _muladd_negate_c); } =20 #define VARITHSAT_DO(name, op, optype, cvt, element) \ - void helper_V##name(ppc_avr_t *r, ppc_avr_t *vscr_sat, \ + void HELPER(V##name)(ppc_avr_t *r, ppc_avr_t *vscr_sat, \ ppc_avr_t *a, ppc_avr_t *b, uint32_t desc) \ { \ int sat =3D 0; \ @@ -572,7 +573,7 @@ VARITHSAT_UNSIGNED(W, u32, uint64_t, cvtsduw) #undef VARITHSAT_UNSIGNED =20 #define VAVG(name, element, etype) = \ - void helper_##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t = v)\ + void HELPER(name)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t v= ) \ { = \ int i; = \ = \ @@ -591,7 +592,7 @@ VAVG(VAVGUW, u32, uint64_t) #undef VAVG =20 #define VABSDU(name, element) \ -void helper_##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t v)\ +void HELPER(name)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t v) \ { \ int i; \ \ @@ -613,7 +614,7 @@ VABSDU(VABSDUW, u32) #undef VABSDU =20 #define VCF(suffix, cvt, element) \ - void helper_vcf##suffix(CPUPPCState *env, ppc_avr_t *r, \ + void HELPER(vcf##suffix)(CPUPPCState *env, ppc_avr_t *r, \ ppc_avr_t *b, uint32_t uim) \ { \ int i; \ @@ -628,7 +629,7 @@ VCF(sx, int32_to_float32, s32) #undef VCF =20 #define VCMPNEZ(NAME, ELEM) \ -void helper_##NAME(ppc_vsr_t *t, ppc_vsr_t *a, ppc_vsr_t *b, uint32_t desc= ) \ +void HELPER(NAME)(ppc_vsr_t *t, ppc_vsr_t *a, ppc_vsr_t *b, uint32_t desc)= \ { = \ for (int i =3D 0; i < ARRAY_SIZE(t->ELEM); i++) { = \ t->ELEM[i] =3D ((a->ELEM[i] =3D=3D 0) || (b->ELEM[i] =3D=3D 0) || = \ @@ -641,7 +642,7 @@ VCMPNEZ(VCMPNEZW, u32) #undef VCMPNEZ =20 #define VCMPFP_DO(suffix, compare, order, record) \ - void helper_vcmp##suffix(CPUPPCState *env, ppc_avr_t *r, \ + void HELPER(vcmp##suffix)(CPUPPCState *env, ppc_avr_t *r, \ ppc_avr_t *a, ppc_avr_t *b) \ { \ uint32_t ones =3D (uint32_t)-1; \ @@ -706,19 +707,19 @@ static inline void vcmpbfp_internal(CPUPPCState *env,= ppc_avr_t *r, } } =20 -void helper_vcmpbfp(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_= t *b) +void HELPER(vcmpbfp)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b) { vcmpbfp_internal(env, r, a, b, 0); } =20 -void helper_vcmpbfp_dot(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, +void HELPER(vcmpbfp_dot)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { vcmpbfp_internal(env, r, a, b, 1); } =20 #define VCT(suffix, satcvt, element) \ - void helper_vct##suffix(CPUPPCState *env, ppc_avr_t *r, \ + void HELPER(vct##suffix)(CPUPPCState *env, ppc_avr_t *r, \ ppc_avr_t *b, uint32_t uim) \ { \ int i; \ @@ -815,69 +816,69 @@ static void xviger(CPUPPCState *env, ppc_vsr_t *a, pp= c_vsr_t *b, ppc_acc_t *at, } =20 QEMU_FLATTEN -void helper_XVI4GER8(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI4GER8)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, false, false, ger_rank8); } =20 QEMU_FLATTEN -void helper_XVI4GER8PP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI4GER8PP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, false, true, ger_rank8); } =20 QEMU_FLATTEN -void helper_XVI8GER4(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI8GER4)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, false, false, ger_rank4); } =20 QEMU_FLATTEN -void helper_XVI8GER4PP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI8GER4PP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, false, true, ger_rank4); } =20 QEMU_FLATTEN -void helper_XVI8GER4SPP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI8GER4SPP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, true, true, ger_rank4); } =20 QEMU_FLATTEN -void helper_XVI16GER2(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI16GER2)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, false, false, ger_rank2); } =20 QEMU_FLATTEN -void helper_XVI16GER2S(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI16GER2S)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, true, false, ger_rank2); } =20 QEMU_FLATTEN -void helper_XVI16GER2PP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI16GER2PP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, false, true, ger_rank2); } =20 QEMU_FLATTEN -void helper_XVI16GER2SPP(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, +void HELPER(XVI16GER2SPP)(CPUPPCState *env, ppc_vsr_t *a, ppc_vsr_t *b, ppc_acc_t *at, uint32_t mask) { xviger(env, a, b, at, mask, true, true, ger_rank2); } =20 -target_ulong helper_vclzlsbb(ppc_avr_t *r) +target_ulong HELPER(vclzlsbb)(ppc_avr_t *r) { target_ulong count =3D 0; int i; @@ -890,7 +891,7 @@ target_ulong helper_vclzlsbb(ppc_avr_t *r) return count; } =20 -target_ulong helper_vctzlsbb(ppc_avr_t *r) +target_ulong HELPER(vctzlsbb)(ppc_avr_t *r) { target_ulong count =3D 0; int i; @@ -903,7 +904,7 @@ target_ulong helper_vctzlsbb(ppc_avr_t *r) return count; } =20 -void helper_VMHADDSHS(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, +void HELPER(VMHADDSHS)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) { int sat =3D 0; @@ -921,7 +922,7 @@ void helper_VMHADDSHS(CPUPPCState *env, ppc_avr_t *r, p= pc_avr_t *a, } } =20 -void helper_VMHRADDSHS(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, +void HELPER(VMHRADDSHS)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) { int sat =3D 0; @@ -938,7 +939,7 @@ void helper_VMHRADDSHS(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, } } =20 -void helper_VMLADDUHM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c, +void HELPER(VMLADDUHM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t= *c, uint32_t v) { int i; @@ -950,7 +951,7 @@ void helper_VMLADDUHM(ppc_avr_t *r, ppc_avr_t *a, ppc_a= vr_t *b, ppc_avr_t *c, } =20 #define VMRG_DO(name, element, access, ofs) = \ - void helper_V##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) = \ + void HELPER(V##name)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) = \ { = \ ppc_avr_t result; = \ int i, half =3D ARRAY_SIZE(r->element) / 2; = \ @@ -971,7 +972,7 @@ VMRG(W, u32, VsrW) #undef VMRG_DO #undef VMRG =20 -void helper_VMSUMMBM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *= c) +void HELPER(VMSUMMBM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) { int32_t prod[16]; int i; @@ -986,7 +987,7 @@ void helper_VMSUMMBM(ppc_avr_t *r, ppc_avr_t *a, ppc_av= r_t *b, ppc_avr_t *c) } } =20 -void helper_VMSUMSHM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *= c) +void HELPER(VMSUMSHM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) { int32_t prod[8]; int i; @@ -1000,7 +1001,7 @@ void helper_VMSUMSHM(ppc_avr_t *r, ppc_avr_t *a, ppc_= avr_t *b, ppc_avr_t *c) } } =20 -void helper_VMSUMSHS(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, +void HELPER(VMSUMSHS)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) { int32_t prod[8]; @@ -1022,7 +1023,7 @@ void helper_VMSUMSHS(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, } } =20 -void helper_VMSUMUBM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *= c) +void HELPER(VMSUMUBM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) { uint16_t prod[16]; int i; @@ -1037,7 +1038,7 @@ void helper_VMSUMUBM(ppc_avr_t *r, ppc_avr_t *a, ppc_= avr_t *b, ppc_avr_t *c) } } =20 -void helper_VMSUMUHM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *= c) +void HELPER(VMSUMUHM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) { uint32_t prod[8]; int i; @@ -1051,7 +1052,7 @@ void helper_VMSUMUHM(ppc_avr_t *r, ppc_avr_t *a, ppc_= avr_t *b, ppc_avr_t *c) } } =20 -void helper_VMSUMUHS(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, +void HELPER(VMSUMUHS)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) { uint32_t prod[8]; @@ -1074,7 +1075,7 @@ void helper_VMSUMUHS(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, } =20 #define VMUL_DO_EVN(name, mul_element, mul_access, prod_access, cast) \ - void helper_V##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ + void HELPER(V##name)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ { \ int i; \ \ @@ -1085,7 +1086,7 @@ void helper_VMSUMUHS(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, } =20 #define VMUL_DO_ODD(name, mul_element, mul_access, prod_access, cast) \ - void helper_V##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ + void HELPER(V##name)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ { \ int i; \ \ @@ -1108,7 +1109,7 @@ VMUL(UW, u32, VsrW, VsrD, uint64_t) #undef VMUL_DO_ODD #undef VMUL =20 -void helper_XXPERMX(ppc_vsr_t *t, ppc_vsr_t *s0, ppc_vsr_t *s1, ppc_vsr_t = *pcv, +void HELPER(XXPERMX)(ppc_vsr_t *t, ppc_vsr_t *s0, ppc_vsr_t *s1, ppc_vsr_t= *pcv, target_ulong uim) { int i, idx; @@ -1128,7 +1129,7 @@ void helper_XXPERMX(ppc_vsr_t *t, ppc_vsr_t *s0, ppc_= vsr_t *s1, ppc_vsr_t *pcv, *t =3D tmp; } =20 -void helper_VDIVSQ(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VDIVSQ)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) { Int128 neg1 =3D int128_makes64(-1); Int128 int128_min =3D int128_make128(0, INT64_MIN); @@ -1140,7 +1141,7 @@ void helper_VDIVSQ(ppc_avr_t *t, ppc_avr_t *a, ppc_av= r_t *b) } } =20 -void helper_VDIVUQ(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VDIVUQ)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) { if (int128_nz(b->s128)) { t->s128 =3D int128_divu(a->s128, b->s128); @@ -1149,7 +1150,7 @@ void helper_VDIVUQ(ppc_avr_t *t, ppc_avr_t *a, ppc_av= r_t *b) } } =20 -void helper_VDIVESD(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VDIVESD)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) { int i; int64_t high; @@ -1166,7 +1167,7 @@ void helper_VDIVESD(ppc_avr_t *t, ppc_avr_t *a, ppc_a= vr_t *b) } } =20 -void helper_VDIVEUD(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VDIVEUD)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) { int i; uint64_t high, low; @@ -1182,7 +1183,7 @@ void helper_VDIVEUD(ppc_avr_t *t, ppc_avr_t *a, ppc_a= vr_t *b) } } =20 -void helper_VDIVESQ(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VDIVESQ)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) { Int128 high, low; Int128 int128_min =3D int128_make128(0, INT64_MIN); @@ -1199,7 +1200,7 @@ void helper_VDIVESQ(ppc_avr_t *t, ppc_avr_t *a, ppc_a= vr_t *b) } } =20 -void helper_VDIVEUQ(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VDIVEUQ)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) { Int128 high, low; =20 @@ -1213,7 +1214,7 @@ void helper_VDIVEUQ(ppc_avr_t *t, ppc_avr_t *a, ppc_a= vr_t *b) } } =20 -void helper_VMODSQ(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VMODSQ)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) { Int128 neg1 =3D int128_makes64(-1); Int128 int128_min =3D int128_make128(0, INT64_MIN); @@ -1225,7 +1226,7 @@ void helper_VMODSQ(ppc_avr_t *t, ppc_avr_t *a, ppc_av= r_t *b) } } =20 -void helper_VMODUQ(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VMODUQ)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b) { if (likely(int128_nz(b->s128))) { t->s128 =3D int128_remu(a->s128, b->s128); @@ -1234,7 +1235,7 @@ void helper_VMODUQ(ppc_avr_t *t, ppc_avr_t *a, ppc_av= r_t *b) } } =20 -void helper_VPERM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) +void HELPER(VPERM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) { ppc_avr_t result; int i; @@ -1252,7 +1253,7 @@ void helper_VPERM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b, ppc_avr_t *c) *r =3D result; } =20 -void helper_VPERMR(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) +void HELPER(VPERMR)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) { ppc_avr_t result; int i; @@ -1271,7 +1272,7 @@ void helper_VPERMR(ppc_avr_t *r, ppc_avr_t *a, ppc_av= r_t *b, ppc_avr_t *c) } =20 #define XXGENPCV_BE_EXP(NAME, SZ) \ -void glue(helper_, glue(NAME, _be_exp))(ppc_vsr_t *t, ppc_vsr_t *b) \ +void HELPER(glue(NAME, _be_exp))(ppc_vsr_t *t, ppc_vsr_t *b) \ { \ ppc_vsr_t tmp; \ \ @@ -1294,7 +1295,7 @@ void glue(helper_, glue(NAME, _be_exp))(ppc_vsr_t *t,= ppc_vsr_t *b) \ } =20 #define XXGENPCV_BE_COMP(NAME, SZ) \ -void glue(helper_, glue(NAME, _be_comp))(ppc_vsr_t *t, ppc_vsr_t *b)\ +void HELPER(glue(NAME, _be_comp))(ppc_vsr_t *t, ppc_vsr_t *b) \ { \ ppc_vsr_t tmp =3D { .u64 =3D { 0, 0 } }; \ \ @@ -1313,7 +1314,7 @@ void glue(helper_, glue(NAME, _be_comp))(ppc_vsr_t *t= , ppc_vsr_t *b)\ } =20 #define XXGENPCV_LE_EXP(NAME, SZ) \ -void glue(helper_, glue(NAME, _le_exp))(ppc_vsr_t *t, ppc_vsr_t *b) \ +void HELPER(glue(NAME, _le_exp))(ppc_vsr_t *t, ppc_vsr_t *b) \ { \ ppc_vsr_t tmp; \ \ @@ -1338,7 +1339,7 @@ void glue(helper_, glue(NAME, _le_exp))(ppc_vsr_t *t,= ppc_vsr_t *b) \ } =20 #define XXGENPCV_LE_COMP(NAME, SZ) \ -void glue(helper_, glue(NAME, _le_comp))(ppc_vsr_t *t, ppc_vsr_t *b)\ +void HELPER(glue(NAME, _le_comp))(ppc_vsr_t *t, ppc_vsr_t *b) \ { \ ppc_vsr_t tmp =3D { .u64 =3D { 0, 0 } }; \ \ @@ -1387,7 +1388,7 @@ XXGENPCV(XXGENPCVDM, 8) #define EXTRACT_BIT(avr, i, index) \ (extract64((avr)->VsrD(i), 63 - index, 1)) =20 -void helper_vbpermd(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vbpermd)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { int i, j; ppc_avr_t result =3D { .u64 =3D { 0, 0 } }; @@ -1402,7 +1403,7 @@ void helper_vbpermd(ppc_avr_t *r, ppc_avr_t *a, ppc_a= vr_t *b) *r =3D result; } =20 -void helper_vbpermq(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vbpermq)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { int i; uint64_t perm =3D 0; @@ -1429,7 +1430,7 @@ void helper_vbpermq(ppc_avr_t *r, ppc_avr_t *a, ppc_a= vr_t *b) * There is no carry across the two doublewords, so their order does * not matter. Nor is there partial overlap between registers. */ -void helper_vpmsumb(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vpmsumb)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { for (int i =3D 0; i < 2; ++i) { uint64_t aa =3D a->u64[i], bb =3D b->u64[i]; @@ -1437,7 +1438,7 @@ void helper_vpmsumb(ppc_avr_t *r, ppc_avr_t *a, ppc_a= vr_t *b) } } =20 -void helper_vpmsumh(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vpmsumh)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { for (int i =3D 0; i < 2; ++i) { uint64_t aa =3D a->u64[i], bb =3D b->u64[i]; @@ -1445,7 +1446,7 @@ void helper_vpmsumh(ppc_avr_t *r, ppc_avr_t *a, ppc_a= vr_t *b) } } =20 -void helper_vpmsumw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vpmsumw)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { for (int i =3D 0; i < 2; ++i) { uint64_t aa =3D a->u64[i], bb =3D b->u64[i]; @@ -1453,7 +1454,7 @@ void helper_vpmsumw(ppc_avr_t *r, ppc_avr_t *a, ppc_a= vr_t *b) } } =20 -void helper_VPMSUMD(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VPMSUMD)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { Int128 e =3D clmul_64(a->u64[0], b->u64[0]); Int128 o =3D clmul_64(a->u64[1], b->u64[1]); @@ -1465,7 +1466,7 @@ void helper_VPMSUMD(ppc_avr_t *r, ppc_avr_t *a, ppc_a= vr_t *b) #else #define PKBIG 0 #endif -void helper_VPKPX(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VPKPX)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { int i, j; ppc_avr_t result; @@ -1488,7 +1489,7 @@ void helper_VPKPX(ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b) } =20 #define VPK(suffix, from, to, cvt, dosat) \ - void helper_VPK##suffix(CPUPPCState *env, ppc_avr_t *r, \ + void HELPER(VPK##suffix)(CPUPPCState *env, ppc_avr_t *r, \ ppc_avr_t *a, ppc_avr_t *b) \ { \ int i; \ @@ -1523,7 +1524,7 @@ VPK(UDUM, u64, u32, I, 0) #undef VPK #undef PKBIG =20 -void helper_vrefp(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) +void HELPER(vrefp)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) { int i; =20 @@ -1533,7 +1534,7 @@ void helper_vrefp(CPUPPCState *env, ppc_avr_t *r, ppc= _avr_t *b) } =20 #define VRFI(suffix, rounding) \ - void helper_vrfi##suffix(CPUPPCState *env, ppc_avr_t *r, \ + void HELPER(vrfi##suffix)(CPUPPCState *env, ppc_avr_t *r, \ ppc_avr_t *b) \ { \ int i; \ @@ -1550,7 +1551,7 @@ VRFI(p, float_round_up) VRFI(z, float_round_to_zero) #undef VRFI =20 -void helper_vrsqrtefp(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) +void HELPER(vrsqrtefp)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) { int i; =20 @@ -1562,7 +1563,7 @@ void helper_vrsqrtefp(CPUPPCState *env, ppc_avr_t *r,= ppc_avr_t *b) } =20 #define VRLMI(name, size, element, insert) = \ -void helper_##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t desc= ) \ +void HELPER(name)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t desc)= \ { = \ int i; = \ for (i =3D 0; i < ARRAY_SIZE(r->element); i++) { = \ @@ -1589,7 +1590,7 @@ VRLMI(VRLWMI, 32, u32, 1); VRLMI(VRLDNM, 64, u64, 0); VRLMI(VRLWNM, 32, u32, 0); =20 -void helper_vexptefp(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) +void HELPER(vexptefp)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) { int i; =20 @@ -1598,7 +1599,7 @@ void helper_vexptefp(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *b) } } =20 -void helper_vlogefp(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) +void HELPER(vlogefp)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *b) { int i; =20 @@ -1608,7 +1609,7 @@ void helper_vlogefp(CPUPPCState *env, ppc_avr_t *r, p= pc_avr_t *b) } =20 #define VEXTU_X_DO(name, size, left) \ -target_ulong glue(helper_, name)(target_ulong a, ppc_avr_t *b) \ +target_ulong HELPER(name)(target_ulong a, ppc_avr_t *b) \ { \ int index =3D (a & 0xf) * 8; \ if (left) { \ @@ -1625,7 +1626,7 @@ VEXTU_X_DO(vextuhrx, 16, 0) VEXTU_X_DO(vextuwrx, 32, 0) #undef VEXTU_X_DO =20 -void helper_vslv(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vslv)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { int i; unsigned int shift, bytes, size; @@ -1639,7 +1640,7 @@ void helper_vslv(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_= t *b) } } =20 -void helper_vsrv(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vsrv)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { int i; unsigned int shift, bytes; @@ -1657,7 +1658,7 @@ void helper_vsrv(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_= t *b) } } =20 -void helper_vsldoi(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t shif= t) +void HELPER(vsldoi)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t shi= ft) { int sh =3D shift & 0xf; int i; @@ -1674,7 +1675,7 @@ void helper_vsldoi(ppc_avr_t *r, ppc_avr_t *a, ppc_av= r_t *b, uint32_t shift) *r =3D result; } =20 -void helper_vslo(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vslo)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { int sh =3D (b->VsrB(0xf) >> 3) & 0xf; =20 @@ -1694,7 +1695,7 @@ void helper_vslo(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_= t *b) #endif =20 #define VINSX(SUFFIX, TYPE) \ -void glue(glue(helper_VINS, SUFFIX), LX)(CPUPPCState *env, ppc_avr_t *t, = \ +void glue(glue(HELPER(VINS), SUFFIX), LX)(CPUPPCState *env, ppc_avr_t *t, = \ uint64_t val, target_ulong index)= \ { = \ const int maxidx =3D ARRAY_SIZE(t->u8) - sizeof(TYPE); = \ @@ -1718,7 +1719,7 @@ VINSX(D, uint64_t) #undef VINSX #if HOST_BIG_ENDIAN #define VEXTDVLX(NAME, SIZE) \ -void helper_##NAME(CPUPPCState *env, ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t= *b, \ +void HELPER(NAME)(CPUPPCState *env, ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t = *b, \ target_ulong index) = \ { = \ const target_long idx =3D index; = \ @@ -1734,7 +1735,7 @@ void helper_##NAME(CPUPPCState *env, ppc_avr_t *t, pp= c_avr_t *a, ppc_avr_t *b, \ } #else #define VEXTDVLX(NAME, SIZE) \ -void helper_##NAME(CPUPPCState *env, ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t= *b, \ +void HELPER(NAME)(CPUPPCState *env, ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t = *b, \ target_ulong index) = \ { = \ const target_long idx =3D index; = \ @@ -1757,7 +1758,7 @@ VEXTDVLX(VEXTDDVLX, 8) #undef VEXTDVLX #if HOST_BIG_ENDIAN #define VEXTRACT(suffix, element) = \ - void helper_vextract##suffix(ppc_avr_t *r, ppc_avr_t *b, uint32_t inde= x) \ + void HELPER(vextract##suffix)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ind= ex) \ { = \ uint32_t es =3D sizeof(r->element[0]); = \ memmove(&r->u8[8 - es], &b->u8[index], es); = \ @@ -1766,7 +1767,7 @@ VEXTDVLX(VEXTDDVLX, 8) } #else #define VEXTRACT(suffix, element) = \ - void helper_vextract##suffix(ppc_avr_t *r, ppc_avr_t *b, uint32_t inde= x) \ + void HELPER(vextract##suffix)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ind= ex) \ { = \ uint32_t es =3D sizeof(r->element[0]); = \ uint32_t s =3D (16 - index) - es; = \ @@ -1782,7 +1783,7 @@ VEXTRACT(d, u64) #undef VEXTRACT =20 #define VSTRI(NAME, ELEM, NUM_ELEMS, LEFT) \ -uint32_t helper_##NAME(ppc_avr_t *t, ppc_avr_t *b) \ +uint32_t HELPER(NAME)(ppc_avr_t *t, ppc_avr_t *b) \ { \ int i, idx, crf =3D 0; \ \ @@ -1809,7 +1810,7 @@ VSTRI(VSTRIHL, H, 8, true) VSTRI(VSTRIHR, H, 8, false) #undef VSTRI =20 -void helper_XXEXTRACTUW(ppc_vsr_t *xt, ppc_vsr_t *xb, uint32_t index) +void HELPER(XXEXTRACTUW)(ppc_vsr_t *xt, ppc_vsr_t *xb, uint32_t index) { ppc_vsr_t t =3D { }; size_t es =3D sizeof(uint32_t); @@ -1824,7 +1825,7 @@ void helper_XXEXTRACTUW(ppc_vsr_t *xt, ppc_vsr_t *xb,= uint32_t index) *xt =3D t; } =20 -void helper_XXINSERTW(ppc_vsr_t *xt, ppc_vsr_t *xb, uint32_t index) +void HELPER(XXINSERTW)(ppc_vsr_t *xt, ppc_vsr_t *xb, uint32_t index) { ppc_vsr_t t =3D *xt; size_t es =3D sizeof(uint32_t); @@ -1838,7 +1839,7 @@ void helper_XXINSERTW(ppc_vsr_t *xt, ppc_vsr_t *xb, u= int32_t index) *xt =3D t; } =20 -void helper_XXEVAL(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c, +void HELPER(XXEVAL)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c, uint32_t desc) { /* @@ -1880,7 +1881,7 @@ void helper_XXEVAL(ppc_avr_t *t, ppc_avr_t *a, ppc_av= r_t *b, ppc_avr_t *c, } =20 #define XXBLEND(name, sz) \ -void glue(helper_XXBLENDV, name)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b,= \ +void glue(HELPER(XXBLENDV), name)(ppc_avr_t *t, ppc_avr_t *a, ppc_avr_t *b= , \ ppc_avr_t *c, uint32_t desc) = \ { = \ for (int i =3D 0; i < ARRAY_SIZE(t->glue(u, sz)); i++) { = \ @@ -1894,7 +1895,7 @@ XXBLEND(W, 32) XXBLEND(D, 64) #undef XXBLEND =20 -void helper_vsro(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vsro)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { int sh =3D (b->VsrB(0xf) >> 3) & 0xf; =20 @@ -1907,7 +1908,7 @@ void helper_vsro(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_= t *b) #endif } =20 -void helper_vsumsws(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr_= t *b) +void HELPER(vsumsws)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b) { int64_t t; int i, upper; @@ -1928,7 +1929,8 @@ void helper_vsumsws(CPUPPCState *env, ppc_avr_t *r, p= pc_avr_t *a, ppc_avr_t *b) } } =20 -void helper_vsum2sws(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b) +void HELPER(vsum2sws)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, + ppc_avr_t *b) { int i, j, upper; ppc_avr_t result; @@ -1951,7 +1953,8 @@ void helper_vsum2sws(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, ppc_avr_t *b) } } =20 -void helper_vsum4sbs(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b) +void HELPER(vsum4sbs)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, + ppc_avr_t *b) { int i, j; int sat =3D 0; @@ -1970,7 +1973,8 @@ void helper_vsum4sbs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, ppc_avr_t *b) } } =20 -void helper_vsum4shs(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b) +void HELPER(vsum4shs)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, + ppc_avr_t *b) { int sat =3D 0; int i; @@ -1987,7 +1991,8 @@ void helper_vsum4shs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, ppc_avr_t *b) } } =20 -void helper_vsum4ubs(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, ppc_avr= _t *b) +void HELPER(vsum4ubs)(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, + ppc_avr_t *b) { int i, j; int sat =3D 0; @@ -2014,7 +2019,7 @@ void helper_vsum4ubs(CPUPPCState *env, ppc_avr_t *r, = ppc_avr_t *a, ppc_avr_t *b) #define UPKLO 1 #endif #define VUPKPX(suffix, hi) \ - void helper_vupk##suffix(ppc_avr_t *r, ppc_avr_t *b) \ + void HELPER(vupk##suffix)(ppc_avr_t *r, ppc_avr_t *b) \ { \ int i; \ ppc_avr_t result; \ @@ -2035,7 +2040,7 @@ VUPKPX(hpx, UPKHI) #undef VUPKPX =20 #define VUPK(suffix, unpacked, packee, hi) \ - void helper_vupk##suffix(ppc_avr_t *r, ppc_avr_t *b) \ + void HELPER(vupk##suffix)(ppc_avr_t *r, ppc_avr_t *b) \ { \ int i; \ ppc_avr_t result; \ @@ -2063,7 +2068,7 @@ VUPK(lsw, s64, s32, UPKLO) #undef UPKLO =20 #define VGENERIC_DO(name, element) \ - void helper_v##name(ppc_avr_t *r, ppc_avr_t *b) \ + void HELPER(v##name)(ppc_avr_t *r, ppc_avr_t *b) \ { \ int i; \ \ @@ -2113,24 +2118,24 @@ VGENERIC_DO(popcntd, u64) =20 #undef VGENERIC_DO =20 -void helper_VADDUQM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VADDUQM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { r->s128 =3D int128_add(a->s128, b->s128); } =20 -void helper_VADDEUQM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *= c) +void HELPER(VADDEUQM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) { r->s128 =3D int128_add(int128_add(a->s128, b->s128), int128_make64(int128_getlo(c->s128) & 1)); } =20 -void helper_VADDCUQ(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VADDCUQ)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { r->VsrD(1) =3D int128_ult(int128_not(a->s128), b->s128); r->VsrD(0) =3D 0; } =20 -void helper_VADDECUQ(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *= c) +void HELPER(VADDECUQ)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) { bool carry_out =3D int128_ult(int128_not(a->s128), b->s128), carry_in =3D int128_getlo(c->s128) & 1; @@ -2144,18 +2149,18 @@ void helper_VADDECUQ(ppc_avr_t *r, ppc_avr_t *a, pp= c_avr_t *b, ppc_avr_t *c) r->VsrD(1) =3D carry_out; } =20 -void helper_VSUBUQM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VSUBUQM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { r->s128 =3D int128_sub(a->s128, b->s128); } =20 -void helper_VSUBEUQM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *= c) +void HELPER(VSUBEUQM)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) { r->s128 =3D int128_add(int128_add(a->s128, int128_not(b->s128)), int128_make64(int128_getlo(c->s128) & 1)); } =20 -void helper_VSUBCUQ(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(VSUBCUQ)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { Int128 tmp =3D int128_not(b->s128); =20 @@ -2164,7 +2169,7 @@ void helper_VSUBCUQ(ppc_avr_t *r, ppc_avr_t *a, ppc_a= vr_t *b) r->VsrD(0) =3D 0; } =20 -void helper_VSUBECUQ(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *= c) +void HELPER(VSUBECUQ)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) { Int128 tmp =3D int128_not(b->s128); bool carry_out =3D int128_ult(int128_not(a->s128), tmp), @@ -2348,7 +2353,7 @@ static void bcd_sub_mag(ppc_avr_t *t, ppc_avr_t *a, p= pc_avr_t *b, int *invalid, *overflow =3D carry; } =20 -uint32_t helper_BCDADD(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t= ps) +uint32_t HELPER(BCDADD)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_= t ps) { =20 int sgna =3D bcd_get_sgn(a); @@ -2395,7 +2400,7 @@ uint32_t helper_BCDADD(ppc_avr_t *r, ppc_avr_t *a, p= pc_avr_t *b, uint32_t ps) return cr; } =20 -uint32_t helper_BCDSUB(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t= ps) +uint32_t HELPER(BCDSUB)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_= t ps) { ppc_avr_t bcopy =3D *b; int sgnb =3D bcd_get_sgn(b); @@ -2406,10 +2411,10 @@ uint32_t helper_BCDSUB(ppc_avr_t *r, ppc_avr_t *a,= ppc_avr_t *b, uint32_t ps) } /* else invalid ... defer to bcdadd code for proper handling */ =20 - return helper_BCDADD(r, a, &bcopy, ps); + return HELPER(BCDADD)(r, a, &bcopy, ps); } =20 -uint32_t helper_BCDCFN(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) +uint32_t HELPER(BCDCFN)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) { int i; int cr =3D 0; @@ -2445,7 +2450,7 @@ uint32_t helper_BCDCFN(ppc_avr_t *r, ppc_avr_t *b, ui= nt32_t ps) return cr; } =20 -uint32_t helper_BCDCTN(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) +uint32_t HELPER(BCDCTN)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) { int i; int cr =3D 0; @@ -2479,7 +2484,7 @@ uint32_t helper_BCDCTN(ppc_avr_t *r, ppc_avr_t *b, ui= nt32_t ps) return cr; } =20 -uint32_t helper_BCDCFZ(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) +uint32_t HELPER(BCDCFZ)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) { int i; int cr =3D 0; @@ -2523,7 +2528,7 @@ uint32_t helper_BCDCFZ(ppc_avr_t *r, ppc_avr_t *b, ui= nt32_t ps) return cr; } =20 -uint32_t helper_BCDCTZ(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) +uint32_t HELPER(BCDCTZ)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) { int i; int cr =3D 0; @@ -2582,7 +2587,7 @@ static inline int ucmp128(uint64_t alo, uint64_t ahi, (ahi > bhi ? 1 : -1); } =20 -uint32_t helper_BCDCFSQ(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) +uint32_t HELPER(BCDCFSQ)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) { int i; int cr; @@ -2640,7 +2645,7 @@ uint32_t helper_BCDCFSQ(ppc_avr_t *r, ppc_avr_t *b, u= int32_t ps) return cr; } =20 -uint32_t helper_BCDCTSQ(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) +uint32_t HELPER(BCDCTSQ)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) { uint8_t i; int cr; @@ -2680,7 +2685,7 @@ uint32_t helper_BCDCTSQ(ppc_avr_t *r, ppc_avr_t *b, u= int32_t ps) return cr; } =20 -uint32_t helper_BCDCPSGN(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_= t ps) +uint32_t HELPER(BCDCPSGN)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32= _t ps) { int i; int invalid =3D 0; @@ -2703,7 +2708,7 @@ uint32_t helper_BCDCPSGN(ppc_avr_t *r, ppc_avr_t *a, = ppc_avr_t *b, uint32_t ps) return bcd_cmp_zero(r); } =20 -uint32_t helper_BCDSETSGN(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) +uint32_t HELPER(BCDSETSGN)(ppc_avr_t *r, ppc_avr_t *b, uint32_t ps) { int sgnb =3D bcd_get_sgn(b); =20 @@ -2717,7 +2722,7 @@ uint32_t helper_BCDSETSGN(ppc_avr_t *r, ppc_avr_t *b,= uint32_t ps) return bcd_cmp_zero(r); } =20 -uint32_t helper_BCDS(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t ps) +uint32_t HELPER(BCDS)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t p= s) { int cr; int i =3D a->VsrSB(7); @@ -2753,7 +2758,7 @@ uint32_t helper_BCDS(ppc_avr_t *r, ppc_avr_t *a, ppc_= avr_t *b, uint32_t ps) return cr; } =20 -uint32_t helper_BCDUS(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t p= s) +uint32_t HELPER(BCDUS)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t = ps) { int cr; int i; @@ -2790,7 +2795,7 @@ uint32_t helper_BCDUS(ppc_avr_t *r, ppc_avr_t *a, ppc= _avr_t *b, uint32_t ps) return cr; } =20 -uint32_t helper_BCDSR(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t p= s) +uint32_t HELPER(BCDSR)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t = ps) { int cr; int unused =3D 0; @@ -2836,7 +2841,7 @@ uint32_t helper_BCDSR(ppc_avr_t *r, ppc_avr_t *a, ppc= _avr_t *b, uint32_t ps) return cr; } =20 -uint32_t helper_BCDTRUNC(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_= t ps) +uint32_t HELPER(BCDTRUNC)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32= _t ps) { uint64_t mask; uint32_t ox_flag =3D 0; @@ -2869,7 +2874,8 @@ uint32_t helper_BCDTRUNC(ppc_avr_t *r, ppc_avr_t *a, = ppc_avr_t *b, uint32_t ps) return bcd_cmp_zero(&ret) | ox_flag; } =20 -uint32_t helper_BCDUTRUNC(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32= _t ps) +uint32_t HELPER(BCDUTRUNC)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, + uint32_t ps) { int i; uint64_t mask; @@ -2916,7 +2922,7 @@ uint32_t helper_BCDUTRUNC(ppc_avr_t *r, ppc_avr_t *a,= ppc_avr_t *b, uint32_t ps) return ox_flag | CRF_GT; } =20 -void helper_vsbox(ppc_avr_t *r, ppc_avr_t *a) +void HELPER(vsbox)(ppc_avr_t *r, ppc_avr_t *a) { int i; VECTOR_FOR_INORDER_I(i, u8) { @@ -2924,7 +2930,7 @@ void helper_vsbox(ppc_avr_t *r, ppc_avr_t *a) } } =20 -void helper_vcipher(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vcipher)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { AESState *ad =3D (AESState *)r; AESState *st =3D (AESState *)a; @@ -2933,12 +2939,12 @@ void helper_vcipher(ppc_avr_t *r, ppc_avr_t *a, ppc= _avr_t *b) aesenc_SB_SR_MC_AK(ad, st, rk, true); } =20 -void helper_vcipherlast(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vcipherlast)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { aesenc_SB_SR_AK((AESState *)r, (AESState *)a, (AESState *)b, true); } =20 -void helper_vncipher(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vncipher)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { AESState *ad =3D (AESState *)r; AESState *st =3D (AESState *)a; @@ -2947,12 +2953,12 @@ void helper_vncipher(ppc_avr_t *r, ppc_avr_t *a, pp= c_avr_t *b) aesdec_ISB_ISR_AK_IMC(ad, st, rk, true); } =20 -void helper_vncipherlast(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +void HELPER(vncipherlast)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { aesdec_ISB_ISR_AK((AESState *)r, (AESState *)a, (AESState *)b, true); } =20 -void helper_vshasigmaw(ppc_avr_t *r, ppc_avr_t *a, uint32_t st_six) +void HELPER(vshasigmaw)(ppc_avr_t *r, ppc_avr_t *a, uint32_t st_six) { int st =3D (st_six & 0x10) !=3D 0; int six =3D st_six & 0xF; @@ -2983,7 +2989,7 @@ void helper_vshasigmaw(ppc_avr_t *r, ppc_avr_t *a, u= int32_t st_six) } } =20 -void helper_vshasigmad(ppc_avr_t *r, ppc_avr_t *a, uint32_t st_six) +void HELPER(vshasigmad)(ppc_avr_t *r, ppc_avr_t *a, uint32_t st_six) { int st =3D (st_six & 0x10) !=3D 0; int six =3D st_six & 0xF; @@ -3014,7 +3020,7 @@ void helper_vshasigmad(ppc_avr_t *r, ppc_avr_t *a, u= int32_t st_six) } } =20 -void helper_vpermxor(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t = *c) +void HELPER(vpermxor)(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t= *c) { ppc_avr_t result; int i; @@ -3050,7 +3056,7 @@ static inline uint32_t word_reverse(uint32_t val) } =20 #define MASKBITS 16 /* Random value - to be fixed (implementation dependen= t) */ -target_ulong helper_brinc(target_ulong arg1, target_ulong arg2) +target_ulong HELPER(brinc)(target_ulong arg1, target_ulong arg2) { uint32_t a, b, d, mask; =20 @@ -3061,7 +3067,7 @@ target_ulong helper_brinc(target_ulong arg1, target_u= long arg2) return (arg1 & ~mask) | (d & b); } =20 -uint32_t helper_cntlsw32(uint32_t val) +uint32_t HELPER(cntlsw32)(uint32_t val) { if (val & 0x80000000) { return clz32(~val); @@ -3070,13 +3076,13 @@ uint32_t helper_cntlsw32(uint32_t val) } } =20 -uint32_t helper_cntlzw32(uint32_t val) +uint32_t HELPER(cntlzw32)(uint32_t val) { return clz32(val); } =20 /* 440 specific */ -target_ulong helper_dlmzb(CPUPPCState *env, target_ulong high, +target_ulong HELPER(dlmzb)(CPUPPCState *env, target_ulong high, target_ulong low, uint32_t update_Rc) { target_ulong mask; diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c index dc5eab8c76c..1f0613479d5 100644 --- a/target/ppc/mem_helper.c +++ b/target/ppc/mem_helper.c @@ -73,7 +73,7 @@ static void *probe_contiguous(CPUPPCState *env, target_ul= ong addr, uint32_t nb, return NULL; } =20 -void helper_LMW(CPUPPCState *env, target_ulong addr, uint32_t reg) +void HELPER(LMW)(CPUPPCState *env, target_ulong addr, uint32_t reg) { uintptr_t raddr =3D GETPC(); int mmu_idx =3D ppc_env_mmu_index(env, false); @@ -98,7 +98,7 @@ void helper_LMW(CPUPPCState *env, target_ulong addr, uint= 32_t reg) } } =20 -void helper_STMW(CPUPPCState *env, target_ulong addr, uint32_t reg) +void HELPER(STMW)(CPUPPCState *env, target_ulong addr, uint32_t reg) { uintptr_t raddr =3D GETPC(); int mmu_idx =3D ppc_env_mmu_index(env, false); @@ -190,7 +190,7 @@ static void do_lsw(CPUPPCState *env, target_ulong addr,= uint32_t nb, env->gpr[reg] =3D val; } =20 -void helper_LSW(CPUPPCState *env, target_ulong addr, +void HELPER(LSW)(CPUPPCState *env, target_ulong addr, uint32_t nb, uint32_t reg) { do_lsw(env, addr, nb, reg, GETPC()); @@ -202,7 +202,7 @@ void helper_LSW(CPUPPCState *env, target_ulong addr, * this is valid, but rA won't be loaded. For now, I'll follow the * spec... */ -void helper_LSWX(CPUPPCState *env, target_ulong addr, uint32_t reg, +void HELPER(LSWX)(CPUPPCState *env, target_ulong addr, uint32_t reg, uint32_t ra, uint32_t rb) { if (likely(xer_bc !=3D 0)) { @@ -218,7 +218,7 @@ void helper_LSWX(CPUPPCState *env, target_ulong addr, u= int32_t reg, } } =20 -void helper_STSW(CPUPPCState *env, target_ulong addr, uint32_t nb, +void HELPER(STSW)(CPUPPCState *env, target_ulong addr, uint32_t nb, uint32_t reg) { uintptr_t raddr =3D GETPC(); @@ -319,13 +319,13 @@ static void dcbz_common(CPUPPCState *env, target_ulon= g addr, clear_helper_retaddr(); } =20 -void helper_dcbz(CPUPPCState *env, target_ulong addr, int mmu_idx) +void HELPER(dcbz)(CPUPPCState *env, target_ulong addr, int mmu_idx) { dcbz_common(env, addr, mmu_idx, env->dcache_line_size, GETPC()); } =20 #ifdef TARGET_PPC64 -void helper_dcbzl(CPUPPCState *env, target_ulong addr) +void HELPER(dcbzl)(CPUPPCState *env, target_ulong addr) { int dcbz_size =3D env->dcache_line_size; =20 @@ -341,7 +341,7 @@ void helper_dcbzl(CPUPPCState *env, target_ulong addr) } #endif =20 -void helper_ICBI(CPUPPCState *env, target_ulong addr) +void HELPER(ICBI)(CPUPPCState *env, target_ulong addr) { unsigned mmu_idx =3D cpu_mmu_index(env_cpu(env), false); MemOpIdx oi =3D make_memop_idx(MO_UL | MO_UNALN, mmu_idx); @@ -357,7 +357,7 @@ void helper_ICBI(CPUPPCState *env, target_ulong addr) cpu_ldl_mmu(env, addr, oi, GETPC()); } =20 -void helper_ICBIEP(CPUPPCState *env, target_ulong addr) +void HELPER(ICBIEP)(CPUPPCState *env, target_ulong addr) { #if !defined(CONFIG_USER_ONLY) MemOpIdx oi =3D make_memop_idx(MO_UL | MO_UNALN, PPC_TLB_EPID_LOAD); @@ -385,7 +385,7 @@ void helper_ICBIEP(CPUPPCState *env, target_ulong addr) */ =20 #define LVE(name, access, swap, element) \ - void helper_##name(CPUPPCState *env, ppc_avr_t *r, \ + void HELPER(name)(CPUPPCState *env, ppc_avr_t *r, \ target_ulong addr) \ { \ size_t n_elems =3D ARRAY_SIZE(r->element); \ @@ -411,7 +411,7 @@ LVE(LVEWX, cpu_ldl_be_data_ra, bswap32, u32) #undef LVE =20 #define STVE(name, access, swap, element) \ - void helper_##name(CPUPPCState *env, ppc_avr_t *r, \ + void HELPER(name)(CPUPPCState *env, ppc_avr_t *r, \ target_ulong addr) \ { \ size_t n_elems =3D ARRAY_SIZE(r->element); \ @@ -441,7 +441,7 @@ STVE(STVEWX, cpu_stl_be_data_ra, bswap32, u32) #define GET_NB(rb) ((rb >> 56) & 0xFF) =20 #define VSX_LXVL(name, lj) \ -void helper_##name(CPUPPCState *env, target_ulong addr, \ +void HELPER(name)(CPUPPCState *env, target_ulong addr, \ ppc_vsr_t *xt, target_ulong rb) \ { \ ppc_vsr_t t; \ @@ -471,7 +471,7 @@ VSX_LXVL(LXVLL, 1) #undef VSX_LXVL =20 #define VSX_STXVL(name, lj) \ -void helper_##name(CPUPPCState *env, target_ulong addr, \ +void HELPER(name)(CPUPPCState *env, target_ulong addr, \ ppc_vsr_t *xt, target_ulong rb) \ { \ target_ulong nb =3D GET_NB(rb); \ @@ -504,7 +504,7 @@ VSX_STXVL(STXVLL, 1) #undef HI_IDX #undef LO_IDX =20 -void helper_tbegin(CPUPPCState *env) +void HELPER(tbegin)(CPUPPCState *env) { /* * As a degenerate implementation, always fail tbegin. The reason diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c index 0e625cbb704..59e6573c863 100644 --- a/target/ppc/misc_helper.c +++ b/target/ppc/misc_helper.c @@ -31,19 +31,19 @@ =20 /*************************************************************************= ****/ /* SPR accesses */ -void helper_load_dump_spr(CPUPPCState *env, uint32_t sprn) +void HELPER(load_dump_spr)(CPUPPCState *env, uint32_t sprn) { qemu_log("Read SPR %d %03x =3D> " TARGET_FMT_lx "\n", sprn, sprn, env->spr[sprn]); } =20 -void helper_store_dump_spr(CPUPPCState *env, uint32_t sprn) +void HELPER(store_dump_spr)(CPUPPCState *env, uint32_t sprn) { qemu_log("Write SPR %d %03x <=3D " TARGET_FMT_lx "\n", sprn, sprn, env->spr[sprn]); } =20 -void helper_spr_core_write_generic(CPUPPCState *env, uint32_t sprn, +void HELPER(spr_core_write_generic)(CPUPPCState *env, uint32_t sprn, target_ulong val) { CPUState *cs =3D env_cpu(env); @@ -60,7 +60,7 @@ void helper_spr_core_write_generic(CPUPPCState *env, uint= 32_t sprn, } } =20 -void helper_spr_write_CTRL(CPUPPCState *env, uint32_t sprn, +void HELPER(spr_write_CTRL)(CPUPPCState *env, uint32_t sprn, target_ulong val) { CPUState *cs =3D env_cpu(env); @@ -123,7 +123,7 @@ void helper_hfscr_facility_check(CPUPPCState *env, uint= 32_t bit, #endif } =20 -void helper_fscr_facility_check(CPUPPCState *env, uint32_t bit, +void HELPER(fscr_facility_check)(CPUPPCState *env, uint32_t bit, uint32_t sprn, uint32_t cause) { #ifdef TARGET_PPC64 @@ -135,7 +135,7 @@ void helper_fscr_facility_check(CPUPPCState *env, uint3= 2_t bit, #endif } =20 -void helper_msr_facility_check(CPUPPCState *env, uint32_t bit, +void HELPER(msr_facility_check)(CPUPPCState *env, uint32_t bit, uint32_t sprn, uint32_t cause) { #ifdef TARGET_PPC64 @@ -160,7 +160,7 @@ static void helper_mmcr0_facility_check(CPUPPCState *en= v, uint32_t bit, } #endif =20 -void helper_store_sdr1(CPUPPCState *env, target_ulong val) +void HELPER(store_sdr1)(CPUPPCState *env, target_ulong val) { if (env->spr[SPR_SDR1] !=3D val) { ppc_store_sdr1(env, val); @@ -169,7 +169,7 @@ void helper_store_sdr1(CPUPPCState *env, target_ulong v= al) } =20 #if defined(TARGET_PPC64) -void helper_store_ptcr(CPUPPCState *env, target_ulong val) +void HELPER(store_ptcr)(CPUPPCState *env, target_ulong val) { if (env->spr[SPR_PTCR] !=3D val) { CPUState *cs =3D env_cpu(env); @@ -210,7 +210,7 @@ void helper_store_ptcr(CPUPPCState *env, target_ulong v= al) } } =20 -void helper_store_pcr(CPUPPCState *env, target_ulong value) +void HELPER(store_pcr)(CPUPPCState *env, target_ulong value) { PowerPCCPU *cpu =3D env_archcpu(env); PowerPCCPUClass *pcc =3D POWERPC_CPU_GET_CLASS(cpu); @@ -218,27 +218,27 @@ void helper_store_pcr(CPUPPCState *env, target_ulong = value) env->spr[SPR_PCR] =3D value & pcc->pcr_mask; } =20 -void helper_store_ciabr(CPUPPCState *env, target_ulong value) +void HELPER(store_ciabr)(CPUPPCState *env, target_ulong value) { ppc_store_ciabr(env, value); } =20 -void helper_store_dawr0(CPUPPCState *env, target_ulong value) +void HELPER(store_dawr0)(CPUPPCState *env, target_ulong value) { ppc_store_dawr0(env, value); } =20 -void helper_store_dawrx0(CPUPPCState *env, target_ulong value) +void HELPER(store_dawrx0)(CPUPPCState *env, target_ulong value) { ppc_store_dawrx0(env, value); } =20 -void helper_store_dawr1(CPUPPCState *env, target_ulong value) +void HELPER(store_dawr1)(CPUPPCState *env, target_ulong value) { ppc_store_dawr1(env, value); } =20 -void helper_store_dawrx1(CPUPPCState *env, target_ulong value) +void HELPER(store_dawrx1)(CPUPPCState *env, target_ulong value) { ppc_store_dawrx1(env, value); } @@ -247,7 +247,7 @@ void helper_store_dawrx1(CPUPPCState *env, target_ulong= value) * DPDES register is shared. Each bit reflects the state of the * doorbell interrupt of a thread of the same core. */ -target_ulong helper_load_dpdes(CPUPPCState *env) +target_ulong HELPER(load_dpdes)(CPUPPCState *env) { CPUState *cs =3D env_cpu(env); CPUState *ccs; @@ -278,7 +278,7 @@ target_ulong helper_load_dpdes(CPUPPCState *env) return dpdes; } =20 -void helper_store_dpdes(CPUPPCState *env, target_ulong val) +void HELPER(store_dpdes)(CPUPPCState *env, target_ulong val) { PowerPCCPU *cpu =3D env_archcpu(env); CPUState *cs =3D env_cpu(env); @@ -311,7 +311,7 @@ void helper_store_dpdes(CPUPPCState *env, target_ulong = val) #include "hw/ppc/pnv_core.h" =20 /* Indirect SCOM (SPRC/SPRD) access to SCRATCH0-7 are implemented. */ -void helper_store_sprc(CPUPPCState *env, target_ulong val) +void HELPER(store_sprc)(CPUPPCState *env, target_ulong val) { if (val & ~0x3f8ULL) { qemu_log_mask(LOG_GUEST_ERROR, "Invalid SPRC register value " @@ -321,7 +321,7 @@ void helper_store_sprc(CPUPPCState *env, target_ulong v= al) env->spr[SPR_POWER_SPRC] =3D val; } =20 -target_ulong helper_load_sprd(CPUPPCState *env) +target_ulong HELPER(load_sprd)(CPUPPCState *env) { /* * SPRD is a HV-only register for Power CPUs, so this will only be @@ -337,7 +337,7 @@ target_ulong helper_load_sprd(CPUPPCState *env) return 0; } =20 -void helper_store_sprd(CPUPPCState *env, target_ulong val) +void HELPER(store_sprd)(CPUPPCState *env, target_ulong val) { PowerPCCPU *cpu =3D env_archcpu(env); PowerPCCPUClass *pcc =3D POWERPC_CPU_GET_CLASS(cpu); @@ -347,7 +347,7 @@ void helper_store_sprd(CPUPPCState *env, target_ulong v= al) } } =20 -target_ulong helper_load_pmsr(CPUPPCState *env) +target_ulong HELPER(load_pmsr)(CPUPPCState *env) { target_ulong lowerps =3D extract64(env->spr[SPR_PMCR], PPC_BIT_NR(15),= 8); target_ulong val =3D 0; @@ -367,7 +367,7 @@ static void ppc_set_pmcr(PowerPCCPU *cpu, target_ulong = val) cpu->env.spr[SPR_PMCR] =3D val; } =20 -void helper_store_pmcr(CPUPPCState *env, target_ulong val) +void HELPER(store_pmcr)(CPUPPCState *env, target_ulong val) { PowerPCCPU *cpu =3D env_archcpu(env); CPUState *cs =3D env_cpu(env); @@ -401,13 +401,13 @@ void helper_store_pmcr(CPUPPCState *env, target_ulong= val) =20 #endif /* defined(TARGET_PPC64) */ =20 -void helper_store_pidr(CPUPPCState *env, target_ulong val) +void HELPER(store_pidr)(CPUPPCState *env, target_ulong val) { env->spr[SPR_BOOKS_PID] =3D (uint32_t)val; tlb_flush(env_cpu(env)); } =20 -void helper_store_lpidr(CPUPPCState *env, target_ulong val) +void HELPER(store_lpidr)(CPUPPCState *env, target_ulong val) { env->spr[SPR_LPIDR] =3D (uint32_t)val; =20 @@ -420,7 +420,7 @@ void helper_store_lpidr(CPUPPCState *env, target_ulong = val) tlb_flush(env_cpu(env)); } =20 -void helper_store_40x_dbcr0(CPUPPCState *env, target_ulong val) +void HELPER(store_40x_dbcr0)(CPUPPCState *env, target_ulong val) { /* Bits 26 & 27 affect single-stepping. */ hreg_compute_hflags(env); @@ -428,7 +428,7 @@ void helper_store_40x_dbcr0(CPUPPCState *env, target_ul= ong val) store_40x_dbcr0(env, val); } =20 -void helper_store_40x_sler(CPUPPCState *env, target_ulong val) +void HELPER(store_40x_sler)(CPUPPCState *env, target_ulong val) { store_40x_sler(env, val); } @@ -443,7 +443,7 @@ void helper_store_40x_sler(CPUPPCState *env, target_ulo= ng val) * MacOS not hang. These registers exist on some 75x and 74xx * processors. */ -void helper_fixup_thrm(CPUPPCState *env) +void HELPER(fixup_thrm)(CPUPPCState *env) { target_ulong v, t; int i; @@ -481,7 +481,7 @@ void helper_fixup_thrm(CPUPPCState *env) =20 #if !defined(CONFIG_USER_ONLY) #if defined(TARGET_PPC64) -void helper_clrbhrb(CPUPPCState *env) +void HELPER(clrbhrb)(CPUPPCState *env) { helper_hfscr_facility_check(env, HFSCR_BHRB, "clrbhrb", FSCR_IC_BHRB); =20 @@ -492,7 +492,7 @@ void helper_clrbhrb(CPUPPCState *env) } } =20 -uint64_t helper_mfbhrbe(CPUPPCState *env, uint32_t bhrbe) +uint64_t HELPER(mfbhrbe)(CPUPPCState *env, uint32_t bhrbe) { unsigned int index; =20 diff --git a/target/ppc/mmu-hash64.c b/target/ppc/mmu-hash64.c index 2c33d98001d..e5238f0c245 100644 --- a/target/ppc/mmu-hash64.c +++ b/target/ppc/mmu-hash64.c @@ -104,7 +104,7 @@ void dump_slb(PowerPCCPU *cpu) } =20 #ifdef CONFIG_TCG -void helper_SLBIA(CPUPPCState *env, uint32_t ih) +void HELPER(SLBIA)(CPUPPCState *env, uint32_t ih) { PowerPCCPU *cpu =3D env_archcpu(env); int starting_entry; @@ -177,7 +177,7 @@ void helper_SLBIA(CPUPPCState *env, uint32_t ih) } =20 #if defined(TARGET_PPC64) -void helper_SLBIAG(CPUPPCState *env, target_ulong rs, uint32_t l) +void HELPER(SLBIAG)(CPUPPCState *env, target_ulong rs, uint32_t l) { PowerPCCPU *cpu =3D env_archcpu(env); int n; @@ -227,12 +227,12 @@ static void __helper_slbie(CPUPPCState *env, target_u= long addr, } } =20 -void helper_SLBIE(CPUPPCState *env, target_ulong addr) +void HELPER(SLBIE)(CPUPPCState *env, target_ulong addr) { __helper_slbie(env, addr, false); } =20 -void helper_SLBIEG(CPUPPCState *env, target_ulong addr) +void HELPER(SLBIEG)(CPUPPCState *env, target_ulong addr) { __helper_slbie(env, addr, true); } @@ -339,7 +339,7 @@ static int ppc_find_slb_vsid(PowerPCCPU *cpu, target_ul= ong rb, return 0; } =20 -void helper_SLBMTE(CPUPPCState *env, target_ulong rb, target_ulong rs) +void HELPER(SLBMTE)(CPUPPCState *env, target_ulong rb, target_ulong rs) { PowerPCCPU *cpu =3D env_archcpu(env); =20 @@ -349,7 +349,7 @@ void helper_SLBMTE(CPUPPCState *env, target_ulong rb, t= arget_ulong rs) } } =20 -target_ulong helper_SLBMFEE(CPUPPCState *env, target_ulong rb) +target_ulong HELPER(SLBMFEE)(CPUPPCState *env, target_ulong rb) { PowerPCCPU *cpu =3D env_archcpu(env); target_ulong rt =3D 0; @@ -361,7 +361,7 @@ target_ulong helper_SLBMFEE(CPUPPCState *env, target_ul= ong rb) return rt; } =20 -target_ulong helper_SLBFEE(CPUPPCState *env, target_ulong rb) +target_ulong HELPER(SLBFEE)(CPUPPCState *env, target_ulong rb) { PowerPCCPU *cpu =3D env_archcpu(env); target_ulong rt =3D 0; @@ -373,7 +373,7 @@ target_ulong helper_SLBFEE(CPUPPCState *env, target_ulo= ng rb) return rt; } =20 -target_ulong helper_SLBMFEV(CPUPPCState *env, target_ulong rb) +target_ulong HELPER(SLBMFEV)(CPUPPCState *env, target_ulong rb) { PowerPCCPU *cpu =3D env_archcpu(env); target_ulong rt =3D 0; @@ -1220,7 +1220,7 @@ void ppc_hash64_tlb_flush_hpte(PowerPCCPU *cpu, targe= t_ulong ptex, } =20 #ifdef CONFIG_TCG -void helper_store_lpcr(CPUPPCState *env, target_ulong val) +void HELPER(store_lpcr)(CPUPPCState *env, target_ulong val) { PowerPCCPU *cpu =3D env_archcpu(env); =20 diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index ac607054027..5a3e3a7beab 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -179,7 +179,7 @@ static inline void dump_store_bat(CPUPPCState *env, cha= r ID, int ul, int nr, value, env->nip); } =20 -void helper_store_ibatu(CPUPPCState *env, uint32_t nr, target_ulong value) +void HELPER(store_ibatu)(CPUPPCState *env, uint32_t nr, target_ulong value) { target_ulong mask; =20 @@ -206,13 +206,13 @@ void helper_store_ibatu(CPUPPCState *env, uint32_t nr= , target_ulong value) } } =20 -void helper_store_ibatl(CPUPPCState *env, uint32_t nr, target_ulong value) +void HELPER(store_ibatl)(CPUPPCState *env, uint32_t nr, target_ulong value) { dump_store_bat(env, 'I', 1, nr, value); env->IBAT[1][nr] =3D value; } =20 -void helper_store_dbatu(CPUPPCState *env, uint32_t nr, target_ulong value) +void HELPER(store_dbatu)(CPUPPCState *env, uint32_t nr, target_ulong value) { target_ulong mask; =20 @@ -239,7 +239,7 @@ void helper_store_dbatu(CPUPPCState *env, uint32_t nr, = target_ulong value) } } =20 -void helper_store_dbatl(CPUPPCState *env, uint32_t nr, target_ulong value) +void HELPER(store_dbatl)(CPUPPCState *env, uint32_t nr, target_ulong value) { dump_store_bat(env, 'D', 1, nr, value); env->DBAT[1][nr] =3D value; @@ -328,7 +328,7 @@ void ppc_tlb_invalidate_one(CPUPPCState *env, target_ul= ong addr) /* Special registers manipulation */ =20 /* Segment registers load and store */ -target_ulong helper_load_sr(CPUPPCState *env, target_ulong sr_num) +target_ulong HELPER(load_sr)(CPUPPCState *env, target_ulong sr_num) { #if defined(TARGET_PPC64) if (mmu_is_64bit(env->mmu_model)) { @@ -339,7 +339,7 @@ target_ulong helper_load_sr(CPUPPCState *env, target_ul= ong sr_num) return env->sr[sr_num]; } =20 -void helper_store_sr(CPUPPCState *env, target_ulong srnum, target_ulong va= lue) +void HELPER(store_sr)(CPUPPCState *env, target_ulong srnum, target_ulong v= alue) { qemu_log_mask(CPU_LOG_MMU, "%s: reg=3D%d " TARGET_FMT_lx " " TARGET_FMT_lx "\n", __func__, @@ -383,12 +383,12 @@ void helper_store_sr(CPUPPCState *env, target_ulong s= rnum, target_ulong value) } =20 /* TLB management */ -void helper_tlbia(CPUPPCState *env) +void HELPER(tlbia)(CPUPPCState *env) { ppc_tlb_invalidate_all(env); } =20 -void helper_tlbie(CPUPPCState *env, target_ulong addr) +void HELPER(tlbie)(CPUPPCState *env, target_ulong addr) { ppc_tlb_invalidate_one(env, addr); } @@ -418,7 +418,7 @@ void helper_tlbie(CPUPPCState *env, target_ulong addr) #define TLBIE_RB_IS_MASK PPC_BITMASK(52, 53) #define TLBIE_RB_AP_MASK PPC_BITMASK(56, 58) =20 -void helper_tlbie_isa300(CPUPPCState *env, target_ulong rb, target_ulong r= s, +void HELPER(tlbie_isa300)(CPUPPCState *env, target_ulong rb, target_ulong = rs, uint32_t flags) { unsigned ric =3D (flags & TLBIE_F_RIC_MASK) >> TLBIE_F_RIC_SHIFT; @@ -547,7 +547,7 @@ invalid: =20 #endif =20 -void helper_tlbiva(CPUPPCState *env, target_ulong addr) +void HELPER(tlbiva)(CPUPPCState *env, target_ulong addr) { /* tlbiva instruction only exists on BookE */ assert(env->mmu_model =3D=3D POWERPC_MMU_BOOKE); @@ -580,12 +580,12 @@ static void do_6xx_tlb(CPUPPCState *env, target_ulong= new_EPN, int is_code) way, is_code, CMP, RPN); } =20 -void helper_6xx_tlbd(CPUPPCState *env, target_ulong EPN) +void HELPER(6xx_tlbd)(CPUPPCState *env, target_ulong EPN) { do_6xx_tlb(env, EPN, 0); } =20 -void helper_6xx_tlbi(CPUPPCState *env, target_ulong EPN) +void HELPER(6xx_tlbi)(CPUPPCState *env, target_ulong EPN) { do_6xx_tlb(env, EPN, 1); } @@ -674,7 +674,7 @@ static inline int booke_page_size_to_tlb(target_ulong p= age_size) #define PPC4XX_TLBLO_ATTR_MASK 0x000000FF #define PPC4XX_TLBLO_RPN_MASK 0xFFFFFC00 =20 -void helper_store_40x_pid(CPUPPCState *env, target_ulong val) +void HELPER(store_40x_pid)(CPUPPCState *env, target_ulong val) { if (env->spr[SPR_40x_PID] !=3D val) { env->spr[SPR_40x_PID] =3D val; @@ -682,7 +682,7 @@ void helper_store_40x_pid(CPUPPCState *env, target_ulon= g val) } } =20 -target_ulong helper_4xx_tlbre_hi(CPUPPCState *env, target_ulong entry) +target_ulong HELPER(4xx_tlbre_hi)(CPUPPCState *env, target_ulong entry) { ppcemb_tlb_t *tlb; target_ulong ret; @@ -699,11 +699,11 @@ target_ulong helper_4xx_tlbre_hi(CPUPPCState *env, ta= rget_ulong entry) size =3D PPC4XX_TLBHI_SIZE_DEFAULT; } ret |=3D size << PPC4XX_TLBHI_SIZE_SHIFT; - helper_store_40x_pid(env, tlb->PID); + HELPER(store_40x_pid)(env, tlb->PID); return ret; } =20 -target_ulong helper_4xx_tlbre_lo(CPUPPCState *env, target_ulong entry) +target_ulong HELPER(4xx_tlbre_lo)(CPUPPCState *env, target_ulong entry) { ppcemb_tlb_t *tlb; target_ulong ret; @@ -738,7 +738,7 @@ static void ppcemb_tlb_flush(CPUState *cs, ppcemb_tlb_t= *tlb) TARGET_LONG_BITS); } =20 -void helper_4xx_tlbwe_hi(CPUPPCState *env, target_ulong entry, +void HELPER(4xx_tlbwe_hi)(CPUPPCState *env, target_ulong entry, target_ulong val) { CPUState *cs =3D env_cpu(env); @@ -790,7 +790,7 @@ void helper_4xx_tlbwe_hi(CPUPPCState *env, target_ulong= entry, tlb->prot & PAGE_VALID ? 'v' : '-', (int)tlb->PID); } =20 -void helper_4xx_tlbwe_lo(CPUPPCState *env, target_ulong entry, +void HELPER(4xx_tlbwe_lo)(CPUPPCState *env, target_ulong entry, target_ulong val) { CPUState *cs =3D env_cpu(env); @@ -826,7 +826,7 @@ void helper_4xx_tlbwe_lo(CPUPPCState *env, target_ulong= entry, tlb->prot & PAGE_VALID ? 'v' : '-', (int)tlb->PID); } =20 -target_ulong helper_4xx_tlbsx(CPUPPCState *env, target_ulong address) +target_ulong HELPER(4xx_tlbsx)(CPUPPCState *env, target_ulong address) { return ppcemb_tlb_search(env, address, env->spr[SPR_40x_PID]); } @@ -851,7 +851,7 @@ static bool mmubooke_pid_match(CPUPPCState *env, ppcemb= _tlb_t *tlb) } =20 /* PowerPC 440 TLB management */ -void helper_440_tlbwe(CPUPPCState *env, uint32_t word, target_ulong entry, +void HELPER(440_tlbwe)(CPUPPCState *env, uint32_t word, target_ulong entry, target_ulong value) { ppcemb_tlb_t *tlb; @@ -912,7 +912,7 @@ void helper_440_tlbwe(CPUPPCState *env, uint32_t word, = target_ulong entry, } } =20 -target_ulong helper_440_tlbre(CPUPPCState *env, uint32_t word, +target_ulong HELPER(440_tlbre)(CPUPPCState *env, uint32_t word, target_ulong entry) { ppcemb_tlb_t *tlb; @@ -968,7 +968,7 @@ target_ulong helper_440_tlbre(CPUPPCState *env, uint32_= t word, return ret; } =20 -target_ulong helper_440_tlbsx(CPUPPCState *env, target_ulong address) +target_ulong HELPER(440_tlbsx)(CPUPPCState *env, target_ulong address) { return ppcemb_tlb_search(env, address, env->spr[SPR_440_MMUCR] & 0xFF); } @@ -992,19 +992,19 @@ static ppcmas_tlb_t *booke206_cur_tlb(CPUPPCState *en= v) return booke206_get_tlbm(env, tlb, ea, esel); } =20 -void helper_booke_setpid(CPUPPCState *env, uint32_t pidn, target_ulong pid) +void HELPER(booke_setpid)(CPUPPCState *env, uint32_t pidn, target_ulong pi= d) { env->spr[pidn] =3D pid; /* changing PIDs mean we're in a different address space now */ tlb_flush(env_cpu(env)); } =20 -void helper_booke_set_eplc(CPUPPCState *env, target_ulong val) +void HELPER(booke_set_eplc)(CPUPPCState *env, target_ulong val) { env->spr[SPR_BOOKE_EPLC] =3D val & EPID_MASK; tlb_flush_by_mmuidx(env_cpu(env), 1 << PPC_TLB_EPID_LOAD); } -void helper_booke_set_epsc(CPUPPCState *env, target_ulong val) +void HELPER(booke_set_epsc)(CPUPPCState *env, target_ulong val) { env->spr[SPR_BOOKE_EPSC] =3D val & EPID_MASK; tlb_flush_by_mmuidx(env_cpu(env), 1 << PPC_TLB_EPID_STORE); @@ -1019,7 +1019,7 @@ static inline void flush_page(CPUPPCState *env, ppcma= s_tlb_t *tlb) } } =20 -void helper_booke206_tlbwe(CPUPPCState *env) +void HELPER(booke206_tlbwe)(CPUPPCState *env) { uint32_t tlbncfg, tlbn; ppcmas_tlb_t *tlb; @@ -1147,7 +1147,7 @@ static inline void booke206_tlb_to_mas(CPUPPCState *e= nv, ppcmas_tlb_t *tlb) env->spr[SPR_BOOKE_MAS7] =3D tlb->mas7_3 >> 32; } =20 -void helper_booke206_tlbre(CPUPPCState *env) +void HELPER(booke206_tlbre)(CPUPPCState *env) { ppcmas_tlb_t *tlb =3D NULL; =20 @@ -1159,7 +1159,7 @@ void helper_booke206_tlbre(CPUPPCState *env) } } =20 -void helper_booke206_tlbsx(CPUPPCState *env, target_ulong address) +void HELPER(booke206_tlbsx)(CPUPPCState *env, target_ulong address) { ppcmas_tlb_t *tlb =3D NULL; int i, j; @@ -1233,7 +1233,7 @@ static inline void booke206_invalidate_ea_tlb(CPUPPCS= tate *env, int tlbn, } } =20 -void helper_booke206_tlbivax(CPUPPCState *env, target_ulong address) +void HELPER(booke206_tlbivax)(CPUPPCState *env, target_ulong address) { CPUState *cs; =20 @@ -1264,13 +1264,13 @@ void helper_booke206_tlbivax(CPUPPCState *env, targ= et_ulong address) } } =20 -void helper_booke206_tlbilx0(CPUPPCState *env, target_ulong address) +void HELPER(booke206_tlbilx0)(CPUPPCState *env, target_ulong address) { /* XXX missing LPID handling */ booke206_flush_tlb(env, -1, 1); } =20 -void helper_booke206_tlbilx1(CPUPPCState *env, target_ulong address) +void HELPER(booke206_tlbilx1)(CPUPPCState *env, target_ulong address) { int i, j; int tid =3D (env->spr[SPR_BOOKE_MAS6] & MAS6_SPID); @@ -1291,7 +1291,7 @@ void helper_booke206_tlbilx1(CPUPPCState *env, target= _ulong address) tlb_flush(env_cpu(env)); } =20 -void helper_booke206_tlbilx3(CPUPPCState *env, target_ulong address) +void HELPER(booke206_tlbilx3)(CPUPPCState *env, target_ulong address) { int i, j; ppcmas_tlb_t *tlb; @@ -1331,7 +1331,7 @@ void helper_booke206_tlbilx3(CPUPPCState *env, target= _ulong address) tlb_flush(env_cpu(env)); } =20 -void helper_booke206_tlbflush(CPUPPCState *env, target_ulong type) +void HELPER(booke206_tlbflush)(CPUPPCState *env, target_ulong type) { int flags =3D 0; =20 @@ -1347,12 +1347,12 @@ void helper_booke206_tlbflush(CPUPPCState *env, tar= get_ulong type) } =20 =20 -void helper_check_tlb_flush_local(CPUPPCState *env) +void HELPER(check_tlb_flush_local)(CPUPPCState *env) { check_tlb_flush(env, false); } =20 -void helper_check_tlb_flush_global(CPUPPCState *env) +void HELPER(check_tlb_flush_global)(CPUPPCState *env) { check_tlb_flush(env, true); } diff --git a/target/ppc/power8-pmu.c b/target/ppc/power8-pmu.c index 2a7a5b493af..772e257e87a 100644 --- a/target/ppc/power8-pmu.c +++ b/target/ppc/power8-pmu.c @@ -286,7 +286,7 @@ static void pmu_delete_timers(CPUPPCState *env) } } =20 -void helper_store_mmcr0(CPUPPCState *env, target_ulong value) +void HELPER(store_mmcr0)(CPUPPCState *env, target_ulong value) { pmu_update_cycles(env); =20 @@ -298,7 +298,7 @@ void helper_store_mmcr0(CPUPPCState *env, target_ulong = value) pmu_update_overflow_timers(env); } =20 -void helper_store_mmcr1(CPUPPCState *env, uint64_t value) +void HELPER(store_mmcr1)(CPUPPCState *env, uint64_t value) { pmu_update_cycles(env); =20 @@ -307,21 +307,21 @@ void helper_store_mmcr1(CPUPPCState *env, uint64_t va= lue) pmu_mmcr01a_updated(env); } =20 -void helper_store_mmcrA(CPUPPCState *env, uint64_t value) +void HELPER(store_mmcrA)(CPUPPCState *env, uint64_t value) { env->spr[SPR_POWER_MMCRA] =3D value; =20 pmu_mmcr01a_updated(env); } =20 -target_ulong helper_read_pmc(CPUPPCState *env, uint32_t sprn) +target_ulong HELPER(read_pmc)(CPUPPCState *env, uint32_t sprn) { pmu_update_cycles(env); =20 return env->spr[sprn]; } =20 -void helper_store_pmc(CPUPPCState *env, uint32_t sprn, uint64_t value) +void HELPER(store_pmc)(CPUPPCState *env, uint32_t sprn, uint64_t value) { pmu_update_cycles(env); =20 @@ -360,14 +360,14 @@ static void perfm_alert(PowerPCCPU *cpu) raise_ebb_perfm_exception(env); } =20 -void helper_handle_pmc5_overflow(CPUPPCState *env) +void HELPER(handle_pmc5_overflow)(CPUPPCState *env) { env->spr[SPR_POWER_PMC5] =3D PMC_COUNTER_NEGATIVE_VAL; perfm_alert(env_archcpu(env)); } =20 /* This helper assumes that the PMC is running. */ -void helper_insns_inc(CPUPPCState *env, uint32_t num_insns) +void HELPER(insns_inc)(CPUPPCState *env, uint32_t num_insns) { bool overflow_triggered; =20 diff --git a/target/ppc/tcg-excp_helper.c b/target/ppc/tcg-excp_helper.c index 93aedb0c8e2..6ff24e8b719 100644 --- a/target/ppc/tcg-excp_helper.c +++ b/target/ppc/tcg-excp_helper.c @@ -44,13 +44,13 @@ void raise_exception_err_ra(CPUPPCState *env, uint32_t = exception, cpu_loop_exit_restore(cs, raddr); } =20 -void helper_raise_exception_err(CPUPPCState *env, uint32_t exception, +void HELPER(raise_exception_err)(CPUPPCState *env, uint32_t exception, uint32_t error_code) { raise_exception_err_ra(env, exception, error_code, 0); } =20 -void helper_raise_exception(CPUPPCState *env, uint32_t exception) +void HELPER(raise_exception)(CPUPPCState *env, uint32_t exception) { raise_exception_err_ra(env, exception, 0, 0); } @@ -70,7 +70,7 @@ static G_NORETURN void raise_exception(CPUPPCState *env, = uint32_t exception) =20 #endif /* !CONFIG_USER_ONLY */ =20 -void helper_TW(CPUPPCState *env, target_ulong arg1, target_ulong arg2, +void HELPER(TW)(CPUPPCState *env, target_ulong arg1, target_ulong arg2, uint32_t flags) { if (!likely(!(((int32_t)arg1 < (int32_t)arg2 && (flags & 0x10)) || @@ -84,7 +84,7 @@ void helper_TW(CPUPPCState *env, target_ulong arg1, targe= t_ulong arg2, } =20 #ifdef TARGET_PPC64 -void helper_TD(CPUPPCState *env, target_ulong arg1, target_ulong arg2, +void HELPER(TD)(CPUPPCState *env, target_ulong arg1, target_ulong arg2, uint32_t flags) { if (!likely(!(((int64_t)arg1 < (int64_t)arg2 && (flags & 0x10)) || @@ -181,7 +181,7 @@ static void do_hash(CPUPPCState *env, target_ulong ea, = target_ulong ra, =20 #ifdef TARGET_PPC64 #define HELPER_HASH(op, key, store, dexcr_aspect) = \ -void helper_##op(CPUPPCState *env, target_ulong ea, target_ulong ra, = \ +void HELPER(op)(CPUPPCState *env, target_ulong ea, target_ulong ra, = \ target_ulong rb) = \ { = \ if (env->msr & R_MSR_PR_MASK) { = \ @@ -201,7 +201,7 @@ void helper_##op(CPUPPCState *env, target_ulong ea, tar= get_ulong ra, \ } #else #define HELPER_HASH(op, key, store, dexcr_aspect) = \ -void helper_##op(CPUPPCState *env, target_ulong ea, target_ulong ra, = \ +void HELPER(op)(CPUPPCState *env, target_ulong ea, target_ulong ra, = \ target_ulong rb) = \ { = \ do_hash(env, ea, ra, rb, key, store); = \ @@ -439,7 +439,7 @@ uint32_t ppc_ldl_code(CPUArchState *env, target_ulong a= ddr) } =20 #if defined(TARGET_PPC64) -void helper_attn(CPUPPCState *env) +void HELPER(attn)(CPUPPCState *env) { /* POWER attn is unprivileged when enabled by HID, otherwise illegal */ if ((*env->check_attn)(env)) { @@ -450,7 +450,7 @@ void helper_attn(CPUPPCState *env) } } =20 -void helper_scv(CPUPPCState *env, uint32_t lev) +void HELPER(scv)(CPUPPCState *env, uint32_t lev) { if (env->spr[SPR_FSCR] & (1ull << FSCR_SCV)) { raise_exception_err(env, POWERPC_EXCP_SYSCALL_VECTORED, lev); @@ -459,7 +459,7 @@ void helper_scv(CPUPPCState *env, uint32_t lev) } } =20 -void helper_PMINSN(CPUPPCState *env, uint32_t insn) +void HELPER(PMINSN)(CPUPPCState *env, uint32_t insn) { CPUState *cs =3D env_cpu(env); =20 @@ -479,7 +479,7 @@ void helper_PMINSN(CPUPPCState *env, uint32_t insn) } =20 #endif /* TARGET_PPC64 */ -void helper_store_msr(CPUPPCState *env, target_ulong val) +void HELPER(store_msr)(CPUPPCState *env, target_ulong val) { uint32_t excp =3D hreg_store_msr(env, val, 0); =20 @@ -489,7 +489,7 @@ void helper_store_msr(CPUPPCState *env, target_ulong va= l) } } =20 -void helper_ppc_maybe_interrupt(CPUPPCState *env) +void HELPER(ppc_maybe_interrupt)(CPUPPCState *env) { ppc_maybe_interrupt(env); } @@ -528,13 +528,13 @@ static void do_rfi(CPUPPCState *env, target_ulong nip= , target_ulong msr) check_tlb_flush(env, false); } =20 -void helper_RFI(CPUPPCState *env) +void HELPER(RFI)(CPUPPCState *env) { do_rfi(env, env->spr[SPR_SRR0], env->spr[SPR_SRR1] & 0xfffffffful); } =20 #ifdef TARGET_PPC64 -void helper_RFID(CPUPPCState *env) +void HELPER(RFID)(CPUPPCState *env) { /* * The architecture defines a number of rules for which bits can @@ -545,17 +545,17 @@ void helper_RFID(CPUPPCState *env) do_rfi(env, env->spr[SPR_SRR0], env->spr[SPR_SRR1]); } =20 -void helper_RFSCV(CPUPPCState *env) +void HELPER(RFSCV)(CPUPPCState *env) { do_rfi(env, env->lr, env->ctr); } =20 -void helper_HRFID(CPUPPCState *env) +void HELPER(HRFID)(CPUPPCState *env) { do_rfi(env, env->spr[SPR_HSRR0], env->spr[SPR_HSRR1]); } =20 -void helper_rfebb(CPUPPCState *env, target_ulong s) +void HELPER(rfebb)(CPUPPCState *env, target_ulong s) { target_ulong msr =3D env->msr; =20 @@ -601,7 +601,7 @@ static void do_ebb(CPUPPCState *env, int ebb_excp) * FSCR_EBB and FSCR_IC_EBB are the same bits used with * HFSCR. */ - helper_fscr_facility_check(env, FSCR_EBB, 0, FSCR_IC_EBB); + HELPER(fscr_facility_check)(env, FSCR_EBB, 0, FSCR_IC_EBB); helper_hfscr_facility_check(env, FSCR_EBB, "EBB", FSCR_IC_EBB); =20 if (ebb_excp =3D=3D POWERPC_EXCP_PERFM_EBB) { @@ -633,23 +633,23 @@ void raise_ebb_perfm_exception(CPUPPCState *env) =20 /*************************************************************************= ****/ /* Embedded PowerPC specific helpers */ -void helper_40x_rfci(CPUPPCState *env) +void HELPER(40x_rfci)(CPUPPCState *env) { do_rfi(env, env->spr[SPR_40x_SRR2], env->spr[SPR_40x_SRR3]); } =20 -void helper_rfci(CPUPPCState *env) +void HELPER(rfci)(CPUPPCState *env) { do_rfi(env, env->spr[SPR_BOOKE_CSRR0], env->spr[SPR_BOOKE_CSRR1]); } =20 -void helper_rfdi(CPUPPCState *env) +void HELPER(rfdi)(CPUPPCState *env) { /* FIXME: choose CSRR1 or DSRR1 based on cpu type */ do_rfi(env, env->spr[SPR_BOOKE_DSRR0], env->spr[SPR_BOOKE_DSRR1]); } =20 -void helper_rfmci(CPUPPCState *env) +void HELPER(rfmci)(CPUPPCState *env) { /* FIXME: choose CSRR1 or MCSRR1 based on cpu type */ do_rfi(env, env->spr[SPR_BOOKE_MCSRR0], env->spr[SPR_BOOKE_MCSRR1]); @@ -679,7 +679,7 @@ static int dbell2irq(target_ulong rb) return irq; } =20 -void helper_msgclr(CPUPPCState *env, target_ulong rb) +void HELPER(msgclr)(CPUPPCState *env, target_ulong rb) { int irq =3D dbell2irq(rb); =20 @@ -690,7 +690,7 @@ void helper_msgclr(CPUPPCState *env, target_ulong rb) ppc_set_irq(env_archcpu(env), irq, 0); } =20 -void helper_msgsnd(target_ulong rb) +void HELPER(msgsnd)(target_ulong rb) { int irq =3D dbell2irq(rb); int pir =3D rb & DBELL_PIRTAG_MASK; @@ -762,7 +762,7 @@ static void msgsnd_core_tir(CPUPPCState *env, uint32_t = target_tir, int irq) } } =20 -void helper_book3s_msgclr(CPUPPCState *env, target_ulong rb) +void HELPER(book3s_msgclr)(CPUPPCState *env, target_ulong rb) { if (!dbell_type_server(rb)) { return; @@ -771,7 +771,7 @@ void helper_book3s_msgclr(CPUPPCState *env, target_ulon= g rb) ppc_set_irq(env_archcpu(env), PPC_INTERRUPT_HDOORBELL, 0); } =20 -void helper_book3s_msgsnd(CPUPPCState *env, target_ulong rb) +void HELPER(book3s_msgsnd)(CPUPPCState *env, target_ulong rb) { int pir =3D rb & DBELL_PROCIDTAG_MASK; bool brdcast =3D false; @@ -818,7 +818,7 @@ void helper_book3s_msgsnd(CPUPPCState *env, target_ulon= g rb) } =20 #ifdef TARGET_PPC64 -void helper_book3s_msgclrp(CPUPPCState *env, target_ulong rb) +void HELPER(book3s_msgclrp)(CPUPPCState *env, target_ulong rb) { helper_hfscr_facility_check(env, HFSCR_MSGP, "msgclrp", HFSCR_IC_MSGP); =20 @@ -833,7 +833,7 @@ void helper_book3s_msgclrp(CPUPPCState *env, target_ulo= ng rb) * sends a message to another thread on the same * multi-threaded processor */ -void helper_book3s_msgsndp(CPUPPCState *env, target_ulong rb) +void HELPER(book3s_msgsndp)(CPUPPCState *env, target_ulong rb) { helper_hfscr_facility_check(env, HFSCR_MSGP, "msgsndp", HFSCR_IC_MSGP); =20 @@ -846,7 +846,7 @@ void helper_book3s_msgsndp(CPUPPCState *env, target_ulo= ng rb) #endif /* TARGET_PPC64 */ =20 /* Single-step tracing */ -void helper_book3s_trace(CPUPPCState *env, target_ulong prev_ip) +void HELPER(book3s_trace)(CPUPPCState *env, target_ulong prev_ip) { uint32_t error_code =3D 0; if (env->insns_flags2 & PPC2_ISA207) { diff --git a/target/ppc/timebase_helper.c b/target/ppc/timebase_helper.c index 7209b418fb6..f345be22caa 100644 --- a/target/ppc/timebase_helper.c +++ b/target/ppc/timebase_helper.c @@ -26,38 +26,38 @@ /*************************************************************************= ****/ /* SPR accesses */ =20 -target_ulong helper_load_tbl(CPUPPCState *env) +target_ulong HELPER(load_tbl)(CPUPPCState *env) { return (target_ulong)cpu_ppc_load_tbl(env); } =20 -target_ulong helper_load_tbu(CPUPPCState *env) +target_ulong HELPER(load_tbu)(CPUPPCState *env) { return cpu_ppc_load_tbu(env); } =20 -target_ulong helper_load_atbl(CPUPPCState *env) +target_ulong HELPER(load_atbl)(CPUPPCState *env) { return (target_ulong)cpu_ppc_load_atbl(env); } =20 -target_ulong helper_load_atbu(CPUPPCState *env) +target_ulong HELPER(load_atbu)(CPUPPCState *env) { return cpu_ppc_load_atbu(env); } =20 -target_ulong helper_load_vtb(CPUPPCState *env) +target_ulong HELPER(load_vtb)(CPUPPCState *env) { return cpu_ppc_load_vtb(env); } =20 #if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY) -target_ulong helper_load_purr(CPUPPCState *env) +target_ulong HELPER(load_purr)(CPUPPCState *env) { return (target_ulong)cpu_ppc_load_purr(env); } =20 -void helper_store_purr(CPUPPCState *env, target_ulong val) +void HELPER(store_purr)(CPUPPCState *env, target_ulong val) { CPUState *cs =3D env_cpu(env); CPUState *ccs; @@ -75,7 +75,7 @@ void helper_store_purr(CPUPPCState *env, target_ulong val) #endif =20 #if !defined(CONFIG_USER_ONLY) -void helper_store_tbl(CPUPPCState *env, target_ulong val) +void HELPER(store_tbl)(CPUPPCState *env, target_ulong val) { CPUState *cs =3D env_cpu(env); CPUState *ccs; @@ -91,7 +91,7 @@ void helper_store_tbl(CPUPPCState *env, target_ulong val) } } =20 -void helper_store_tbu(CPUPPCState *env, target_ulong val) +void HELPER(store_tbu)(CPUPPCState *env, target_ulong val) { CPUState *cs =3D env_cpu(env); CPUState *ccs; @@ -107,32 +107,32 @@ void helper_store_tbu(CPUPPCState *env, target_ulong = val) } } =20 -void helper_store_atbl(CPUPPCState *env, target_ulong val) +void HELPER(store_atbl)(CPUPPCState *env, target_ulong val) { cpu_ppc_store_atbl(env, val); } =20 -void helper_store_atbu(CPUPPCState *env, target_ulong val) +void HELPER(store_atbu)(CPUPPCState *env, target_ulong val) { cpu_ppc_store_atbu(env, val); } =20 -target_ulong helper_load_decr(CPUPPCState *env) +target_ulong HELPER(load_decr)(CPUPPCState *env) { return cpu_ppc_load_decr(env); } =20 -void helper_store_decr(CPUPPCState *env, target_ulong val) +void HELPER(store_decr)(CPUPPCState *env, target_ulong val) { cpu_ppc_store_decr(env, val); } =20 -target_ulong helper_load_hdecr(CPUPPCState *env) +target_ulong HELPER(load_hdecr)(CPUPPCState *env) { return cpu_ppc_load_hdecr(env); } =20 -void helper_store_hdecr(CPUPPCState *env, target_ulong val) +void HELPER(store_hdecr)(CPUPPCState *env, target_ulong val) { CPUState *cs =3D env_cpu(env); CPUState *ccs; @@ -148,7 +148,7 @@ void helper_store_hdecr(CPUPPCState *env, target_ulong = val) } } =20 -void helper_store_vtb(CPUPPCState *env, target_ulong val) +void HELPER(store_vtb)(CPUPPCState *env, target_ulong val) { CPUState *cs =3D env_cpu(env); CPUState *ccs; @@ -164,7 +164,7 @@ void helper_store_vtb(CPUPPCState *env, target_ulong va= l) } } =20 -void helper_store_tbu40(CPUPPCState *env, target_ulong val) +void HELPER(store_tbu40)(CPUPPCState *env, target_ulong val) { CPUState *cs =3D env_cpu(env); CPUState *ccs; @@ -180,32 +180,32 @@ void helper_store_tbu40(CPUPPCState *env, target_ulon= g val) } } =20 -target_ulong helper_load_40x_pit(CPUPPCState *env) +target_ulong HELPER(load_40x_pit)(CPUPPCState *env) { return load_40x_pit(env); } =20 -void helper_store_40x_pit(CPUPPCState *env, target_ulong val) +void HELPER(store_40x_pit)(CPUPPCState *env, target_ulong val) { store_40x_pit(env, val); } =20 -void helper_store_40x_tcr(CPUPPCState *env, target_ulong val) +void HELPER(store_40x_tcr)(CPUPPCState *env, target_ulong val) { store_40x_tcr(env, val); } =20 -void helper_store_40x_tsr(CPUPPCState *env, target_ulong val) +void HELPER(store_40x_tsr)(CPUPPCState *env, target_ulong val) { store_40x_tsr(env, val); } =20 -void helper_store_booke_tcr(CPUPPCState *env, target_ulong val) +void HELPER(store_booke_tcr)(CPUPPCState *env, target_ulong val) { store_booke_tcr(env, val); } =20 -void helper_store_booke_tsr(CPUPPCState *env, target_ulong val) +void HELPER(store_booke_tsr)(CPUPPCState *env, target_ulong val) { store_booke_tsr(env, val); } @@ -369,14 +369,14 @@ static void tb_state_machine_step(CPUPPCState *env) write_tfmr(env, tfmr); } =20 -target_ulong helper_load_tfmr(CPUPPCState *env) +target_ulong HELPER(load_tfmr)(CPUPPCState *env) { tb_state_machine_step(env); =20 return env->spr[SPR_TFMR] | TFMR_TB_ECLIPZ; } =20 -void helper_store_tfmr(CPUPPCState *env, target_ulong val) +void HELPER(store_tfmr)(CPUPPCState *env, target_ulong val) { PowerPCCPU *cpu =3D env_archcpu(env); PnvCoreTODState *tod_state =3D cpu_get_tbst(cpu); @@ -464,7 +464,7 @@ out: /* Embedded PowerPC specific helpers */ =20 /* XXX: to be improved to check access rights when in user-mode */ -target_ulong helper_load_dcr(CPUPPCState *env, target_ulong dcrn) +target_ulong HELPER(load_dcr)(CPUPPCState *env, target_ulong dcrn) { uint32_t val =3D 0; =20 @@ -490,7 +490,7 @@ target_ulong helper_load_dcr(CPUPPCState *env, target_u= long dcrn) return val; } =20 -void helper_store_dcr(CPUPPCState *env, target_ulong dcrn, target_ulong va= l) +void HELPER(store_dcr)(CPUPPCState *env, target_ulong dcrn, target_ulong v= al) { if (unlikely(env->dcr_env =3D=3D NULL)) { qemu_log_mask(LOG_GUEST_ERROR, "No DCR environment\n"); diff --git a/target/ppc/translate/vsx-impl.c.inc b/target/ppc/translate/vsx= -impl.c.inc index 78311dcba9d..95003be99b2 100644 --- a/target/ppc/translate/vsx-impl.c.inc +++ b/target/ppc/translate/vsx-impl.c.inc @@ -1679,7 +1679,7 @@ static bool trans_XXSPLTIDP(DisasContext *ctx, arg_8R= R_D *a) REQUIRE_VSX(ctx); =20 tcg_gen_gvec_dup_imm(MO_64, vsr_full_offset(a->xt), 16, 16, - helper_todouble(a->si)); + HELPER(todouble)(a->si)); return true; } =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772693; cv=none; d=zohomail.com; s=zohoarc; b=ZfJJI7b5Mgj654pGp/Nm44Izdf40+HizAsiAF1rgzWZ+xB/fR1VKyH8XcOgiHe1dL/8TF4G0eUbUBjxmvc6Oq2rd4+5to6r18mQm5jWkRR/8aah4RukYVf4TWiX6c2BWWC9rcIdei15mRcmkct3gXggyiTnFqGZRMkrODAlwlXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772693; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Zi3oI8o3UlmYUevR+k3hZ6BBbzMRY+nrFQXfBRfLDRs=; b=S4aLCOCrQdCxGt6Ravh8CNTLYbVGNY1doWZbgN/Xesy8z8LoAwklyu7HjcM9cFakwSQGqm9dnBtI0qK7teRSfJHFeNAUYSBmOFRV8Oiwt6z2454wvvtIUuZMKG459i8SX+PM+RJh7NzY6YBTRrzNu6dq9iPV07b2dmhfnX98Vz4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772693021567.4526445830235; Fri, 23 Oct 2026 09:24:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI2B-0004nP-69; Fri, 23 Oct 2026 12:22:23 -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 1xKI26-0004MH-2J for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:18 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI20-00035R-Fi for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:17 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6E4V2215919 for ; Fri, 23 Oct 2026 16:22:11 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc81xd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:22:11 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-92e82060977so215959685a.1 for ; Fri, 23 Oct 2026 09:22:11 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312fc7012sm8739685e9.5.2026.10.23.09.22.08 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Zi3oI8o3UlmYUevR+k3hZ6BBbzMRY+nrFQXfBRfLDRs=; b=Xr5epOz0M9eVhok1 UdQZOkJ9YV28S6bit+3hOLCHSUYznus6zKO24kJopSz2hmxFjJc2GcN0P1htX0Ct wB9OQRmC/HimluPSZUdNNrKQ0N885B8hGJSe1lSxfKnY5poBUcRZbtC+z07Qrjpy mIh4gzaHcG7lEe+VdkdgudDdGCMRdAR27UuRt1ThvKQ9nXGAhxDho5UZq506KuYr DEqgwwSV3SCuF92fZSE2JDXgH0V6YCoFyyJL1V1IdKW4q+ysbIQ7SkCWIqho91lF UeLxhO9PUcG6s5lTNr7mqFEQVvHOoCwidB4XgyK5OTkBaNGdWsZxXP2vGm7CDmWl rHSxQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772531; x=1793377331; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Zi3oI8o3UlmYUevR+k3hZ6BBbzMRY+nrFQXfBRfLDRs=; b=Q4cOVBl3lCdtfLEIms1sSaV/aM9uwPgmHwfW7x6XmwKPqsJQaEZTkHTCmBVINwRbRD x2KokkGJYaiyUoiDyh/HJVFJToPZwSFJwsg7wyWjT5g1T4SjBs17mvl21RSaGExjlVFs ymncyqK9aTV4YoYT12QwtTXMJelIQ74emjSvchtPISu8PWSkv/pFUteu8csPukopdJ/P 9DRECE/tLvMHtODcN4Z2KM44A2w8fD+PQHlpXZh/IaDX44BTjsnkMUFrUqIaJE8Kk/Li +oc0xD/lWNyGelmET3mpP3ymE6O33HDclaC/W2WUsrogV+RhSaRpOVctrKiK/Z3TA3Tr PhwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772531; x=1793377331; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Zi3oI8o3UlmYUevR+k3hZ6BBbzMRY+nrFQXfBRfLDRs=; b=nlA7xLlp8be5kwU2wwL0oyF26+9CGvUH8Oa1AHOx49GL+ERsc0amL3YtuNHdXl3F4x 7x87u8ZZndOS+THVWc1514SzepXwpX78XxqfkJLvLztOX0hXECqkwYcn84P6FSDoAvdE lQ+cEUhbR7GGmxMkZiyr6zmK4qlXe0hiAzTk1zd04RaB6tL21JWMktv/6wVcnQN09sHn LeZsbR1GwGsTywnevgaE35RuefDZJXaLVngNk9BMGS4rPuRBGF4e3xYKHtFvgyEjbPGF gbArLSKGnC0PvRZRjirCOOR32y0TibMJ7FJ85kKUvSOrS2koo7qjxsVyxwAo2d47uUBg mnLA== X-Gm-Message-State: AFq9FYI6S4dQKbJ89BpuBIrIqdbljUT54tdw8J1/QFMGuXFkimJVf6JS T90KOc4naIb3bJ/klHKrixQ304fhBGOlYVUbh2rSYWHM4SfCU312bKexJuS0xIKX2TD6rRlBsdb VUFE3FoCKcrlKyqC219L57xXwDgYwsduTNmZrEN8KJA4itWiwuTnTfFG5IQAKyB6QGUJ3 X-Gm-Gg: AYBFou3ny1PuAEhVDbkIeotIQfj4qA3q3WfJQbibCWBvzXL3OpQ3Beesh+7DVs14ysH E/xpWvhmEiB800WcdhCyUlIlz3tKZaDLsBHgkeGTtpBu614gGaOKR1q+Xji5ca3lil+xyGbDgi2 kRWqvQH8BMfSe2DWGgDhlkaVjaavKITXjcE8H6MD73XsulC+Q41ngM73dmw6Q6WQ0IqavoZCn1E 9orx3E/1H5ocrNqyKViL9Dq4+CEv5VJhCMA7VUqk8euf1vB6WvT/hf/UXby6HUSAzsFM0Kpe/s6 T/+Md7jB8QaTCBBjlptpOCvRM1JYjCmVdAjZF4w9aILnxJZlnmobcQr8uvPxxZGFGh79pu3UauJ M/47c2CcqsoryWvNy8K6/v2/pV04GnCXIUEsvhwTa X-Received: by 2002:a05:620a:2a01:b0:93a:1196:ce5 with SMTP id af79cd13be357-93f62798985mr901334885a.33.1792772530166; Fri, 23 Oct 2026 09:22:10 -0700 (PDT) X-Received: by 2002:a05:620a:2a01:b0:93a:1196:ce5 with SMTP id af79cd13be357-93f62798985mr901328585a.33.1792772529229; Fri, 23 Oct 2026 09:22:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 71/83] target/riscv: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:19 +0200 Message-ID: <20261023161332.60153-72-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX8vAKzRHiC0Qn 75Rhf7Zbt4ggrHWuxm5K8DROOKLLKAvgA7IeosV9/Fo3ESYUbnCPvBWuS8gQzUzCwf9uFMQrkOb 7Nr8lWi4GwkUlAsQ4WYTPxfDGEVaYUozuaIuh/P0z5vgfI31rocknC0OY8cPdd+IMNrdz6ELCCR TrdyR9TwKvbOCvNpmrcRSWZ9g+MvGSdrq0GHNmEUE69nF/OL4Q3NvOYHlFnasvcupmPM6FbzI9O X+XaIhYDh9RqziBcoa1H1MCakAhy+xab4/oy3y4a8bt/B7bi+kGqB3U979Aah9NnPG8YDsrQ7dN Dkl0UTMBdBF1agHaX2E4jSI+GPnlJfACum01p3I2J13bf8MQn3gKP1nBbDFQenXxJRETY+kADFY ZCTO3MPxMq8aoo/LsBxF7Ex5dcYioAUZkp373bMcwu6et9O+VIiQIGP/jU/u6ISBwUeNBI8mUNv ogb8WOl+ujuPnZkrlFA== X-Proofpoint-GUID: pIgKAl49GlcIE5ShFM605W66fzPjPd4b X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb89b3 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=awbDs1vtfMtI2_SikkAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: pIgKAl49GlcIE5ShFM605W66fzPjPd4b X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX4QFd2wq23/Gw 4LYjVTi7vWBXa9M0+Uaoia3X+ItrB5avw3rmcCCp/6HrhYzmBXNcvgT4h8ekms+JCJBg7XdIdLO EmR7I616QMjikIFhUl3vAM6v4BsnQeo= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772693754158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-13-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/riscv/tcg/debug.c | 2 +- target/riscv/tcg/fpu_helper.c | 196 +++++++++++++++++----------------- target/riscv/tcg/op_helper.c | 74 ++++++------- 3 files changed, 136 insertions(+), 136 deletions(-) diff --git a/target/riscv/tcg/debug.c b/target/riscv/tcg/debug.c index aaf2dca17e3..8b58cbd07ab 100644 --- a/target/riscv/tcg/debug.c +++ b/target/riscv/tcg/debug.c @@ -789,7 +789,7 @@ bool riscv_itrigger_enabled(CPURISCVState *env) return false; } =20 -void helper_itrigger_match(CPURISCVState *env) +void HELPER(itrigger_match)(CPURISCVState *env) { int count; for (int i =3D 0; i < env->num_triggers; i++) { diff --git a/target/riscv/tcg/fpu_helper.c b/target/riscv/tcg/fpu_helper.c index db1475271b6..e755f8a0472 100644 --- a/target/riscv/tcg/fpu_helper.c +++ b/target/riscv/tcg/fpu_helper.c @@ -66,7 +66,7 @@ void riscv_cpu_check_fflags(CPURISCVState *env, FloatExceptionFlags pre_fflag) {} #endif =20 -void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm) +void HELPER(set_rounding_mode)(CPURISCVState *env, uint32_t rm) { FloatRoundMode softrm; =20 @@ -96,7 +96,7 @@ void helper_set_rounding_mode(CPURISCVState *env, uint32_= t rm) set_float_rounding_mode(softrm, &env->fp_status); } =20 -void helper_set_rounding_mode_chkfrm(CPURISCVState *env, uint32_t rm) +void HELPER(set_rounding_mode_chkfrm)(CPURISCVState *env, uint32_t rm) { FloatRoundMode softrm; =20 @@ -153,112 +153,112 @@ static uint64_t do_fmadd_s(CPURISCVState *env, uint= 64_t rs1, uint64_t rs2, &env->fp_status)); } =20 -uint64_t helper_fmadd_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fmadd_s)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return do_fmadd_s(env, frs1, frs2, frs3, 0); } =20 -uint64_t helper_fmadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fmadd_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return float64_muladd(frs1, frs2, frs3, 0, &env->fp_status); } =20 -uint64_t helper_fmadd_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fmadd_h)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return do_fmadd_h(env, frs1, frs2, frs3, 0); } =20 -uint64_t helper_fmsub_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fmsub_s)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return do_fmadd_s(env, frs1, frs2, frs3, float_muladd_negate_c); } =20 -uint64_t helper_fmsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fmsub_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return float64_muladd(frs1, frs2, frs3, float_muladd_negate_c, &env->fp_status); } =20 -uint64_t helper_fmsub_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fmsub_h)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return do_fmadd_h(env, frs1, frs2, frs3, float_muladd_negate_c); } =20 -uint64_t helper_fnmsub_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fnmsub_s)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return do_fmadd_s(env, frs1, frs2, frs3, float_muladd_negate_product); } =20 -uint64_t helper_fnmsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fnmsub_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return float64_muladd(frs1, frs2, frs3, float_muladd_negate_product, &env->fp_status); } =20 -uint64_t helper_fnmsub_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fnmsub_h)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return do_fmadd_h(env, frs1, frs2, frs3, float_muladd_negate_product); } =20 -uint64_t helper_fnmadd_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fnmadd_s)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return do_fmadd_s(env, frs1, frs2, frs3, float_muladd_negate_c | float_muladd_negate_product); } =20 -uint64_t helper_fnmadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fnmadd_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return float64_muladd(frs1, frs2, frs3, float_muladd_negate_c | float_muladd_negate_product, &env->fp_status); } =20 -uint64_t helper_fnmadd_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, +uint64_t HELPER(fnmadd_h)(CPURISCVState *env, uint64_t frs1, uint64_t frs2, uint64_t frs3) { return do_fmadd_h(env, frs1, frs2, frs3, float_muladd_negate_c | float_muladd_negate_product); } =20 -uint64_t helper_fadd_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fadd_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); return nanbox_s(env, float32_add(frs1, frs2, &env->fp_status)); } =20 -uint64_t helper_fsub_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fsub_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); return nanbox_s(env, float32_sub(frs1, frs2, &env->fp_status)); } =20 -uint64_t helper_fmul_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fmul_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); return nanbox_s(env, float32_mul(frs1, frs2, &env->fp_status)); } =20 -uint64_t helper_fdiv_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fdiv_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); return nanbox_s(env, float32_div(frs1, frs2, &env->fp_status)); } =20 -uint64_t helper_fmin_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fmin_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -267,7 +267,7 @@ uint64_t helper_fmin_s(CPURISCVState *env, uint64_t rs1= , uint64_t rs2) float32_minimum_number(frs1, frs2, &env->fp_statu= s)); } =20 -uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fminm_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -275,7 +275,7 @@ uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs= 1, uint64_t rs2) return nanbox_s(env, ret); } =20 -uint64_t helper_fmax_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fmax_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -284,7 +284,7 @@ uint64_t helper_fmax_s(CPURISCVState *env, uint64_t rs1= , uint64_t rs2) float32_maximum_number(frs1, frs2, &env->fp_statu= s)); } =20 -uint64_t helper_fmaxm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fmaxm_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -292,13 +292,13 @@ uint64_t helper_fmaxm_s(CPURISCVState *env, uint64_t = rs1, uint64_t rs2) return nanbox_s(env, ret); } =20 -uint64_t helper_fsqrt_s(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fsqrt_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); return nanbox_s(env, float32_sqrt(frs1, &env->fp_status)); } =20 -target_ulong helper_fle_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(fle_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -308,7 +308,7 @@ target_ulong helper_fle_s(CPURISCVState *env, uint64_t = rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_fleq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(fleq_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -318,7 +318,7 @@ target_ulong helper_fleq_s(CPURISCVState *env, uint64_t= rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_flt_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(flt_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -328,7 +328,7 @@ target_ulong helper_flt_s(CPURISCVState *env, uint64_t = rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_fltq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(fltq_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -338,7 +338,7 @@ target_ulong helper_fltq_s(CPURISCVState *env, uint64_t= rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_feq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(feq_s)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float32 frs1 =3D check_nanbox_s(env, rs1); float32 frs2 =3D check_nanbox_s(env, rs2); @@ -348,7 +348,7 @@ target_ulong helper_feq_s(CPURISCVState *env, uint64_t = rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_fcvt_w_s(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fcvt_w_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); @@ -357,7 +357,7 @@ target_ulong helper_fcvt_w_s(CPURISCVState *env, uint64= _t rs1) return ret; } =20 -target_ulong helper_fcvt_wu_s(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fcvt_wu_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); @@ -366,7 +366,7 @@ target_ulong helper_fcvt_wu_s(CPURISCVState *env, uint6= 4_t rs1) return ret; } =20 -target_ulong helper_fcvt_l_s(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fcvt_l_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); @@ -375,7 +375,7 @@ target_ulong helper_fcvt_l_s(CPURISCVState *env, uint64= _t rs1) return ret; } =20 -target_ulong helper_fcvt_lu_s(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fcvt_lu_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); @@ -384,33 +384,33 @@ target_ulong helper_fcvt_lu_s(CPURISCVState *env, uin= t64_t rs1) return ret; } =20 -uint64_t helper_fcvt_s_w(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_s_w)(CPURISCVState *env, target_ulong rs1) { return nanbox_s(env, int32_to_float32((int32_t)rs1, &env->fp_status)); } =20 -uint64_t helper_fcvt_s_wu(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_s_wu)(CPURISCVState *env, target_ulong rs1) { return nanbox_s(env, uint32_to_float32((uint32_t)rs1, &env->fp_status)= ); } =20 -uint64_t helper_fcvt_s_l(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_s_l)(CPURISCVState *env, target_ulong rs1) { return nanbox_s(env, int64_to_float32(rs1, &env->fp_status)); } =20 -uint64_t helper_fcvt_s_lu(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_s_lu)(CPURISCVState *env, target_ulong rs1) { return nanbox_s(env, uint64_to_float32(rs1, &env->fp_status)); } =20 -target_ulong helper_fclass_s(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fclass_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); return fclass_s(frs1); } =20 -uint64_t helper_fround_s(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fround_s)(CPURISCVState *env, uint64_t rs1) { float_status *fs =3D &env->fp_status; uint16_t nx_old =3D get_float_exception_flags(fs) & float_flag_inexact; @@ -427,74 +427,74 @@ uint64_t helper_fround_s(CPURISCVState *env, uint64_t= rs1) return nanbox_s(env, frs1); } =20 -uint64_t helper_froundnx_s(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(froundnx_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); frs1 =3D float32_round_to_int(frs1, &env->fp_status); return nanbox_s(env, frs1); } =20 -uint64_t helper_fadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +uint64_t HELPER(fadd_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2) { return float64_add(frs1, frs2, &env->fp_status); } =20 -uint64_t helper_fsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +uint64_t HELPER(fsub_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2) { return float64_sub(frs1, frs2, &env->fp_status); } =20 -uint64_t helper_fmul_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +uint64_t HELPER(fmul_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2) { return float64_mul(frs1, frs2, &env->fp_status); } =20 -uint64_t helper_fdiv_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +uint64_t HELPER(fdiv_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2) { return float64_div(frs1, frs2, &env->fp_status); } =20 -uint64_t helper_fmin_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +uint64_t HELPER(fmin_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2) { return env->priv_ver < PRIV_VERSION_1_11_0 ? float64_minnum(frs1, frs2, &env->fp_status) : float64_minimum_number(frs1, frs2, &env->fp_status); } =20 -uint64_t helper_fminm_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +uint64_t HELPER(fminm_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2) { return float64_min(frs1, frs2, &env->fp_status); } =20 -uint64_t helper_fmax_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +uint64_t HELPER(fmax_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2) { return env->priv_ver < PRIV_VERSION_1_11_0 ? float64_maxnum(frs1, frs2, &env->fp_status) : float64_maximum_number(frs1, frs2, &env->fp_status); } =20 -uint64_t helper_fmaxm_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +uint64_t HELPER(fmaxm_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs2) { return float64_max(frs1, frs2, &env->fp_status); } =20 -uint64_t helper_fcvt_s_d(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fcvt_s_d)(CPURISCVState *env, uint64_t rs1) { return nanbox_s(env, float64_to_float32(rs1, &env->fp_status)); } =20 -uint64_t helper_fcvt_d_s(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fcvt_d_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); return float32_to_float64(frs1, &env->fp_status); } =20 -uint64_t helper_fsqrt_d(CPURISCVState *env, uint64_t frs1) +uint64_t HELPER(fsqrt_d)(CPURISCVState *env, uint64_t frs1) { return float64_sqrt(frs1, &env->fp_status); } =20 -target_ulong helper_fle_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +target_ulong HELPER(fle_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs= 2) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D float64_le(frs1, frs2, &env->fp_status); @@ -502,7 +502,7 @@ target_ulong helper_fle_d(CPURISCVState *env, uint64_t = frs1, uint64_t frs2) return ret; } =20 -target_ulong helper_fleq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs= 2) +target_ulong HELPER(fleq_d)(CPURISCVState *env, uint64_t frs1, uint64_t fr= s2) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D float64_le_quiet(frs1, frs2, &env->fp_status); @@ -510,7 +510,7 @@ target_ulong helper_fleq_d(CPURISCVState *env, uint64_t= frs1, uint64_t frs2) return ret; } =20 -target_ulong helper_flt_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +target_ulong HELPER(flt_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs= 2) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D float64_lt(frs1, frs2, &env->fp_status); @@ -518,7 +518,7 @@ target_ulong helper_flt_d(CPURISCVState *env, uint64_t = frs1, uint64_t frs2) return ret; } =20 -target_ulong helper_fltq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs= 2) +target_ulong HELPER(fltq_d)(CPURISCVState *env, uint64_t frs1, uint64_t fr= s2) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D float64_lt_quiet(frs1, frs2, &env->fp_status); @@ -526,7 +526,7 @@ target_ulong helper_fltq_d(CPURISCVState *env, uint64_t= frs1, uint64_t frs2) return ret; } =20 -target_ulong helper_feq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) +target_ulong HELPER(feq_d)(CPURISCVState *env, uint64_t frs1, uint64_t frs= 2) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D float64_eq_quiet(frs1, frs2, &env->fp_status); @@ -534,7 +534,7 @@ target_ulong helper_feq_d(CPURISCVState *env, uint64_t = frs1, uint64_t frs2) return ret; } =20 -target_ulong helper_fcvt_w_d(CPURISCVState *env, uint64_t frs1) +target_ulong HELPER(fcvt_w_d)(CPURISCVState *env, uint64_t frs1) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D float64_to_int32(frs1, &env->fp_status); @@ -542,7 +542,7 @@ target_ulong helper_fcvt_w_d(CPURISCVState *env, uint64= _t frs1) return ret; } =20 -uint64_t helper_fcvtmod_w_d(CPURISCVState *env, uint64_t value) +uint64_t HELPER(fcvtmod_w_d)(CPURISCVState *env, uint64_t value) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); uint64_t ret =3D float64_to_int32_modulo(value, float_round_to_zero, @@ -551,7 +551,7 @@ uint64_t helper_fcvtmod_w_d(CPURISCVState *env, uint64_= t value) return ret; } =20 -target_ulong helper_fcvt_wu_d(CPURISCVState *env, uint64_t frs1) +target_ulong HELPER(fcvt_wu_d)(CPURISCVState *env, uint64_t frs1) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D (int32_t)float64_to_uint32(frs1, &env->fp_status); @@ -559,7 +559,7 @@ target_ulong helper_fcvt_wu_d(CPURISCVState *env, uint6= 4_t frs1) return ret; } =20 -target_ulong helper_fcvt_l_d(CPURISCVState *env, uint64_t frs1) +target_ulong HELPER(fcvt_l_d)(CPURISCVState *env, uint64_t frs1) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D float64_to_int64(frs1, &env->fp_status); @@ -567,7 +567,7 @@ target_ulong helper_fcvt_l_d(CPURISCVState *env, uint64= _t frs1) return ret; } =20 -target_ulong helper_fcvt_lu_d(CPURISCVState *env, uint64_t frs1) +target_ulong HELPER(fcvt_lu_d)(CPURISCVState *env, uint64_t frs1) { FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); target_ulong ret =3D float64_to_uint64(frs1, &env->fp_status); @@ -575,32 +575,32 @@ target_ulong helper_fcvt_lu_d(CPURISCVState *env, uin= t64_t frs1) return ret; } =20 -uint64_t helper_fcvt_d_w(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_d_w)(CPURISCVState *env, target_ulong rs1) { return int32_to_float64((int32_t)rs1, &env->fp_status); } =20 -uint64_t helper_fcvt_d_wu(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_d_wu)(CPURISCVState *env, target_ulong rs1) { return uint32_to_float64((uint32_t)rs1, &env->fp_status); } =20 -uint64_t helper_fcvt_d_l(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_d_l)(CPURISCVState *env, target_ulong rs1) { return int64_to_float64(rs1, &env->fp_status); } =20 -uint64_t helper_fcvt_d_lu(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_d_lu)(CPURISCVState *env, target_ulong rs1) { return uint64_to_float64(rs1, &env->fp_status); } =20 -target_ulong helper_fclass_d(uint64_t frs1) +target_ulong HELPER(fclass_d)(uint64_t frs1) { return fclass_d(frs1); } =20 -uint64_t helper_fround_d(CPURISCVState *env, uint64_t frs1) +uint64_t HELPER(fround_d)(CPURISCVState *env, uint64_t frs1) { float_status *fs =3D &env->fp_status; uint16_t nx_old =3D get_float_exception_flags(fs) & float_flag_inexact; @@ -616,40 +616,40 @@ uint64_t helper_fround_d(CPURISCVState *env, uint64_t= frs1) return frs1; } =20 -uint64_t helper_froundnx_d(CPURISCVState *env, uint64_t frs1) +uint64_t HELPER(froundnx_d)(CPURISCVState *env, uint64_t frs1) { return float64_round_to_int(frs1, &env->fp_status); } =20 -uint64_t helper_fadd_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fadd_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); return nanbox_h(env, float16_add(frs1, frs2, &env->fp_status)); } =20 -uint64_t helper_fsub_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fsub_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); return nanbox_h(env, float16_sub(frs1, frs2, &env->fp_status)); } =20 -uint64_t helper_fmul_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fmul_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); return nanbox_h(env, float16_mul(frs1, frs2, &env->fp_status)); } =20 -uint64_t helper_fdiv_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fdiv_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); return nanbox_h(env, float16_div(frs1, frs2, &env->fp_status)); } =20 -uint64_t helper_fmin_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fmin_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -658,7 +658,7 @@ uint64_t helper_fmin_h(CPURISCVState *env, uint64_t rs1= , uint64_t rs2) float16_minimum_number(frs1, frs2, &env->fp_statu= s)); } =20 -uint64_t helper_fminm_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fminm_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -666,7 +666,7 @@ uint64_t helper_fminm_h(CPURISCVState *env, uint64_t rs= 1, uint64_t rs2) return nanbox_h(env, ret); } =20 -uint64_t helper_fmax_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fmax_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -675,7 +675,7 @@ uint64_t helper_fmax_h(CPURISCVState *env, uint64_t rs1= , uint64_t rs2) float16_maximum_number(frs1, frs2, &env->fp_statu= s)); } =20 -uint64_t helper_fmaxm_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fmaxm_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -683,13 +683,13 @@ uint64_t helper_fmaxm_h(CPURISCVState *env, uint64_t = rs1, uint64_t rs2) return nanbox_h(env, ret); } =20 -uint64_t helper_fsqrt_h(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fsqrt_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); return nanbox_h(env, float16_sqrt(frs1, &env->fp_status)); } =20 -target_ulong helper_fle_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(fle_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -699,7 +699,7 @@ target_ulong helper_fle_h(CPURISCVState *env, uint64_t = rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_fleq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(fleq_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -709,7 +709,7 @@ target_ulong helper_fleq_h(CPURISCVState *env, uint64_t= rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_flt_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(flt_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -719,7 +719,7 @@ target_ulong helper_flt_h(CPURISCVState *env, uint64_t = rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_fltq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(fltq_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -729,7 +729,7 @@ target_ulong helper_fltq_h(CPURISCVState *env, uint64_t= rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_feq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) +target_ulong HELPER(feq_h)(CPURISCVState *env, uint64_t rs1, uint64_t rs2) { float16 frs1 =3D check_nanbox_h(env, rs1); float16 frs2 =3D check_nanbox_h(env, rs2); @@ -739,13 +739,13 @@ target_ulong helper_feq_h(CPURISCVState *env, uint64_= t rs1, uint64_t rs2) return ret; } =20 -target_ulong helper_fclass_h(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fclass_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); return fclass_h(frs1); } =20 -uint64_t helper_fround_h(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fround_h)(CPURISCVState *env, uint64_t rs1) { float_status *fs =3D &env->fp_status; uint16_t nx_old =3D get_float_exception_flags(fs) & float_flag_inexact; @@ -762,14 +762,14 @@ uint64_t helper_fround_h(CPURISCVState *env, uint64_t= rs1) return nanbox_h(env, frs1); } =20 -uint64_t helper_froundnx_h(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(froundnx_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); frs1 =3D float16_round_to_int(frs1, &env->fp_status); return nanbox_h(env, frs1); } =20 -target_ulong helper_fcvt_w_h(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fcvt_w_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); @@ -778,7 +778,7 @@ target_ulong helper_fcvt_w_h(CPURISCVState *env, uint64= _t rs1) return ret; } =20 -target_ulong helper_fcvt_wu_h(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fcvt_wu_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); @@ -787,7 +787,7 @@ target_ulong helper_fcvt_wu_h(CPURISCVState *env, uint6= 4_t rs1) return ret; } =20 -target_ulong helper_fcvt_l_h(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fcvt_l_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); @@ -796,7 +796,7 @@ target_ulong helper_fcvt_l_h(CPURISCVState *env, uint64= _t rs1) return ret; } =20 -target_ulong helper_fcvt_lu_h(CPURISCVState *env, uint64_t rs1) +target_ulong HELPER(fcvt_lu_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); FloatExceptionFlags pre_fflag =3D get_float_exception_flags(&env->fp_s= tatus); @@ -805,56 +805,56 @@ target_ulong helper_fcvt_lu_h(CPURISCVState *env, uin= t64_t rs1) return ret; } =20 -uint64_t helper_fcvt_h_w(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_h_w)(CPURISCVState *env, target_ulong rs1) { return nanbox_h(env, int32_to_float16((int32_t)rs1, &env->fp_status)); } =20 -uint64_t helper_fcvt_h_wu(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_h_wu)(CPURISCVState *env, target_ulong rs1) { return nanbox_h(env, uint32_to_float16((uint32_t)rs1, &env->fp_status)= ); } =20 -uint64_t helper_fcvt_h_l(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_h_l)(CPURISCVState *env, target_ulong rs1) { return nanbox_h(env, int64_to_float16(rs1, &env->fp_status)); } =20 -uint64_t helper_fcvt_h_lu(CPURISCVState *env, target_ulong rs1) +uint64_t HELPER(fcvt_h_lu)(CPURISCVState *env, target_ulong rs1) { return nanbox_h(env, uint64_to_float16(rs1, &env->fp_status)); } =20 -uint64_t helper_fcvt_h_s(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fcvt_h_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); return nanbox_h(env, float32_to_float16(frs1, true, &env->fp_status)); } =20 -uint64_t helper_fcvt_s_h(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fcvt_s_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); return nanbox_s(env, float16_to_float32(frs1, true, &env->fp_status)); } =20 -uint64_t helper_fcvt_h_d(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fcvt_h_d)(CPURISCVState *env, uint64_t rs1) { return nanbox_h(env, float64_to_float16(rs1, true, &env->fp_status)); } =20 -uint64_t helper_fcvt_d_h(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fcvt_d_h)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_h(env, rs1); return float16_to_float64(frs1, true, &env->fp_status); } =20 -uint64_t helper_fcvt_bf16_s(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fcvt_bf16_s)(CPURISCVState *env, uint64_t rs1) { float32 frs1 =3D check_nanbox_s(env, rs1); return nanbox_h(env, float32_to_bfloat16(frs1, &env->fp_status)); } =20 -uint64_t helper_fcvt_s_bf16(CPURISCVState *env, uint64_t rs1) +uint64_t HELPER(fcvt_s_bf16)(CPURISCVState *env, uint64_t rs1) { float16 frs1 =3D check_nanbox_bf16(env, rs1); return nanbox_s(env, bfloat16_to_float32(frs1, &env->fp_status)); diff --git a/target/riscv/tcg/op_helper.c b/target/riscv/tcg/op_helper.c index f85f5cd83c9..f9c79fe6b90 100644 --- a/target/riscv/tcg/op_helper.c +++ b/target/riscv/tcg/op_helper.c @@ -48,7 +48,7 @@ G_NORETURN void riscv_raise_exception(CPURISCVState *env, cpu_loop_exit_restore(cs, pc); } =20 -void helper_raise_exception(CPURISCVState *env, uint32_t exception) +void HELPER(raise_exception)(CPURISCVState *env, uint32_t exception) { #ifndef CONFIG_USER_ONLY riscv_pmu_decr_instret(env); @@ -56,7 +56,7 @@ void helper_raise_exception(CPURISCVState *env, uint32_t = exception) riscv_raise_exception(env, exception, 0); } =20 -target_ulong helper_csrr(CPURISCVState *env, int csr) +target_ulong HELPER(csrr)(CPURISCVState *env, int csr) { /* * The seed CSR must be accessed with a read-write instruction. A @@ -76,7 +76,7 @@ target_ulong helper_csrr(CPURISCVState *env, int csr) return val; } =20 -void helper_csrw(CPURISCVState *env, int csr, target_ulong src) +void HELPER(csrw)(CPURISCVState *env, int csr, target_ulong src) { target_ulong mask =3D env->xl =3D=3D MXL_RV32 ? UINT32_MAX : (target_u= long)-1; RISCVException ret =3D riscv_csrrw(env, csr, NULL, src, mask, GETPC()); @@ -86,7 +86,7 @@ void helper_csrw(CPURISCVState *env, int csr, target_ulon= g src) } } =20 -target_ulong helper_csrrw(CPURISCVState *env, int csr, +target_ulong HELPER(csrrw)(CPURISCVState *env, int csr, target_ulong src, target_ulong write_mask) { target_ulong val =3D 0; @@ -98,7 +98,7 @@ target_ulong helper_csrrw(CPURISCVState *env, int csr, return val; } =20 -target_ulong helper_csrr_i128(CPURISCVState *env, int csr) +target_ulong HELPER(csrr_i128)(CPURISCVState *env, int csr) { Int128 rv =3D int128_zero(); RISCVException ret =3D riscv_csrr_i128(env, csr, &rv); @@ -111,7 +111,7 @@ target_ulong helper_csrr_i128(CPURISCVState *env, int c= sr) return int128_getlo(rv); } =20 -void helper_csrw_i128(CPURISCVState *env, int csr, +void HELPER(csrw_i128)(CPURISCVState *env, int csr, target_ulong srcl, target_ulong srch) { RISCVException ret =3D riscv_csrrw_i128(env, csr, NULL, @@ -123,7 +123,7 @@ void helper_csrw_i128(CPURISCVState *env, int csr, } } =20 -target_ulong helper_csrrw_i128(CPURISCVState *env, int csr, +target_ulong HELPER(csrrw_i128)(CPURISCVState *env, int csr, target_ulong srcl, target_ulong srch, target_ulong maskl, target_ulong maskh) { @@ -178,7 +178,7 @@ static void check_zicbo_envcfg(CPURISCVState *env, targ= et_ulong envbits, #endif } =20 -void helper_cbo_zero(CPURISCVState *env, target_ulong address) +void HELPER(cbo_zero)(CPURISCVState *env, target_ulong address) { RISCVCPU *cpu =3D env_archcpu(env); uint16_t cbozlen =3D cpu->cfg.cboz_blocksize; @@ -266,7 +266,7 @@ static void check_zicbom_access(CPURISCVState *env, probe_write(env, address, cbomlen, mmu_idx, ra); } =20 -void helper_cbo_clean_flush(CPURISCVState *env, target_ulong address) +void HELPER(cbo_clean_flush)(CPURISCVState *env, target_ulong address) { uintptr_t ra =3D GETPC(); check_zicbo_envcfg(env, MENVCFG_CBCFE, ra); @@ -275,7 +275,7 @@ void helper_cbo_clean_flush(CPURISCVState *env, target_= ulong address) /* We don't emulate the cache-hierarchy, so we're done. */ } =20 -void helper_cbo_inval(CPURISCVState *env, target_ulong address) +void HELPER(cbo_inval)(CPURISCVState *env, target_ulong address) { uintptr_t ra =3D GETPC(); check_zicbo_envcfg(env, MENVCFG_CBIE, ra); @@ -284,7 +284,7 @@ void helper_cbo_inval(CPURISCVState *env, target_ulong = address) /* We don't emulate the cache-hierarchy, so we're done. */ } =20 -void helper_sc_probe_write(CPURISCVState *env, target_ulong addr, +void HELPER(sc_probe_write)(CPURISCVState *env, target_ulong addr, target_ulong size) { uintptr_t ra =3D GETPC(); @@ -300,7 +300,7 @@ void helper_sc_probe_write(CPURISCVState *env, target_u= long addr, =20 #ifndef CONFIG_USER_ONLY =20 -target_ulong helper_sret(CPURISCVState *env) +target_ulong HELPER(sret)(CPURISCVState *env) { uint64_t mstatus; privilege_mode_t prev_priv; @@ -423,7 +423,7 @@ static target_ulong ssdbltrp_mxret(CPURISCVState *env, = target_ulong mstatus, return mstatus; } =20 -target_ulong helper_mret(CPURISCVState *env) +target_ulong HELPER(mret)(CPURISCVState *env) { target_ulong retpc =3D env->mepc & get_xepc_mask(env); uint64_t mstatus =3D env->mstatus; @@ -473,7 +473,7 @@ target_ulong helper_mret(CPURISCVState *env) return retpc; } =20 -target_ulong helper_dret(CPURISCVState *env) +target_ulong HELPER(dret)(CPURISCVState *env) { #ifdef CONFIG_USER_ONLY riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); @@ -491,7 +491,7 @@ target_ulong helper_dret(CPURISCVState *env) #endif } =20 -void helper_sdext_step(CPURISCVState *env) +void HELPER(sdext_step)(CPURISCVState *env) { #ifndef CONFIG_USER_ONLY CPUState *cs =3D env_cpu(env); @@ -507,7 +507,7 @@ void helper_sdext_step(CPURISCVState *env) #endif } =20 -void helper_sdext_ebreak(CPURISCVState *env, target_ulong pc) +void HELPER(sdext_ebreak)(CPURISCVState *env, target_ulong pc) { CPUState *cs =3D env_cpu(env); bool enter_debug =3D false; @@ -541,7 +541,7 @@ void helper_sdext_ebreak(CPURISCVState *env, target_ulo= ng pc) riscv_raise_exception(env, RISCV_EXCP_BREAKPOINT, GETPC()); } =20 -target_ulong helper_mnret(CPURISCVState *env) +target_ulong HELPER(mnret)(CPURISCVState *env) { target_ulong retpc =3D env->mnepc; privilege_mode_t prev_priv =3D get_field(env->mnstatus, MNSTATUS_MNPP); @@ -589,14 +589,14 @@ target_ulong helper_mnret(CPURISCVState *env) return retpc; } =20 -void helper_ctr_add_entry(CPURISCVState *env, target_ulong src, +void HELPER(ctr_add_entry)(CPURISCVState *env, target_ulong src, target_ulong dest, target_ulong type) { riscv_ctr_add_entry(env, src, dest, (enum CTRType)type, env->priv, env->virt_enabled); } =20 -void helper_ctr_clear(CPURISCVState *env) +void HELPER(ctr_clear)(CPURISCVState *env) { /* * It's safe to call smstateen_acc_ok() for umode access regardless of= the @@ -625,7 +625,7 @@ void helper_ctr_clear(CPURISCVState *env) riscv_ctr_clear(env); } =20 -void helper_wfi(CPURISCVState *env) +void HELPER(wfi)(CPURISCVState *env) { CPUState *cs =3D env_cpu(env); bool rvs =3D riscv_has_ext(env, RVS); @@ -649,7 +649,7 @@ void helper_wfi(CPURISCVState *env) } } =20 -void helper_wrs_nto(CPURISCVState *env) +void HELPER(wrs_nto)(CPURISCVState *env) { if (env->virt_enabled && (env->priv =3D=3D PRV_S || env->priv =3D=3D P= RV_U) && get_field(env->hstatus, HSTATUS_VTW) && @@ -660,7 +660,7 @@ void helper_wrs_nto(CPURISCVState *env) } } =20 -void helper_tlb_flush(CPURISCVState *env) +void HELPER(tlb_flush)(CPURISCVState *env) { CPUState *cs =3D env_cpu(env); if (!env->virt_enabled && @@ -675,13 +675,13 @@ void helper_tlb_flush(CPURISCVState *env) } } =20 -void helper_tlb_flush_all(CPURISCVState *env) +void HELPER(tlb_flush_all)(CPURISCVState *env) { CPUState *cs =3D env_cpu(env); tlb_flush_all_cpus_synced(cs); } =20 -void helper_hyp_tlb_flush(CPURISCVState *env) +void HELPER(hyp_tlb_flush)(CPURISCVState *env) { CPUState *cs =3D env_cpu(env); =20 @@ -698,14 +698,14 @@ void helper_hyp_tlb_flush(CPURISCVState *env) riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); } =20 -void helper_hyp_gvma_tlb_flush(CPURISCVState *env) +void HELPER(hyp_gvma_tlb_flush)(CPURISCVState *env) { if (env->priv =3D=3D PRV_S && !env->virt_enabled && get_field(env->mstatus, MSTATUS_TVM)) { riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); } =20 - helper_hyp_tlb_flush(env); + HELPER(hyp_tlb_flush)(env); } =20 static int check_access_hlsv(CPURISCVState *env, bool x, uintptr_t ra) @@ -725,7 +725,7 @@ static int check_access_hlsv(CPURISCVState *env, bool x= , uintptr_t ra) return mode | MMU_2STAGE_BIT; } =20 -target_ulong helper_hyp_hlv_bu(CPURISCVState *env, target_ulong addr) +target_ulong HELPER(hyp_hlv_bu)(CPURISCVState *env, target_ulong addr) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, false, ra); @@ -734,7 +734,7 @@ target_ulong helper_hyp_hlv_bu(CPURISCVState *env, targ= et_ulong addr) return cpu_ldb_mmu(env, adjust_addr_virt(env, addr), oi, ra); } =20 -target_ulong helper_hyp_hlv_hu(CPURISCVState *env, target_ulong addr) +target_ulong HELPER(hyp_hlv_hu)(CPURISCVState *env, target_ulong addr) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, false, ra); @@ -743,7 +743,7 @@ target_ulong helper_hyp_hlv_hu(CPURISCVState *env, targ= et_ulong addr) return cpu_ldw_mmu(env, adjust_addr_virt(env, addr), oi, ra); } =20 -target_ulong helper_hyp_hlv_wu(CPURISCVState *env, target_ulong addr) +target_ulong HELPER(hyp_hlv_wu)(CPURISCVState *env, target_ulong addr) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, false, ra); @@ -752,7 +752,7 @@ target_ulong helper_hyp_hlv_wu(CPURISCVState *env, targ= et_ulong addr) return cpu_ldl_mmu(env, adjust_addr_virt(env, addr), oi, ra); } =20 -target_ulong helper_hyp_hlv_d(CPURISCVState *env, target_ulong addr) +target_ulong HELPER(hyp_hlv_d)(CPURISCVState *env, target_ulong addr) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, false, ra); @@ -761,7 +761,7 @@ target_ulong helper_hyp_hlv_d(CPURISCVState *env, targe= t_ulong addr) return cpu_ldq_mmu(env, adjust_addr_virt(env, addr), oi, ra); } =20 -void helper_hyp_hsv_b(CPURISCVState *env, target_ulong addr, target_ulong = val) +void HELPER(hyp_hsv_b)(CPURISCVState *env, target_ulong addr, target_ulong= val) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, false, ra); @@ -770,7 +770,7 @@ void helper_hyp_hsv_b(CPURISCVState *env, target_ulong = addr, target_ulong val) cpu_stb_mmu(env, adjust_addr_virt(env, addr), val, oi, ra); } =20 -void helper_hyp_hsv_h(CPURISCVState *env, target_ulong addr, target_ulong = val) +void HELPER(hyp_hsv_h)(CPURISCVState *env, target_ulong addr, target_ulong= val) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, false, ra); @@ -779,7 +779,7 @@ void helper_hyp_hsv_h(CPURISCVState *env, target_ulong = addr, target_ulong val) cpu_stw_mmu(env, adjust_addr_virt(env, addr), val, oi, ra); } =20 -void helper_hyp_hsv_w(CPURISCVState *env, target_ulong addr, target_ulong = val) +void HELPER(hyp_hsv_w)(CPURISCVState *env, target_ulong addr, target_ulong= val) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, false, ra); @@ -788,7 +788,7 @@ void helper_hyp_hsv_w(CPURISCVState *env, target_ulong = addr, target_ulong val) cpu_stl_mmu(env, adjust_addr_virt(env, addr), val, oi, ra); } =20 -void helper_hyp_hsv_d(CPURISCVState *env, target_ulong addr, target_ulong = val) +void HELPER(hyp_hsv_d)(CPURISCVState *env, target_ulong addr, target_ulong= val) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, false, ra); @@ -804,7 +804,7 @@ void helper_hyp_hsv_d(CPURISCVState *env, target_ulong = addr, target_ulong val) * a fair fraction of cputlb.c, fixing this requires adding new mmu_idx * which would imply that exact check in tlb_fill. */ -target_ulong helper_hyp_hlvx_hu(CPURISCVState *env, target_ulong addr) +target_ulong HELPER(hyp_hlvx_hu)(CPURISCVState *env, target_ulong addr) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, true, ra); @@ -813,7 +813,7 @@ target_ulong helper_hyp_hlvx_hu(CPURISCVState *env, tar= get_ulong addr) return cpu_ldw_code_mmu(env, addr, oi, GETPC()); } =20 -target_ulong helper_hyp_hlvx_wu(CPURISCVState *env, target_ulong addr) +target_ulong HELPER(hyp_hlvx_wu)(CPURISCVState *env, target_ulong addr) { uintptr_t ra =3D GETPC(); int mmu_idx =3D check_access_hlsv(env, true, ra); @@ -822,7 +822,7 @@ target_ulong helper_hyp_hlvx_wu(CPURISCVState *env, tar= get_ulong addr) return cpu_ldl_code_mmu(env, addr, oi, ra); } =20 -void helper_ssamoswap_disabled(CPURISCVState *env) +void HELPER(ssamoswap_disabled)(CPURISCVState *env) { int exception =3D RISCV_EXCP_ILLEGAL_INST; =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772693; cv=none; d=zohomail.com; s=zohoarc; b=mCswzEW5DmsfmfgH1LAw0JJSwadKze1lu2f5TOl7TkaVR1WLLE8XHtQ7wKntPgA0ybBIm2h4O7RMD5MME6GOHNLLlnI5OFc656YIb7y5RLVbbMkfpflJ2euqeOgAmwfsgFBx/1HUuJVbr4L3LWV4Z9Go6jAnGnlOrTqFRxPtK4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772693; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=EPqK9FgncInfBO3cy6uZq24qJbp2xZCnU/aGr3kwsJI=; b=Z+NdBYKpKL6IeA/7hExc3gRNOshn2O1bD1fDc4vazh1AsjlkcMtQq00Nuhp/MyfzU0p+z1BBE2zEfc/3aURFgcHUaakVOmKSuU+x78BdSHxxrSgKRkiLPveDQmhbWw9XZBhaMPH1Uy9w7FRI/FA9qT7wGV78CqEwivtqZV7EvZQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772693154898.1650767856739; Fri, 23 Oct 2026 09:24:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI2F-00059l-4w; Fri, 23 Oct 2026 12:22:27 -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 1xKI29-0004dB-73 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:21 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI27-00035j-4o for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:20 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6NKk3000254 for ; Fri, 23 Oct 2026 16:22:18 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hg7cn0wg9-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:22:18 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93cb7f9bb86so198596685a.2 for ; Fri, 23 Oct 2026 09:22:18 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3f9f28sm776695f8f.21.2026.10.23.09.22.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= EPqK9FgncInfBO3cy6uZq24qJbp2xZCnU/aGr3kwsJI=; b=OwPslWQYfCHDtofZ lRW/SwJpfkCv/YGs6yLTv65y3URsrEG5nZdx8087b0pSkPlQJZWatq/m0x0F9gNa OvRaEypD4m+Stqx60VIoTCSvVsm9/OaiOeIqr/bWVA0ZGNu62BI1ueTQyP2+ZxgY 45+ONI+tdPBpxh6cOn4ZjmMnvbFpp7eu4OhkncLCMbL0A8yqDhF6UKCIIfADzvCf 9SNRFlHh6+7fm/bYd6Yz1UoiYISb2U5MsBfmdmb0d47oDcG6sJPU53ohMI3XHL9s guZz5elQwVk5MZsXpMthBigdbTTzrmfLUmreNIsmO/ONnqRSKuaHO6ihzkU3gaWP FAgm6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772537; x=1793377337; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=EPqK9FgncInfBO3cy6uZq24qJbp2xZCnU/aGr3kwsJI=; b=W6zTLdYC71kC6jsvodjiP7C8zpzpbO/siNBRDCkcj1EW4lVPIGzn2Hg8NLo1c2O9hx CRhU1Wi3Vfs8oLtmJ5ZoVRU6JldNQZsFWBYqBIUHmcTAFQJK6MsVvshponzFBsR5zwE2 L9jeBe3D02UhM+haqjhk8I53xkWNqrfo4nBYaDspyAbTYfqHsMGHzSBvqjhuVs0pgLsg DBeyLJmrLEwGgB0Zq6GcwXT44BzpFuakneDYVmhUbvH3aJ1oNnZxXR9UQzl8aGuWVLNk +QPoYk43dc3aPZWJ4vkQMvCwUJ8kTrNCzVyAvYN3nTvvfkUlUY5hYTJnS78F1/C2qsg8 E55A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772537; x=1793377337; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=EPqK9FgncInfBO3cy6uZq24qJbp2xZCnU/aGr3kwsJI=; b=VLu/2mxAA630MQBK8st/M/HOQmlrNQBmobCEvE2/kvVfB1m68jElJ6DqvM6gGS/dWT Vaxzyve6d9BtRnf5nAMw1YF/aW41++IcQeCpBNMWhttUeM/EPqdd+obJNlUUkmygUsak rHhLKBH75xDBiJFCDV8RtdWJpEqjh1hUl6WRqwrN5KEkXFxZxyZsEl3i2f+AUV1E4nLw SmzhxdQ3sxafmv6ceTNbMQdBWz1TWt5SHTfUqqWGy1OdGtmudDRk9QNLpT7JBBkg9n4W owbVbEloCNkEvecibd3QV7XcqymriNS22ascH0PK5OCNlL4+RLtpI9gbFGdN7ERoiEJE UflA== X-Gm-Message-State: AFq9FYLdFDzNK10WdE/BoqAOOdQhUgbRAC1jl+g7FIhchmT8CJ4J6uYN rgyXp7636ziiO1c/HU/5tjU52uAj19s6C+pQ0ENY2nk+Az89sNjjioFNxsetS/+P7GGC76H+TyI ziDn6qnaYisx1MP+P3X95gKZXpB0GNksjMN8ly1UuWAO68GknZUCWlK25atYjaaUZlZth X-Gm-Gg: AYBFou1OBCs6wgOULnedzwPfXM5HY8UK8+F5/3SYl2oZRqxJkOn+Z4I5iT1eRdBUZSG rtTQEvgLIjaZWRxrgMAHVve/A3swvM8DO7HpjmIbmfRwcvSSHvBXphAElQp6OOYgY0qqymPmrNr zpclWAPbdxSz65ROushSmcDPYadezMeTXZZSYuVe1mZB8XrBXg3NmJiaHF9j4+EeaFSKmfgaSlG 8hsp/WycJNuoeZDueJRnTZc5RGBB4QEqXrQqN1mSax/jZmLBCWta7nsq7ntgt1goF4wNAe02oLv NmRIIe+pzZbTyckjq4iOKzKk6cSys9DglWCQmWdW6wHRgEWD1PtOrGCiOfH6OrbJN5v3sCx22N+ sW/G5SbuyfiJFTImdKCqru41nBpENHsSQFczFXFlT X-Received: by 2002:a05:620a:1a05:b0:93f:2b23:4820 with SMTP id af79cd13be357-93f6f7bd38emr528855185a.48.1792772537474; Fri, 23 Oct 2026 09:22:17 -0700 (PDT) X-Received: by 2002:a05:620a:1a05:b0:93f:2b23:4820 with SMTP id af79cd13be357-93f6f7bd38emr528851285a.48.1792772536969; Fri, 23 Oct 2026 09:22:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 72/83] target/s390x: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:20 +0200 Message-ID: <20261023161332.60153-73-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX8FdBbtwEjWeB 5KTalLuXOGaknmSfXHA/RHYC7bj5XQ5Ee/qHf9Db3q1cda6+j0kCByb0coTbsChttsHlRhcg2I8 U7Ea8MMAT0FcEb9r1Mx5UCjgvHsJx5n0K9NmA2QfIMXBk0XF0BASyUAOz99wbIwQspao5878Kwi GhiL0x4j+0cpH386UfukI+F3QjZMq3CI2+W753BLd1yFB5eh25zjClQogTYYUF1Ut9GtAYKG95Z vN0ogHLi97IfH/OPAD0UiL9T/JIeJE5CR7yX21sURADEgvAXlgdV2HLo2G0sC+nYfZbhr4JhDja yws/mpiQlhtNNvbgjXo9ym8PLkTKb7LBiRrD36BCdPQujruZlbshukL4RaObZ4evU6QHG70ZCv7 9zWh13bZxoMQuGO+AgMKWz6mLSK4NctUQU+nmEEu9vCf3DxI5K1DmDb77BT7O5iasQS6gbhBEip ykC+ka84Kr829EJlQwg== X-Proofpoint-GUID: LK_JbGBSB3m4dNuLrTbpb6mDYLwPD3O6 X-Authority-Analysis: v=2.4 cv=a9mlZkSF c=1 sm=1 tr=0 ts=6adb89ba cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=Wv-XcSyDAywttTPMHZIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: LK_JbGBSB3m4dNuLrTbpb6mDYLwPD3O6 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXztfmi/5ZF5o/ nRlwedaAVVMn72Sl0wEJk02CeanSPfFLPpagQ90qpgNXqIdMIT/P9aooQIBF4m/MX5hg7lLuCRY epWIWfvS1+51JRlpJnNSOqp1GWrXesk= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772693719158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-15-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/tcg/mem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 414e6838c87..baf074240fa 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -2488,7 +2488,7 @@ void HELPER(ex)(CPUS390XState *env, uint32_t ilen, ui= nt64_t r1, uint64_t addr) } else if (opc =3D=3D 0x0a) { env->int_svc_code =3D extract64(insn, 48, 8); env->int_svc_ilen =3D ilen; - helper_exception(env, EXCP_SVC); + HELPER(exception)(env, EXCP_SVC); g_assert_not_reached(); } =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772654; cv=none; d=zohomail.com; s=zohoarc; b=i7lj+iA0eR5U1OK8qCcuRkb/rsxQ4yv+cjw8QdUNOru8LMfNRBiQqzQLP1qPH781bkFLTvLred2VHUIz/2vrqcuM9Gq1F2ukNMHydGGwb+8MUXgRQHzQh2wQcVcGpSCGjeRk0hzIRZr47szfF506k1BZtLvGGVsLrzmupPW7T+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772654; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=fIuremeUkYXSNJeuyHlL2dWnhrkQ1Ph8wvOr/DzvASo=; b=MyIVPLvq4dKW2cVlzIsZbzAi/D59Jkeij9HhHC1ZrDJojrRHaCVipgJOmAHhe4KIQI8SV+TCN5vNss6WCqj/7DTVrE2TQB02WYDg4t23bc5pbL2bDCXCcOqtLxrle+I/EnS77jzluPZJznAhvoipZWXpgN0JNk9tfPazUZkIZQ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772654122484.3184501401157; Fri, 23 Oct 2026 09:24:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI2O-0005Yo-0y; Fri, 23 Oct 2026 12:22:38 -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 1xKI2H-0005PN-5Q for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:29 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI2E-00036S-MB for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:28 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG41jf3812454 for ; Fri, 23 Oct 2026 16:22:25 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas882f3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:22:25 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f1f2fafeaso140452385a.2 for ; Fri, 23 Oct 2026 09:22:25 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d4076b8sm903992f8f.32.2026.10.23.09.22.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= fIuremeUkYXSNJeuyHlL2dWnhrkQ1Ph8wvOr/DzvASo=; b=NsmTLVHXRHWSGUXN mdy0lMbP+Q69NEi3JVPhnJo3gvCb6xdrVSp/NLqwrbmCXyvxLW5CfOLZYMyS+Z9S B+oXtzGWhRK50A79gmJTKVCzy0nj3y1XFBiJRI6/ot59Ekt7grvq31rpBE1QSn9n OX+8DxYTO4nTCCSgq+Kx0krMRLvfnLNSKa9Eva9WiyC3aGBwl0gew6XPDL6JRanY Jn4luxfBRHIGyOaRb0eAvD55DLn27BEtEYzSUFtpzUv6UW+RhQfE296I6SEIhsJp MbGFUM7Q5kxNFzDSCxJ7AHhyGPpfD+s3I2EEUxeqcz5kkF5tv3dCilC4cqmzyb/3 be0soA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772545; x=1793377345; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=fIuremeUkYXSNJeuyHlL2dWnhrkQ1Ph8wvOr/DzvASo=; b=RWJJ7WlBxk75h1S3EIl6YWOYehYIllwp8Kz13pfBgTtRJjYlZM0OBOwzWN+hlstEIK YBMYJQxPxckv5F/p0tIQ4EGkCRtFCtZrKkeLL3gMvM4OxDbOSH1fgxpCDBNwvOXqIui6 KCE36lTshHF8ZtTqVkMA9kiOHaKyT+zZ0V7cE6xSSwqrNpd95Gn3ntVpHLo7LyvJrDre rW0XXp9TC8C5arvqHX/Vt6uGsq1Xdb+uQSjrHXRuAvNQBBthBxkS517fMMT8EE6YxLWB +WTZCDpww/m956YLGBjJlCIGmorS2EaC7cBp1l7JczelhYHFMoRxHdOAKapeJxNH8M5t pIPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772545; x=1793377345; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=fIuremeUkYXSNJeuyHlL2dWnhrkQ1Ph8wvOr/DzvASo=; b=elJ7PTvRoqV1t/W7lP+ZM4h69IJUGZ97F+XSCQQPHQQ2mziVDD4inEfMn7LM/zNavg ANLWn4EAFHCn06yLujo9TAHxLMawFd49pOjDLu5OLzXfnFBv+ofAfLGcXUxsrRXPrKEZ /gQ0F22BTM81aMJcrRjZ5WL9X6kCBBLBq+RmBqhSWide3N2SDjhvYZuqkmUN1xoNJ056 C8OPOQXNG59lw1Ln1vcT2G8Y2DxeKxY2UPzwdua7sh4yXHQ3dBJNIn5mfM18RMz9KJqI FD9UoUO+9B/B0mU8MY08suIdYZzIn48H0MO85ktpDcAT+i1XdflAUELw8l+wke6GrR48 YA8Q== X-Gm-Message-State: AFq9FYKTxw4RYp0PD460CwXlo9tcCy5CQ6WpQyOo2XGd+pmQCqRMJ6lq PXGO7MVCam1neZuMbBnSVIf4Pu5jaej+T3fusQcl9fBArklklqP8DV6b0BLKIG/kvJveT5GaTnW k9I/3enDz9GA/N0xy/buSjZnVolIuUsJVP4wVtKMB8zN8WGYa4NBV9Qeoi0v/Aw+VLj0y X-Gm-Gg: AYBFou1eVZqGz8rGJkwS1JQ19lwG61XXPmfQGrKl5tVY66WQF7+DXQOM0Zjj3+ndhQb IqRJy+szsI5kpOcEtag4a13w1lK7njWfxd/MBCxDud15JTZUYSePmLqAE+RwwXIXVjuBagSLgOL q38HjREcWxpYbNFhu6byldggWMrSEUIFiKvnFT7RTkl7WWm+rSwSXnW+OhUVZ9HOMzZSbnRRsNA KDl49cGBRasrni7z3EUP54JwH8d76W+oLA7QSj2uH5U7mIIT6mKcOisB1q5Xjt2FmhGby21oNbB 7ZCqDT/bwTbVsTcIoM0Cbnnw9kTCGUVWVHg3R8kJ+YgZFWjpDGtLLCd/qbNyhYD4a7UaoHG45Fs Q1RvGNoitbgfhVNNXS0L6rhy5fW04I6C2FJekmldF X-Received: by 2002:a05:620a:2906:b0:93e:e2a4:b0fe with SMTP id af79cd13be357-93f6f9e7e3emr483107785a.66.1792772544677; Fri, 23 Oct 2026 09:22:24 -0700 (PDT) X-Received: by 2002:a05:620a:2906:b0:93e:e2a4:b0fe with SMTP id af79cd13be357-93f6f9e7e3emr483102585a.66.1792772543996; Fri, 23 Oct 2026 09:22:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 73/83] target/sh4: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:21 +0200 Message-ID: <20261023161332.60153-74-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX2RR+RuDne1gb 59VxWoSTenjO7VJCQ6shTjFEDN3K9mJ680Kub2Q5Qwjzv6A8dw3mnr1J6Sa1kwwvteYGBSEuHvb CFVfDZUTsCoKcN8i8rBV598d95a5YZ0= X-Authority-Analysis: v=2.4 cv=OPqyTiaB c=1 sm=1 tr=0 ts=6adb89c1 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=s8CIgTy_PDT41ihXdFQA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX0fyvP9t83rV7 x+24HIvPFuEebDwwFvjXSTFkUzBkWXxA/9Epz7RC1HPqrVP4gO2GLT6QQp7wjcSFW9CjuuVMCYA ZyMP9o2bVzHu4ccxwOX41EqMRlemD/8Z7Z/Q5JpgAt2jGXh4nsaRX8g3QuxLPTkoVKNUfPe1Omx Yz+QqaHbhY5ZryTA6zePIOhlFY1e7e8I3drqbnq5T5rNE4HWJR97K1m7gLtYJm5R3Zp0i2eh7zw iZy0oOZp/c9380onAMHcbJEhZfdKZfElTULxf1i8DAoxVQw0XSpdFz/GcKPdbJPWqQB43Wh2UrK CehdJhR5GWlPK5bEqi6oPpPAJC6c1D2m02FCugTpHqRG2E/PFiBDmNt7WrJdzQczCXxB+1cRnfT NZhaL7nOYZBrVivEK3RXqT0Gs2CSkzlgHQnZCAhiTUp19VgRD55jDaWCOcbQCa3U8ccjDg0EcpH l6/8ok7WbbhlYwNwNuQ== X-Proofpoint-GUID: DzCmInMNK9vPXatlG3qW2wdBaeRcb5l4 X-Proofpoint-ORIG-GUID: DzCmInMNK9vPXatlG3qW2wdBaeRcb5l4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772655207158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-16-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/sh4/op_helper.c | 76 +++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index 8beac9ca034..6dbdf59385c 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -46,7 +46,7 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr a= ddr, =20 #endif =20 -void helper_ldtlb(CPUSH4State *env) +void HELPER(ldtlb)(CPUSH4State *env) { #ifdef CONFIG_USER_ONLY cpu_abort(env_cpu(env), "Unhandled ldtlb"); @@ -65,27 +65,27 @@ void raise_exception(CPUSH4State *env, int index, cpu_loop_exit_restore(cs, retaddr); } =20 -void helper_raise_illegal_instruction(CPUSH4State *env) +void HELPER(raise_illegal_instruction)(CPUSH4State *env) { raise_exception(env, SH4_EXCP_ILLEGAL_INSTRUCTION, 0); } =20 -void helper_raise_slot_illegal_instruction(CPUSH4State *env) +void HELPER(raise_slot_illegal_instruction)(CPUSH4State *env) { raise_exception(env, SH4_EXCP_SLOT_ILLEGAL_INSTRUCTION, 0); } =20 -void helper_raise_fpu_disable(CPUSH4State *env) +void HELPER(raise_fpu_disable)(CPUSH4State *env) { raise_exception(env, SH4_EXCP_FPU_DISABLE, 0); } =20 -void helper_raise_slot_fpu_disable(CPUSH4State *env) +void HELPER(raise_slot_fpu_disable)(CPUSH4State *env) { raise_exception(env, SH4_EXCP_SLOT_FPU_DISABLE, 0); } =20 -void helper_sleep(CPUSH4State *env) +void HELPER(sleep)(CPUSH4State *env) { CPUState *cs =3D env_cpu(env); =20 @@ -94,19 +94,19 @@ void helper_sleep(CPUSH4State *env) raise_exception(env, EXCP_HLT, 0); } =20 -void helper_trapa(CPUSH4State *env, uint32_t tra) +void HELPER(trapa)(CPUSH4State *env, uint32_t tra) { env->tra =3D tra << 2; raise_exception(env, SH4_EXCP_TRAPA, 0); } =20 -void helper_exclusive(CPUSH4State *env) +void HELPER(exclusive)(CPUSH4State *env) { /* We do not want cpu_restore_state to run. */ cpu_loop_exit_atomic(env_cpu(env), 0); } =20 -void helper_movcal(CPUSH4State *env, uint32_t address, uint32_t value) +void HELPER(movcal)(CPUSH4State *env, uint32_t address, uint32_t value) { if (cpu_sh4_is_cached (env, address)) { @@ -121,7 +121,7 @@ void helper_movcal(CPUSH4State *env, uint32_t address, = uint32_t value) } } =20 -void helper_discard_movcal_backup(CPUSH4State *env) +void HELPER(discard_movcal_backup)(CPUSH4State *env) { memory_content *current =3D env->movcal_backup; =20 @@ -135,7 +135,7 @@ void helper_discard_movcal_backup(CPUSH4State *env) } } =20 -void helper_ocbi(CPUSH4State *env, uint32_t address) +void HELPER(ocbi)(CPUSH4State *env, uint32_t address) { unsigned mmu_idx =3D cpu_mmu_index(env_cpu(env), false); MemOpIdx oi =3D make_memop_idx(MO_TE | MO_UL | MO_UNALN, mmu_idx); @@ -161,7 +161,7 @@ void helper_ocbi(CPUSH4State *env, uint32_t address) } } =20 -void helper_macl(CPUSH4State *env, int32_t arg0, int32_t arg1) +void HELPER(macl)(CPUSH4State *env, int32_t arg0, int32_t arg1) { const int64_t min =3D -(1ll << 47); const int64_t max =3D (1ll << 47) - 1; @@ -180,7 +180,7 @@ void helper_macl(CPUSH4State *env, int32_t arg0, int32_= t arg1) env->mac =3D res; } =20 -void helper_macw(CPUSH4State *env, int32_t arg0, int32_t arg1) +void HELPER(macw)(CPUSH4State *env, int32_t arg0, int32_t arg1) { /* Inputs are already sign-extended from 16 bits. */ int32_t mul =3D arg0 * arg1; @@ -216,7 +216,7 @@ void cpu_load_fpscr(CPUSH4State *env, uint32_t val) set_flush_to_zero((val & FPSCR_DN) !=3D 0, &env->fp_status); } =20 -void helper_ld_fpscr(CPUSH4State *env, uint32_t val) +void HELPER(ld_fpscr)(CPUSH4State *env, uint32_t val) { cpu_load_fpscr(env, val); } @@ -260,7 +260,7 @@ static void update_fpscr(CPUSH4State *env, uintptr_t re= taddr) } } =20 -float32 helper_fadd_FT(CPUSH4State *env, float32 t0, float32 t1) +float32 HELPER(fadd_FT)(CPUSH4State *env, float32 t0, float32 t1) { set_float_exception_flags(0, &env->fp_status); t0 =3D float32_add(t0, t1, &env->fp_status); @@ -268,7 +268,7 @@ float32 helper_fadd_FT(CPUSH4State *env, float32 t0, fl= oat32 t1) return t0; } =20 -float64 helper_fadd_DT(CPUSH4State *env, float64 t0, float64 t1) +float64 HELPER(fadd_DT)(CPUSH4State *env, float64 t0, float64 t1) { set_float_exception_flags(0, &env->fp_status); t0 =3D float64_add(t0, t1, &env->fp_status); @@ -276,7 +276,7 @@ float64 helper_fadd_DT(CPUSH4State *env, float64 t0, fl= oat64 t1) return t0; } =20 -uint32_t helper_fcmp_eq_FT(CPUSH4State *env, float32 t0, float32 t1) +uint32_t HELPER(fcmp_eq_FT)(CPUSH4State *env, float32 t0, float32 t1) { int relation; =20 @@ -286,7 +286,7 @@ uint32_t helper_fcmp_eq_FT(CPUSH4State *env, float32 t0= , float32 t1) return relation =3D=3D float_relation_equal; } =20 -uint32_t helper_fcmp_eq_DT(CPUSH4State *env, float64 t0, float64 t1) +uint32_t HELPER(fcmp_eq_DT)(CPUSH4State *env, float64 t0, float64 t1) { int relation; =20 @@ -296,7 +296,7 @@ uint32_t helper_fcmp_eq_DT(CPUSH4State *env, float64 t0= , float64 t1) return relation =3D=3D float_relation_equal; } =20 -uint32_t helper_fcmp_gt_FT(CPUSH4State *env, float32 t0, float32 t1) +uint32_t HELPER(fcmp_gt_FT)(CPUSH4State *env, float32 t0, float32 t1) { int relation; =20 @@ -306,7 +306,7 @@ uint32_t helper_fcmp_gt_FT(CPUSH4State *env, float32 t0= , float32 t1) return relation =3D=3D float_relation_greater; } =20 -uint32_t helper_fcmp_gt_DT(CPUSH4State *env, float64 t0, float64 t1) +uint32_t HELPER(fcmp_gt_DT)(CPUSH4State *env, float64 t0, float64 t1) { int relation; =20 @@ -316,7 +316,7 @@ uint32_t helper_fcmp_gt_DT(CPUSH4State *env, float64 t0= , float64 t1) return relation =3D=3D float_relation_greater; } =20 -float64 helper_fcnvsd_FT_DT(CPUSH4State *env, float32 t0) +float64 HELPER(fcnvsd_FT_DT)(CPUSH4State *env, float32 t0) { float64 ret; set_float_exception_flags(0, &env->fp_status); @@ -325,7 +325,7 @@ float64 helper_fcnvsd_FT_DT(CPUSH4State *env, float32 t= 0) return ret; } =20 -float32 helper_fcnvds_DT_FT(CPUSH4State *env, float64 t0) +float32 HELPER(fcnvds_DT_FT)(CPUSH4State *env, float64 t0) { float32 ret; set_float_exception_flags(0, &env->fp_status); @@ -334,7 +334,7 @@ float32 helper_fcnvds_DT_FT(CPUSH4State *env, float64 t= 0) return ret; } =20 -float32 helper_fdiv_FT(CPUSH4State *env, float32 t0, float32 t1) +float32 HELPER(fdiv_FT)(CPUSH4State *env, float32 t0, float32 t1) { set_float_exception_flags(0, &env->fp_status); t0 =3D float32_div(t0, t1, &env->fp_status); @@ -342,7 +342,7 @@ float32 helper_fdiv_FT(CPUSH4State *env, float32 t0, fl= oat32 t1) return t0; } =20 -float64 helper_fdiv_DT(CPUSH4State *env, float64 t0, float64 t1) +float64 HELPER(fdiv_DT)(CPUSH4State *env, float64 t0, float64 t1) { set_float_exception_flags(0, &env->fp_status); t0 =3D float64_div(t0, t1, &env->fp_status); @@ -350,7 +350,7 @@ float64 helper_fdiv_DT(CPUSH4State *env, float64 t0, fl= oat64 t1) return t0; } =20 -float32 helper_float_FT(CPUSH4State *env, uint32_t t0) +float32 HELPER(float_FT)(CPUSH4State *env, uint32_t t0) { float32 ret; set_float_exception_flags(0, &env->fp_status); @@ -359,7 +359,7 @@ float32 helper_float_FT(CPUSH4State *env, uint32_t t0) return ret; } =20 -float64 helper_float_DT(CPUSH4State *env, uint32_t t0) +float64 HELPER(float_DT)(CPUSH4State *env, uint32_t t0) { float64 ret; set_float_exception_flags(0, &env->fp_status); @@ -368,7 +368,7 @@ float64 helper_float_DT(CPUSH4State *env, uint32_t t0) return ret; } =20 -float32 helper_fmac_FT(CPUSH4State *env, float32 t0, float32 t1, float32 t= 2) +float32 HELPER(fmac_FT)(CPUSH4State *env, float32 t0, float32 t1, float32 = t2) { set_float_exception_flags(0, &env->fp_status); t0 =3D float32_muladd(t0, t1, t2, 0, &env->fp_status); @@ -376,7 +376,7 @@ float32 helper_fmac_FT(CPUSH4State *env, float32 t0, fl= oat32 t1, float32 t2) return t0; } =20 -float32 helper_fmul_FT(CPUSH4State *env, float32 t0, float32 t1) +float32 HELPER(fmul_FT)(CPUSH4State *env, float32 t0, float32 t1) { set_float_exception_flags(0, &env->fp_status); t0 =3D float32_mul(t0, t1, &env->fp_status); @@ -384,7 +384,7 @@ float32 helper_fmul_FT(CPUSH4State *env, float32 t0, fl= oat32 t1) return t0; } =20 -float64 helper_fmul_DT(CPUSH4State *env, float64 t0, float64 t1) +float64 HELPER(fmul_DT)(CPUSH4State *env, float64 t0, float64 t1) { set_float_exception_flags(0, &env->fp_status); t0 =3D float64_mul(t0, t1, &env->fp_status); @@ -392,7 +392,7 @@ float64 helper_fmul_DT(CPUSH4State *env, float64 t0, fl= oat64 t1) return t0; } =20 -float32 helper_fsqrt_FT(CPUSH4State *env, float32 t0) +float32 HELPER(fsqrt_FT)(CPUSH4State *env, float32 t0) { set_float_exception_flags(0, &env->fp_status); t0 =3D float32_sqrt(t0, &env->fp_status); @@ -400,7 +400,7 @@ float32 helper_fsqrt_FT(CPUSH4State *env, float32 t0) return t0; } =20 -float64 helper_fsqrt_DT(CPUSH4State *env, float64 t0) +float64 HELPER(fsqrt_DT)(CPUSH4State *env, float64 t0) { set_float_exception_flags(0, &env->fp_status); t0 =3D float64_sqrt(t0, &env->fp_status); @@ -408,7 +408,7 @@ float64 helper_fsqrt_DT(CPUSH4State *env, float64 t0) return t0; } =20 -float32 helper_fsrra_FT(CPUSH4State *env, float32 t0) +float32 HELPER(fsrra_FT)(CPUSH4State *env, float32 t0) { set_float_exception_flags(0, &env->fp_status); /* "Approximate" 1/sqrt(x) via actual computation. */ @@ -426,7 +426,7 @@ float32 helper_fsrra_FT(CPUSH4State *env, float32 t0) return t0; } =20 -float32 helper_fsub_FT(CPUSH4State *env, float32 t0, float32 t1) +float32 HELPER(fsub_FT)(CPUSH4State *env, float32 t0, float32 t1) { set_float_exception_flags(0, &env->fp_status); t0 =3D float32_sub(t0, t1, &env->fp_status); @@ -434,7 +434,7 @@ float32 helper_fsub_FT(CPUSH4State *env, float32 t0, fl= oat32 t1) return t0; } =20 -float64 helper_fsub_DT(CPUSH4State *env, float64 t0, float64 t1) +float64 HELPER(fsub_DT)(CPUSH4State *env, float64 t0, float64 t1) { set_float_exception_flags(0, &env->fp_status); t0 =3D float64_sub(t0, t1, &env->fp_status); @@ -442,7 +442,7 @@ float64 helper_fsub_DT(CPUSH4State *env, float64 t0, fl= oat64 t1) return t0; } =20 -uint32_t helper_ftrc_FT(CPUSH4State *env, float32 t0) +uint32_t HELPER(ftrc_FT)(CPUSH4State *env, float32 t0) { uint32_t ret; set_float_exception_flags(0, &env->fp_status); @@ -451,7 +451,7 @@ uint32_t helper_ftrc_FT(CPUSH4State *env, float32 t0) return ret; } =20 -uint32_t helper_ftrc_DT(CPUSH4State *env, float64 t0) +uint32_t HELPER(ftrc_DT)(CPUSH4State *env, float64 t0) { uint32_t ret; set_float_exception_flags(0, &env->fp_status); @@ -460,7 +460,7 @@ uint32_t helper_ftrc_DT(CPUSH4State *env, float64 t0) return ret; } =20 -void helper_fipr(CPUSH4State *env, uint32_t m, uint32_t n) +void HELPER(fipr)(CPUSH4State *env, uint32_t m, uint32_t n) { int bank, i; float32 r, p; @@ -480,7 +480,7 @@ void helper_fipr(CPUSH4State *env, uint32_t m, uint32_t= n) env->fregs[bank + n + 3] =3D r; } =20 -void helper_ftrv(CPUSH4State *env, uint32_t n) +void HELPER(ftrv)(CPUSH4State *env, uint32_t n) { int bank_matrix, bank_vector; int i, j; --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772676; cv=none; d=zohomail.com; s=zohoarc; b=lAqF62jbzgnlkqYv6Isg652/3WkhMWZ6O5YUtl837mBoD/6p66Xfx6ETAEFgUp/V1mQ8THHYUcdRfX/yP1bi1Qg1mew28TYXe5W8F8cyfiUx15DRa6cPuAZO+Md7QoQ2Pm4Tdg6hnbsAFBaZ00cKXuhJjdfPtDEORDzDHD9RZs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772676; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=M8uru+mO3E4xWMZ6KFP3qK00+xhQqUdDc1B9jp009uc=; b=nCMBYvrFH0JKL5kDhHR+rwnKbhcMd3brFVAgkTY2E4NSfbizIc4kEYzuzdr+JvNT+nSo+KH/svJ+bEaDRMMeRgsEQFe0MDFH3YsFT/shw2VaaNa90uat29SeGNh80oNxemZUWqcMDV0/lK+j/UrUX33fD8m0dngMNwCExbGAN4c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772676112800.340986933847; Fri, 23 Oct 2026 09:24:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI2m-0005xE-Ax; Fri, 23 Oct 2026 12:23:01 -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 1xKI2R-0005fB-I5 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:43 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI2M-00037G-Lw for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:38 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG2quj3228251 for ; Fri, 23 Oct 2026 16:22:33 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgart02k4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:22:33 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-93f26dd2165so356364285a.3 for ; Fri, 23 Oct 2026 09:22:33 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29cdc3ac7sm16237885e9.13.2026.10.23.09.22.29 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= M8uru+mO3E4xWMZ6KFP3qK00+xhQqUdDc1B9jp009uc=; b=m12NFWrH6ISDU/xo 8stmaRTEldfaL9WSkNgGLMU8EesAFuIYgwxQvGwtmZw/VE3yQrNg8Trre4ifZn+d m0Z4Rvxbim2ySBQaq31muzqcUu/QzFouuZjGBe94t9zyQ/bON6Rz56tt8zsHpmKy VZfrQytzgqEz7H5v/FKG1y6g2S3OEQEvoaJQorKcSSvUa5GhHUxQv3D6M7U/llz7 GBgnH9X6JJRy+i+EycrNuavRQnQtVELNl351eWk5sjO6cXxjApEArCY1UtRVPybT mPajIAS2mlk3cy23T3aD7Ay8ZhgLHIiKrTpBY6Oa14uukoz/UZVTDeSwmllpaTz4 JSBuMA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772553; x=1793377353; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=M8uru+mO3E4xWMZ6KFP3qK00+xhQqUdDc1B9jp009uc=; b=jK2dSdGR5B24+80sg0aDgUfyohkzC2RHZPmfvAPrDVioqwXRpMhs4eBR2nqCMcgXj3 01hCzVIXjAfNIFfj+cKwhR8iwAXDjxRcfbC5QofoD8qjFAUSlFl3wV/QdYg5MNfDoXgx n/9pkS14fL2tSqKBbaRnbtyJb4mZoXF1RGLrmCFScwkTkOpFlqNSzmuRALGInNAoJ3Fc /Mr9m+wzEH8iGrcD1S4SVgXumq8xX8DtkpydPaiSkUsepYoVDe9AoGCn4AXL6I/kijc/ 5VFFnJeRRRfEIINGQk6Fe9YjgVJZxkSgXyO8g2FtduegssnmT8bP1OFo50t6YwD5oof8 r59Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772553; x=1793377353; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=M8uru+mO3E4xWMZ6KFP3qK00+xhQqUdDc1B9jp009uc=; b=QFsiiZ7sw8lLh9v05+p3yzx43/qa8hpMRBQ+Rarfi0X4BQwjPRTccX1QpZTWJ4diOD aCkn9GomkSZR4cw+o0qvUu5MHczuYo2Zcycjh/t5LfcUowXeOb4a7mxObqPSVjBLlQ6d YnKX2HKQojtVmYov7sPOWdYmZtQurnvNDkZONbTjwR+t6D3O8EK+jI6E2eIp1djuj9I+ CtFUt1aHRPFPkxzQmC7z5mWo1JJz1ms2g7Yi5bCQDAW0GMMbTYcmtmRQtxHR+S0D1td6 VBrdTooDS00k6hjUSNe89hY7YHR/iT60RVoOq6+HQIVHSNOAdwb1xXXhrP/FOlavY7Ho tE6A== X-Gm-Message-State: AFq9FYIkiDLMWb6OfhKPDK+4WzyFqECHo+yzNXXdKtjNfXUj6yHrfbpF zJBYRFbIsDCJJJXHFoMzBfqZ50QQj6b+uPCJmS6gfLFC14NfUXUiAhEhDO/IBAn7qxmdGbVS3kp iDit4Ji0zMFHq86LEZjbF6K8fF5B3H/XgHTRjPWsvHOH54clEXDVhlaHwR87nj9R64fel X-Gm-Gg: AYBFou08QCJhj7mIQCOopN0v4Y6BfsRpZjQBSp/JONel5S2CbMNXr9pBrKIyzVzCuqT U3aqUDnC9LGdAlu11eiPelm2c82/2nR/38svtTcoFq5qte/lXpdTAAS7wsfwlhfvb42YrLI63gs CFUaU6OaM0VMmKkx/6SKOnEe8eKnf6Arj4N97R6O7VaIzMBLnj44yDzFBqLV8qE964YtBjkqQp0 NPBMXRb/htdzJaTN0EIo+UW4HpL0zgXTVd+nBy7Jr5i9mUsATeRIfXGXcA4oPVMcWPCFbh4PSFi dicUK73a0Qp8nH2DyJSmfVyCh2SxklQG+tLQ3upP8mHkqpVMWxwd2/RX//GBEc5MiqxJGnrVBE+ 0w5SAcU1TG+pnzG3PkXxcSZDpIDd/KxUGHohyiX9O X-Received: by 2002:a05:620a:4449:b0:93f:34c9:924d with SMTP id af79cd13be357-93f6f9549d2mr404892385a.35.1792772552332; Fri, 23 Oct 2026 09:22:32 -0700 (PDT) X-Received: by 2002:a05:620a:4449:b0:93f:34c9:924d with SMTP id af79cd13be357-93f6f9549d2mr404885085a.35.1792772551203; Fri, 23 Oct 2026 09:22:31 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 74/83] target/sparc: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:22 +0200 Message-ID: <20261023161332.60153-75-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXybGcvrr/aYht ZNDYUZQoKvGRt+6fJ4VwNWGYFwcFyaFvdpCb5BB/PeBk6bl5U56VMiF1Aj6A//IObG6GFSV7GBl bCxlkoJafKwi9exd4WP1+TWW0iDlzOnG2CeBNAqY30yWXVdZSBCjtysLGF1I9ESU723DoDagINF 46aNBGxAMU9ywNJZ0gDCxWr1aXPX/Xsy9dZNoRGdYVr6iMTrKTM5NULDs/Gb7FKsMT7nBsJk8V3 sQsj5MSV4YeAylUKMY64AIoZvdfUC2TiXW0B+eLgDYVPos1iiPta3emW+eso+4YRZHefvvSSiJS PgibFC6rX/SFjTHl3/UZrYPCD03LwHrrNn5x2Iuo4N/C8w/B9CtT5NXntKVVsFHGtRM2dzaQAXA SpOd/f3jBuoLcpmx2CC5cnH6PR7loyAtl/NXP7e2W7EzMrSaHfQXmtsB8lfhPrRJjJrgnYnH40W gXLsjOSsOAJalQ+OIfw== X-Authority-Analysis: v=2.4 cv=JI+uIMKb c=1 sm=1 tr=0 ts=6adb89c9 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=kCVwYyrU2TdIIrcQhIEA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX+4ZrzZhImaZ/ 8XJ/YLc0S7APVt9+hiabrfaoTfiA6R494NGGKaowAuqda9ejc9J9g7qjUYGdKkB5//lVaOIdQgH x97uiygehP/+04/lW/rmmq17viQ1LCQ= X-Proofpoint-ORIG-GUID: q7it6FJLPk3bHlmco_WqJ8GGGxb43Ane X-Proofpoint-GUID: q7it6FJLPk3bHlmco_WqJ8GGGxb43Ane X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772677399158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-17-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/sparc/fop_helper.c | 106 ++++++++++++++++++------------------ target/sparc/helper.c | 22 ++++---- target/sparc/int64_helper.c | 6 +- target/sparc/ldst_helper.c | 14 ++--- target/sparc/vis_helper.c | 94 ++++++++++++++++---------------- target/sparc/win_helper.c | 38 ++++++------- 6 files changed, 140 insertions(+), 140 deletions(-) diff --git a/target/sparc/fop_helper.c b/target/sparc/fop_helper.c index 29fd1664384..90aa93f24dc 100644 --- a/target/sparc/fop_helper.c +++ b/target/sparc/fop_helper.c @@ -84,91 +84,91 @@ static void check_ieee_exceptions(CPUSPARCState *env, u= intptr_t ra) env->fsr_cexc_ftt =3D cexc; } =20 -float32 helper_fadds(CPUSPARCState *env, float32 src1, float32 src2) +float32 HELPER(fadds)(CPUSPARCState *env, float32 src1, float32 src2) { float32 ret =3D float32_add(src1, src2, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float32 helper_fsubs(CPUSPARCState *env, float32 src1, float32 src2) +float32 HELPER(fsubs)(CPUSPARCState *env, float32 src1, float32 src2) { float32 ret =3D float32_sub(src1, src2, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float32 helper_fmuls(CPUSPARCState *env, float32 src1, float32 src2) +float32 HELPER(fmuls)(CPUSPARCState *env, float32 src1, float32 src2) { float32 ret =3D float32_mul(src1, src2, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float32 helper_fdivs(CPUSPARCState *env, float32 src1, float32 src2) +float32 HELPER(fdivs)(CPUSPARCState *env, float32 src1, float32 src2) { float32 ret =3D float32_div(src1, src2, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float64 helper_faddd(CPUSPARCState *env, float64 src1, float64 src2) +float64 HELPER(faddd)(CPUSPARCState *env, float64 src1, float64 src2) { float64 ret =3D float64_add(src1, src2, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float64 helper_fsubd(CPUSPARCState *env, float64 src1, float64 src2) +float64 HELPER(fsubd)(CPUSPARCState *env, float64 src1, float64 src2) { float64 ret =3D float64_sub(src1, src2, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float64 helper_fmuld(CPUSPARCState *env, float64 src1, float64 src2) +float64 HELPER(fmuld)(CPUSPARCState *env, float64 src1, float64 src2) { float64 ret =3D float64_mul(src1, src2, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float64 helper_fdivd(CPUSPARCState *env, float64 src1, float64 src2) +float64 HELPER(fdivd)(CPUSPARCState *env, float64 src1, float64 src2) { float64 ret =3D float64_div(src1, src2, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -Int128 helper_faddq(CPUSPARCState *env, Int128 src1, Int128 src2) +Int128 HELPER(faddq)(CPUSPARCState *env, Int128 src1, Int128 src2) { float128 ret =3D float128_add(f128_in(src1), f128_in(src2), &env->fp_s= tatus); check_ieee_exceptions(env, GETPC()); return f128_ret(ret); } =20 -Int128 helper_fsubq(CPUSPARCState *env, Int128 src1, Int128 src2) +Int128 HELPER(fsubq)(CPUSPARCState *env, Int128 src1, Int128 src2) { float128 ret =3D float128_sub(f128_in(src1), f128_in(src2), &env->fp_s= tatus); check_ieee_exceptions(env, GETPC()); return f128_ret(ret); } =20 -Int128 helper_fmulq(CPUSPARCState *env, Int128 src1, Int128 src2) +Int128 HELPER(fmulq)(CPUSPARCState *env, Int128 src1, Int128 src2) { float128 ret =3D float128_mul(f128_in(src1), f128_in(src2), &env->fp_s= tatus); check_ieee_exceptions(env, GETPC()); return f128_ret(ret); } =20 -Int128 helper_fdivq(CPUSPARCState *env, Int128 src1, Int128 src2) +Int128 HELPER(fdivq)(CPUSPARCState *env, Int128 src1, Int128 src2) { float128 ret =3D float128_div(f128_in(src1), f128_in(src2), &env->fp_s= tatus); check_ieee_exceptions(env, GETPC()); return f128_ret(ret); } =20 -float64 helper_fsmuld(CPUSPARCState *env, float32 src1, float32 src2) +float64 HELPER(fsmuld)(CPUSPARCState *env, float32 src1, float32 src2) { float64 ret =3D float64_mul(float32_to_float64(src1, &env->fp_status), float32_to_float64(src2, &env->fp_status), @@ -177,7 +177,7 @@ float64 helper_fsmuld(CPUSPARCState *env, float32 src1,= float32 src2) return ret; } =20 -Int128 helper_fdmulq(CPUSPARCState *env, float64 src1, float64 src2) +Int128 HELPER(fdmulq)(CPUSPARCState *env, float64 src1, float64 src2) { float128 ret =3D float128_mul(float64_to_float128(src1, &env->fp_statu= s), float64_to_float128(src2, &env->fp_status), @@ -187,21 +187,21 @@ Int128 helper_fdmulq(CPUSPARCState *env, float64 src1= , float64 src2) } =20 /* Integer to float conversion. */ -float32 helper_fitos(CPUSPARCState *env, int32_t src) +float32 HELPER(fitos)(CPUSPARCState *env, int32_t src) { float32 ret =3D int32_to_float32(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float64 helper_fitod(CPUSPARCState *env, int32_t src) +float64 HELPER(fitod)(CPUSPARCState *env, int32_t src) { float64 ret =3D int32_to_float64(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -Int128 helper_fitoq(CPUSPARCState *env, int32_t src) +Int128 HELPER(fitoq)(CPUSPARCState *env, int32_t src) { float128 ret =3D int32_to_float128(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); @@ -209,21 +209,21 @@ Int128 helper_fitoq(CPUSPARCState *env, int32_t src) } =20 #ifdef TARGET_SPARC64 -float32 helper_fxtos(CPUSPARCState *env, int64_t src) +float32 HELPER(fxtos)(CPUSPARCState *env, int64_t src) { float32 ret =3D int64_to_float32(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float64 helper_fxtod(CPUSPARCState *env, int64_t src) +float64 HELPER(fxtod)(CPUSPARCState *env, int64_t src) { float64 ret =3D int64_to_float64(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -Int128 helper_fxtoq(CPUSPARCState *env, int64_t src) +Int128 HELPER(fxtoq)(CPUSPARCState *env, int64_t src) { float128 ret =3D int64_to_float128(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); @@ -232,42 +232,42 @@ Int128 helper_fxtoq(CPUSPARCState *env, int64_t src) #endif =20 /* floating point conversion */ -float32 helper_fdtos(CPUSPARCState *env, float64 src) +float32 HELPER(fdtos)(CPUSPARCState *env, float64 src) { float32 ret =3D float64_to_float32(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float64 helper_fstod(CPUSPARCState *env, float32 src) +float64 HELPER(fstod)(CPUSPARCState *env, float32 src) { float64 ret =3D float32_to_float64(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float32 helper_fqtos(CPUSPARCState *env, Int128 src) +float32 HELPER(fqtos)(CPUSPARCState *env, Int128 src) { float32 ret =3D float128_to_float32(f128_in(src), &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -Int128 helper_fstoq(CPUSPARCState *env, float32 src) +Int128 HELPER(fstoq)(CPUSPARCState *env, float32 src) { float128 ret =3D float32_to_float128(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return f128_ret(ret); } =20 -float64 helper_fqtod(CPUSPARCState *env, Int128 src) +float64 HELPER(fqtod)(CPUSPARCState *env, Int128 src) { float64 ret =3D float128_to_float64(f128_in(src), &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -Int128 helper_fdtoq(CPUSPARCState *env, float64 src) +Int128 HELPER(fdtoq)(CPUSPARCState *env, float64 src) { float128 ret =3D float64_to_float128(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); @@ -275,21 +275,21 @@ Int128 helper_fdtoq(CPUSPARCState *env, float64 src) } =20 /* Float to integer conversion. */ -int32_t helper_fstoi(CPUSPARCState *env, float32 src) +int32_t HELPER(fstoi)(CPUSPARCState *env, float32 src) { int32_t ret =3D float32_to_int32_round_to_zero(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -int32_t helper_fdtoi(CPUSPARCState *env, float64 src) +int32_t HELPER(fdtoi)(CPUSPARCState *env, float64 src) { int32_t ret =3D float64_to_int32_round_to_zero(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -int32_t helper_fqtoi(CPUSPARCState *env, Int128 src) +int32_t HELPER(fqtoi)(CPUSPARCState *env, Int128 src) { int32_t ret =3D float128_to_int32_round_to_zero(f128_in(src), &env->fp_status); @@ -298,21 +298,21 @@ int32_t helper_fqtoi(CPUSPARCState *env, Int128 src) } =20 #ifdef TARGET_SPARC64 -int64_t helper_fstox(CPUSPARCState *env, float32 src) +int64_t HELPER(fstox)(CPUSPARCState *env, float32 src) { int64_t ret =3D float32_to_int64_round_to_zero(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -int64_t helper_fdtox(CPUSPARCState *env, float64 src) +int64_t HELPER(fdtox)(CPUSPARCState *env, float64 src) { int64_t ret =3D float64_to_int64_round_to_zero(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -int64_t helper_fqtox(CPUSPARCState *env, Int128 src) +int64_t HELPER(fqtox)(CPUSPARCState *env, Int128 src) { int64_t ret =3D float128_to_int64_round_to_zero(f128_in(src), &env->fp_status); @@ -321,28 +321,28 @@ int64_t helper_fqtox(CPUSPARCState *env, Int128 src) } #endif =20 -float32 helper_fsqrts(CPUSPARCState *env, float32 src) +float32 HELPER(fsqrts)(CPUSPARCState *env, float32 src) { float32 ret =3D float32_sqrt(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -float64 helper_fsqrtd(CPUSPARCState *env, float64 src) +float64 HELPER(fsqrtd)(CPUSPARCState *env, float64 src) { float64 ret =3D float64_sqrt(src, &env->fp_status); check_ieee_exceptions(env, GETPC()); return ret; } =20 -Int128 helper_fsqrtq(CPUSPARCState *env, Int128 src) +Int128 HELPER(fsqrtq)(CPUSPARCState *env, Int128 src) { float128 ret =3D float128_sqrt(f128_in(src), &env->fp_status); check_ieee_exceptions(env, GETPC()); return f128_ret(ret); } =20 -float32 helper_fmadds(CPUSPARCState *env, float32 s1, +float32 HELPER(fmadds)(CPUSPARCState *env, float32 s1, float32 s2, float32 s3, int32_t sc, uint32_t op) { float32 ret =3D float32_muladd_scalbn(s1, s2, s3, sc, op, &env->fp_sta= tus); @@ -350,7 +350,7 @@ float32 helper_fmadds(CPUSPARCState *env, float32 s1, return ret; } =20 -float64 helper_fmaddd(CPUSPARCState *env, float64 s1, +float64 HELPER(fmaddd)(CPUSPARCState *env, float64 s1, float64 s2, float64 s3, int32_t sc, uint32_t op) { float64 ret =3D float64_muladd_scalbn(s1, s2, s3, sc, op, &env->fp_sta= tus); @@ -358,7 +358,7 @@ float64 helper_fmaddd(CPUSPARCState *env, float64 s1, return ret; } =20 -float32 helper_fnadds(CPUSPARCState *env, float32 src1, float32 src2) +float32 HELPER(fnadds)(CPUSPARCState *env, float32 src1, float32 src2) { float32 ret =3D float32_add(src1, src2, &env->fp_status); =20 @@ -373,7 +373,7 @@ float32 helper_fnadds(CPUSPARCState *env, float32 src1,= float32 src2) return ret; } =20 -float32 helper_fnmuls(CPUSPARCState *env, float32 src1, float32 src2) +float32 HELPER(fnmuls)(CPUSPARCState *env, float32 src1, float32 src2) { float32 ret =3D float32_mul(src1, src2, &env->fp_status); =20 @@ -385,7 +385,7 @@ float32 helper_fnmuls(CPUSPARCState *env, float32 src1,= float32 src2) return ret; } =20 -float64 helper_fnaddd(CPUSPARCState *env, float64 src1, float64 src2) +float64 HELPER(fnaddd)(CPUSPARCState *env, float64 src1, float64 src2) { float64 ret =3D float64_add(src1, src2, &env->fp_status); =20 @@ -400,7 +400,7 @@ float64 helper_fnaddd(CPUSPARCState *env, float64 src1,= float64 src2) return ret; } =20 -float64 helper_fnmuld(CPUSPARCState *env, float64 src1, float64 src2) +float64 HELPER(fnmuld)(CPUSPARCState *env, float64 src1, float64 src2) { float64 ret =3D float64_mul(src1, src2, &env->fp_status); =20 @@ -412,7 +412,7 @@ float64 helper_fnmuld(CPUSPARCState *env, float64 src1,= float64 src2) return ret; } =20 -float64 helper_fnsmuld(CPUSPARCState *env, float32 src1, float32 src2) +float64 HELPER(fnsmuld)(CPUSPARCState *env, float32 src1, float32 src2) { float64 ret =3D float64_mul(float32_to_float64(src1, &env->fp_status), float32_to_float64(src2, &env->fp_status), @@ -450,45 +450,45 @@ static uint32_t finish_fcmp(CPUSPARCState *env, Float= Relation r, uintptr_t ra) g_assert_not_reached(); } =20 -uint32_t helper_fcmps(CPUSPARCState *env, float32 src1, float32 src2) +uint32_t HELPER(fcmps)(CPUSPARCState *env, float32 src1, float32 src2) { FloatRelation r =3D float32_compare_quiet(src1, src2, &env->fp_status); return finish_fcmp(env, r, GETPC()); } =20 -uint32_t helper_fcmpes(CPUSPARCState *env, float32 src1, float32 src2) +uint32_t HELPER(fcmpes)(CPUSPARCState *env, float32 src1, float32 src2) { FloatRelation r =3D float32_compare(src1, src2, &env->fp_status); return finish_fcmp(env, r, GETPC()); } =20 -uint32_t helper_fcmpd(CPUSPARCState *env, float64 src1, float64 src2) +uint32_t HELPER(fcmpd)(CPUSPARCState *env, float64 src1, float64 src2) { FloatRelation r =3D float64_compare_quiet(src1, src2, &env->fp_status); return finish_fcmp(env, r, GETPC()); } =20 -uint32_t helper_fcmped(CPUSPARCState *env, float64 src1, float64 src2) +uint32_t HELPER(fcmped)(CPUSPARCState *env, float64 src1, float64 src2) { FloatRelation r =3D float64_compare(src1, src2, &env->fp_status); return finish_fcmp(env, r, GETPC()); } =20 -uint32_t helper_fcmpq(CPUSPARCState *env, Int128 src1, Int128 src2) +uint32_t HELPER(fcmpq)(CPUSPARCState *env, Int128 src1, Int128 src2) { FloatRelation r =3D float128_compare_quiet(f128_in(src1), f128_in(src2= ), &env->fp_status); return finish_fcmp(env, r, GETPC()); } =20 -uint32_t helper_fcmpeq(CPUSPARCState *env, Int128 src1, Int128 src2) +uint32_t HELPER(fcmpeq)(CPUSPARCState *env, Int128 src1, Int128 src2) { FloatRelation r =3D float128_compare(f128_in(src1), f128_in(src2), &env->fp_status); return finish_fcmp(env, r, GETPC()); } =20 -uint32_t helper_flcmps(CPUSPARCState *env, float32 src1, float32 src2) +uint32_t HELPER(flcmps)(CPUSPARCState *env, float32 src1, float32 src2) { /* * FLCMP never raises an exception nor modifies any FSR fields. @@ -516,7 +516,7 @@ uint32_t helper_flcmps(CPUSPARCState *env, float32 src1= , float32 src2) g_assert_not_reached(); } =20 -uint32_t helper_flcmpd(CPUSPARCState *env, float64 src1, float64 src2) +uint32_t HELPER(flcmpd)(CPUSPARCState *env, float64 src1, float64 src2) { float_status discard =3D env->fp_status; FloatRelation r; @@ -559,7 +559,7 @@ target_ulong cpu_get_fsr(CPUSPARCState *env) return fsr; } =20 -target_ulong helper_get_fsr(CPUSPARCState *env) +target_ulong HELPER(get_fsr)(CPUSPARCState *env) { return cpu_get_fsr(env); } @@ -604,14 +604,14 @@ void cpu_put_fsr(CPUSPARCState *env, target_ulong fsr) set_fsr_nonsplit(env, fsr); } =20 -void helper_set_fsr_nofcc_noftt(CPUSPARCState *env, uint32_t fsr) +void HELPER(set_fsr_nofcc_noftt)(CPUSPARCState *env, uint32_t fsr) { env->fsr_cexc_ftt &=3D FSR_FTT_MASK; env->fsr_cexc_ftt |=3D fsr & FSR_CEXC_MASK; set_fsr_nonsplit(env, fsr); } =20 -void helper_set_fsr_nofcc(CPUSPARCState *env, uint32_t fsr) +void HELPER(set_fsr_nofcc)(CPUSPARCState *env, uint32_t fsr) { env->fsr_cexc_ftt =3D fsr & (FSR_CEXC_MASK | FSR_FTT_MASK); set_fsr_nonsplit(env, fsr); diff --git a/target/sparc/helper.c b/target/sparc/helper.c index 8de261b0e30..f4eb78c4487 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -33,7 +33,7 @@ void cpu_raise_exception_ra(CPUSPARCState *env, int tt, u= intptr_t ra) cpu_loop_exit_restore(cs, ra); } =20 -void helper_raise_exception(CPUSPARCState *env, int tt) +void HELPER(raise_exception)(CPUSPARCState *env, int tt) { CPUState *cs =3D env_cpu(env); =20 @@ -41,7 +41,7 @@ void helper_raise_exception(CPUSPARCState *env, int tt) cpu_loop_exit(cs); } =20 -void helper_debug(CPUSPARCState *env) +void HELPER(debug)(CPUSPARCState *env) { CPUState *cs =3D env_cpu(env); =20 @@ -50,14 +50,14 @@ void helper_debug(CPUSPARCState *env) } =20 #ifdef TARGET_SPARC64 -void helper_tick_set_count(void *opaque, uint64_t count) +void HELPER(tick_set_count)(void *opaque, uint64_t count) { #if !defined(CONFIG_USER_ONLY) cpu_tick_set_count(opaque, count); #endif } =20 -uint64_t helper_tick_get_count(CPUSPARCState *env, void *opaque, int mem_i= dx) +uint64_t HELPER(tick_get_count)(CPUSPARCState *env, void *opaque, int mem_= idx) { #if !defined(CONFIG_USER_ONLY) CPUTimer *timer =3D opaque; @@ -74,7 +74,7 @@ uint64_t helper_tick_get_count(CPUSPARCState *env, void *= opaque, int mem_idx) #endif } =20 -void helper_tick_set_limit(void *opaque, uint64_t limit) +void HELPER(tick_set_limit)(void *opaque, uint64_t limit) { #if !defined(CONFIG_USER_ONLY) cpu_tick_set_limit(opaque, limit); @@ -82,7 +82,7 @@ void helper_tick_set_limit(void *opaque, uint64_t limit) } #endif =20 -uint64_t helper_udiv(CPUSPARCState *env, target_ulong a, target_ulong b) +uint64_t HELPER(udiv)(CPUSPARCState *env, target_ulong a, target_ulong b) { uint64_t a64 =3D (uint32_t)a | ((uint64_t)env->y << 32); uint32_t b32 =3D b; @@ -100,7 +100,7 @@ uint64_t helper_udiv(CPUSPARCState *env, target_ulong a= , target_ulong b) return r; } =20 -uint64_t helper_sdiv(CPUSPARCState *env, target_ulong a, target_ulong b) +uint64_t HELPER(sdiv)(CPUSPARCState *env, target_ulong a, target_ulong b) { int64_t a64 =3D (uint32_t)a | ((uint64_t)env->y << 32); int32_t b32 =3D b; @@ -130,7 +130,7 @@ uint64_t helper_sdiv(CPUSPARCState *env, target_ulong a= , target_ulong b) return (uint32_t)r; } =20 -target_ulong helper_taddcctv(CPUSPARCState *env, target_ulong src1, +target_ulong HELPER(taddcctv)(CPUSPARCState *env, target_ulong src1, target_ulong src2) { target_ulong dst, v; @@ -166,7 +166,7 @@ target_ulong helper_taddcctv(CPUSPARCState *env, target= _ulong src1, cpu_raise_exception_ra(env, TT_TOVF, GETPC()); } =20 -target_ulong helper_tsubcctv(CPUSPARCState *env, target_ulong src1, +target_ulong HELPER(tsubcctv)(CPUSPARCState *env, target_ulong src1, target_ulong src2) { target_ulong dst, v; @@ -203,7 +203,7 @@ target_ulong helper_tsubcctv(CPUSPARCState *env, target= _ulong src1, } =20 #ifndef TARGET_SPARC64 -void helper_power_down(CPUSPARCState *env) +void HELPER(power_down)(CPUSPARCState *env) { CPUState *cs =3D env_cpu(env); =20 @@ -214,7 +214,7 @@ void helper_power_down(CPUSPARCState *env) cpu_loop_exit(cs); } =20 -target_ulong helper_rdasr17(CPUSPARCState *env) +target_ulong HELPER(rdasr17)(CPUSPARCState *env) { CPUState *cs =3D env_cpu(env); target_ulong val; diff --git a/target/sparc/int64_helper.c b/target/sparc/int64_helper.c index 849b1a436b2..dc2395c270e 100644 --- a/target/sparc/int64_helper.c +++ b/target/sparc/int64_helper.c @@ -283,21 +283,21 @@ static bool do_modify_softint(CPUSPARCState *env, uin= t32_t value) return false; } =20 -void helper_set_softint(CPUSPARCState *env, uint64_t value) +void HELPER(set_softint)(CPUSPARCState *env, uint64_t value) { if (do_modify_softint(env, env->softint | (uint32_t)value)) { trace_int_helper_set_softint(env->softint); } } =20 -void helper_clear_softint(CPUSPARCState *env, uint64_t value) +void HELPER(clear_softint)(CPUSPARCState *env, uint64_t value) { if (do_modify_softint(env, env->softint & (uint32_t)~value)) { trace_int_helper_clear_softint(env->softint); } } =20 -void helper_write_softint(CPUSPARCState *env, uint64_t value) +void HELPER(write_softint)(CPUSPARCState *env, uint64_t value) { if (do_modify_softint(env, (uint32_t)value)) { trace_int_helper_write_softint(env->softint); diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 4ec8799d1f7..74d9cc1c966 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -580,7 +580,7 @@ static uint64_t leon3_cache_control_ld(CPUSPARCState *e= nv, target_ulong addr, return ret; } =20 -uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, +uint64_t HELPER(ld_asi)(CPUSPARCState *env, target_ulong addr, int asi, uint32_t memop) { int size =3D 1 << (memop & MO_SIZE); @@ -804,7 +804,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong= addr, return ret; } =20 -void helper_st_asi(CPUSPARCState *env, target_ulong addr, uint64_t val, +void HELPER(st_asi)(CPUSPARCState *env, target_ulong addr, uint64_t val, int asi, uint32_t memop) { int size =3D 1 << (memop & MO_SIZE); @@ -1154,7 +1154,7 @@ void helper_st_asi(CPUSPARCState *env, target_ulong a= ddr, uint64_t val, #endif } =20 -uint64_t helper_ld_code(CPUSPARCState *env, target_ulong addr, uint32_t oi) +uint64_t HELPER(ld_code)(CPUSPARCState *env, target_ulong addr, uint32_t o= i) { MemOp mop =3D get_memop(oi); uintptr_t ra =3D GETPC(); @@ -1192,7 +1192,7 @@ uint64_t helper_ld_code(CPUSPARCState *env, target_ul= ong addr, uint32_t oi) #else /* TARGET_SPARC64 */ =20 #ifdef CONFIG_USER_ONLY -uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, +uint64_t HELPER(ld_asi)(CPUSPARCState *env, target_ulong addr, int asi, uint32_t memop) { int size =3D 1 << (memop & MO_SIZE); @@ -1281,7 +1281,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulo= ng addr, return ret; } =20 -void helper_st_asi(CPUSPARCState *env, target_ulong addr, target_ulong val, +void HELPER(st_asi)(CPUSPARCState *env, target_ulong addr, target_ulong va= l, int asi, uint32_t memop) { int size =3D 1 << (memop & MO_SIZE); @@ -1312,7 +1312,7 @@ void helper_st_asi(CPUSPARCState *env, target_ulong a= ddr, target_ulong val, =20 #else /* CONFIG_USER_ONLY */ =20 -uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, +uint64_t HELPER(ld_asi)(CPUSPARCState *env, target_ulong addr, int asi, uint32_t memop) { int size =3D 1 << (memop & MO_SIZE); @@ -1611,7 +1611,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulo= ng addr, return ret; } =20 -void helper_st_asi(CPUSPARCState *env, target_ulong addr, target_ulong val, +void HELPER(st_asi)(CPUSPARCState *env, target_ulong addr, target_ulong va= l, int asi, uint32_t memop) { int size =3D 1 << (memop & MO_SIZE); diff --git a/target/sparc/vis_helper.c b/target/sparc/vis_helper.c index 371f5445a1f..f79e770124a 100644 --- a/target/sparc/vis_helper.c +++ b/target/sparc/vis_helper.c @@ -22,7 +22,7 @@ #include "exec/helper-proto.h" #include "crypto/clmul.h" =20 -target_ulong helper_array8(target_ulong rs1, target_ulong rs2) +target_ulong HELPER(array8)(target_ulong rs1, target_ulong rs2) { /* * From Oracle SPARC Architecture 2015: @@ -98,7 +98,7 @@ typedef union { float32 f; } VIS32; =20 -uint64_t helper_fpmerge(uint32_t src1, uint32_t src2) +uint64_t HELPER(fpmerge)(uint32_t src1, uint32_t src2) { VIS32 s1, s2; VIS64 d; @@ -124,7 +124,7 @@ static inline int do_ms16b(int x, int y) return ((x * y) + 0x80) >> 8; } =20 -uint64_t helper_fmul8x16(uint32_t src1, uint64_t src2) +uint64_t HELPER(fmul8x16)(uint32_t src1, uint64_t src2) { VIS64 d; VIS32 s; @@ -140,7 +140,7 @@ uint64_t helper_fmul8x16(uint32_t src1, uint64_t src2) return d.ll; } =20 -uint64_t helper_fmul8x16a(uint32_t src1, int32_t src2) +uint64_t HELPER(fmul8x16a)(uint32_t src1, int32_t src2) { VIS32 s; VIS64 d; @@ -156,7 +156,7 @@ uint64_t helper_fmul8x16a(uint32_t src1, int32_t src2) return d.ll; } =20 -uint64_t helper_fmul8sux16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fmul8sux16)(uint64_t src1, uint64_t src2) { VIS64 s, d; =20 @@ -171,7 +171,7 @@ uint64_t helper_fmul8sux16(uint64_t src1, uint64_t src2) return d.ll; } =20 -uint64_t helper_fmul8ulx16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fmul8ulx16)(uint64_t src1, uint64_t src2) { VIS64 s, d; =20 @@ -186,7 +186,7 @@ uint64_t helper_fmul8ulx16(uint64_t src1, uint64_t src2) return d.ll; } =20 -uint64_t helper_fexpand(uint32_t src2) +uint64_t HELPER(fexpand)(uint32_t src2) { VIS32 s; VIS64 d; @@ -201,7 +201,7 @@ uint64_t helper_fexpand(uint32_t src2) return d.ll; } =20 -uint64_t helper_fcmpeq8(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpeq8)(uint64_t src1, uint64_t src2) { uint64_t a =3D src1 ^ src2; uint64_t m =3D 0x7f7f7f7f7f7f7f7fULL; @@ -217,12 +217,12 @@ uint64_t helper_fcmpeq8(uint64_t src1, uint64_t src2) return c >> 56; } =20 -uint64_t helper_fcmpne8(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpne8)(uint64_t src1, uint64_t src2) { - return helper_fcmpeq8(src1, src2) ^ 0xff; + return HELPER(fcmpeq8)(src1, src2) ^ 0xff; } =20 -uint64_t helper_fcmple8(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmple8)(uint64_t src1, uint64_t src2) { VIS64 s1, s2; uint64_t r =3D 0; @@ -236,12 +236,12 @@ uint64_t helper_fcmple8(uint64_t src1, uint64_t src2) return r; } =20 -uint64_t helper_fcmpgt8(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpgt8)(uint64_t src1, uint64_t src2) { - return helper_fcmple8(src1, src2) ^ 0xff; + return HELPER(fcmple8)(src1, src2) ^ 0xff; } =20 -uint64_t helper_fcmpule8(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpule8)(uint64_t src1, uint64_t src2) { VIS64 s1, s2; uint64_t r =3D 0; @@ -255,12 +255,12 @@ uint64_t helper_fcmpule8(uint64_t src1, uint64_t src2) return r; } =20 -uint64_t helper_fcmpugt8(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpugt8)(uint64_t src1, uint64_t src2) { - return helper_fcmpule8(src1, src2) ^ 0xff; + return HELPER(fcmpule8)(src1, src2) ^ 0xff; } =20 -uint64_t helper_fcmpeq16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpeq16)(uint64_t src1, uint64_t src2) { uint64_t a =3D src1 ^ src2; uint64_t m =3D 0x7fff7fff7fff7fffULL; @@ -274,12 +274,12 @@ uint64_t helper_fcmpeq16(uint64_t src1, uint64_t src2) return c >> 60; } =20 -uint64_t helper_fcmpne16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpne16)(uint64_t src1, uint64_t src2) { - return helper_fcmpeq16(src1, src2) ^ 0xf; + return HELPER(fcmpeq16)(src1, src2) ^ 0xf; } =20 -uint64_t helper_fcmple16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmple16)(uint64_t src1, uint64_t src2) { VIS64 s1, s2; uint64_t r =3D 0; @@ -293,12 +293,12 @@ uint64_t helper_fcmple16(uint64_t src1, uint64_t src2) return r; } =20 -uint64_t helper_fcmpgt16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpgt16)(uint64_t src1, uint64_t src2) { - return helper_fcmple16(src1, src2) ^ 0xf; + return HELPER(fcmple16)(src1, src2) ^ 0xf; } =20 -uint64_t helper_fcmpule16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpule16)(uint64_t src1, uint64_t src2) { VIS64 s1, s2; uint64_t r =3D 0; @@ -312,24 +312,24 @@ uint64_t helper_fcmpule16(uint64_t src1, uint64_t src= 2) return r; } =20 -uint64_t helper_fcmpugt16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpugt16)(uint64_t src1, uint64_t src2) { - return helper_fcmpule16(src1, src2) ^ 0xf; + return HELPER(fcmpule16)(src1, src2) ^ 0xf; } =20 -uint64_t helper_fcmpeq32(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpeq32)(uint64_t src1, uint64_t src2) { uint64_t a =3D src1 ^ src2; return ((uint32_t)a =3D=3D 0) | (a >> 32 ? 0 : 2); } =20 -uint64_t helper_fcmpne32(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpne32)(uint64_t src1, uint64_t src2) { uint64_t a =3D src1 ^ src2; return ((uint32_t)a !=3D 0) | (a >> 32 ? 2 : 0); } =20 -uint64_t helper_fcmple32(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmple32)(uint64_t src1, uint64_t src2) { VIS64 s1, s2; uint64_t r =3D 0; @@ -343,12 +343,12 @@ uint64_t helper_fcmple32(uint64_t src1, uint64_t src2) return r; } =20 -uint64_t helper_fcmpgt32(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpgt32)(uint64_t src1, uint64_t src2) { - return helper_fcmple32(src1, src2) ^ 3; + return HELPER(fcmple32)(src1, src2) ^ 3; } =20 -uint64_t helper_fcmpule32(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpule32)(uint64_t src1, uint64_t src2) { VIS64 s1, s2; uint64_t r =3D 0; @@ -362,12 +362,12 @@ uint64_t helper_fcmpule32(uint64_t src1, uint64_t src= 2) return r; } =20 -uint64_t helper_fcmpugt32(uint64_t src1, uint64_t src2) +uint64_t HELPER(fcmpugt32)(uint64_t src1, uint64_t src2) { - return helper_fcmpule32(src1, src2) ^ 3; + return HELPER(fcmpule32)(src1, src2) ^ 3; } =20 -uint64_t helper_pdist(uint64_t sum, uint64_t src1, uint64_t src2) +uint64_t HELPER(pdist)(uint64_t sum, uint64_t src1, uint64_t src2) { int i; for (i =3D 0; i < 8; i++) { @@ -388,7 +388,7 @@ uint64_t helper_pdist(uint64_t sum, uint64_t src1, uint= 64_t src2) return sum; } =20 -uint32_t helper_fpack16(uint64_t gsr, uint64_t rs2) +uint32_t HELPER(fpack16)(uint64_t gsr, uint64_t rs2) { int scale =3D (gsr >> 3) & 0xf; uint32_t ret =3D 0; @@ -409,7 +409,7 @@ uint32_t helper_fpack16(uint64_t gsr, uint64_t rs2) return ret; } =20 -uint64_t helper_fpack32(uint64_t gsr, uint64_t rs1, uint64_t rs2) +uint64_t HELPER(fpack32)(uint64_t gsr, uint64_t rs1, uint64_t rs2) { int scale =3D (gsr >> 3) & 0x1f; uint64_t ret =3D 0; @@ -431,7 +431,7 @@ uint64_t helper_fpack32(uint64_t gsr, uint64_t rs1, uin= t64_t rs2) return ret; } =20 -uint32_t helper_fpackfix(uint64_t gsr, uint64_t rs2) +uint32_t HELPER(fpackfix)(uint64_t gsr, uint64_t rs2) { int scale =3D (gsr >> 3) & 0x1f; uint32_t ret =3D 0; @@ -452,7 +452,7 @@ uint32_t helper_fpackfix(uint64_t gsr, uint64_t rs2) return ret; } =20 -uint64_t helper_bshuffle(uint64_t gsr, uint64_t src1, uint64_t src2) +uint64_t HELPER(bshuffle)(uint64_t gsr, uint64_t src1, uint64_t src2) { union { uint64_t ll[2]; @@ -481,7 +481,7 @@ uint64_t helper_bshuffle(uint64_t gsr, uint64_t src1, u= int64_t src2) return r.ll; } =20 -uint64_t helper_cmask8(uint64_t gsr, uint64_t src) +uint64_t HELPER(cmask8)(uint64_t gsr, uint64_t src) { uint32_t mask =3D 0; =20 @@ -497,7 +497,7 @@ uint64_t helper_cmask8(uint64_t gsr, uint64_t src) return deposit64(gsr, 32, 32, mask); } =20 -uint64_t helper_cmask16(uint64_t gsr, uint64_t src) +uint64_t HELPER(cmask16)(uint64_t gsr, uint64_t src) { uint32_t mask =3D 0; =20 @@ -509,7 +509,7 @@ uint64_t helper_cmask16(uint64_t gsr, uint64_t src) return deposit64(gsr, 32, 32, mask); } =20 -uint64_t helper_cmask32(uint64_t gsr, uint64_t src) +uint64_t HELPER(cmask32)(uint64_t gsr, uint64_t src) { uint32_t mask =3D 0; =20 @@ -526,7 +526,7 @@ static inline uint16_t do_fchksm16(uint16_t src1, uint1= 6_t src2) return a + c; } =20 -uint64_t helper_fchksm16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fchksm16)(uint64_t src1, uint64_t src2) { VIS64 r, s1, s2; =20 @@ -547,7 +547,7 @@ static inline int16_t do_fmean16(int16_t src1, int16_t = src2) return (src1 + src2 + 1) / 2; } =20 -uint64_t helper_fmean16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fmean16)(uint64_t src1, uint64_t src2) { VIS64 r, s1, s2; =20 @@ -563,7 +563,7 @@ uint64_t helper_fmean16(uint64_t src1, uint64_t src2) return r.ll; } =20 -uint64_t helper_fslas16(uint64_t src1, uint64_t src2) +uint64_t HELPER(fslas16)(uint64_t src1, uint64_t src2) { VIS64 r, s1, s2; =20 @@ -581,7 +581,7 @@ uint64_t helper_fslas16(uint64_t src1, uint64_t src2) return r.ll; } =20 -uint64_t helper_fslas32(uint64_t src1, uint64_t src2) +uint64_t HELPER(fslas32)(uint64_t src1, uint64_t src2) { VIS64 r, s1, s2; =20 @@ -599,12 +599,12 @@ uint64_t helper_fslas32(uint64_t src1, uint64_t src2) return r.ll; } =20 -uint64_t helper_xmulx(uint64_t src1, uint64_t src2) +uint64_t HELPER(xmulx)(uint64_t src1, uint64_t src2) { return int128_getlo(clmul_64(src1, src2)); } =20 -uint64_t helper_xmulxhi(uint64_t src1, uint64_t src2) +uint64_t HELPER(xmulxhi)(uint64_t src1, uint64_t src2) { return int128_gethi(clmul_64(src1, src2)); } diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c index 9ad9d01e8b9..872bd35652f 100644 --- a/target/sparc/win_helper.c +++ b/target/sparc/win_helper.c @@ -121,7 +121,7 @@ int cpu_cwp_dec(CPUSPARCState *env, int cwp) } =20 #ifndef TARGET_SPARC64 -void helper_rett(CPUSPARCState *env) +void HELPER(rett)(CPUSPARCState *env) { unsigned int cwp; =20 @@ -140,7 +140,7 @@ void helper_rett(CPUSPARCState *env) =20 /* XXX: use another pointer for %iN registers to avoid slow wrapping handling ? */ -void helper_save(CPUSPARCState *env) +void HELPER(save)(CPUSPARCState *env) { uint32_t cwp; =20 @@ -151,7 +151,7 @@ void helper_save(CPUSPARCState *env) cpu_set_cwp(env, cwp); } =20 -void helper_restore(CPUSPARCState *env) +void HELPER(restore)(CPUSPARCState *env) { uint32_t cwp; =20 @@ -162,7 +162,7 @@ void helper_restore(CPUSPARCState *env) cpu_set_cwp(env, cwp); } =20 -void helper_wrpsr(CPUSPARCState *env, target_ulong new_psr) +void HELPER(wrpsr)(CPUSPARCState *env, target_ulong new_psr) { if ((new_psr & PSR_CWP) >=3D env->nwindows) { cpu_raise_exception_ra(env, TT_ILL_INSN, GETPC()); @@ -174,7 +174,7 @@ void helper_wrpsr(CPUSPARCState *env, target_ulong new_= psr) } } =20 -target_ulong helper_rdpsr(CPUSPARCState *env) +target_ulong HELPER(rdpsr)(CPUSPARCState *env) { return cpu_get_psr(env); } @@ -182,7 +182,7 @@ target_ulong helper_rdpsr(CPUSPARCState *env) #else /* XXX: use another pointer for %iN registers to avoid slow wrapping handling ? */ -void helper_save(CPUSPARCState *env) +void HELPER(save)(CPUSPARCState *env) { uint32_t cwp; =20 @@ -204,7 +204,7 @@ void helper_save(CPUSPARCState *env) } } =20 -void helper_restore(CPUSPARCState *env) +void HELPER(restore)(CPUSPARCState *env) { uint32_t cwp; =20 @@ -221,7 +221,7 @@ void helper_restore(CPUSPARCState *env) } } =20 -void helper_flushw(CPUSPARCState *env) +void HELPER(flushw)(CPUSPARCState *env) { if (env->cansave !=3D env->nwindows - 2) { int tt =3D TT_SPILL | (env->otherwin !=3D 0 @@ -231,7 +231,7 @@ void helper_flushw(CPUSPARCState *env) } } =20 -void helper_saved(CPUSPARCState *env) +void HELPER(saved)(CPUSPARCState *env) { env->cansave++; if (env->otherwin =3D=3D 0) { @@ -241,7 +241,7 @@ void helper_saved(CPUSPARCState *env) } } =20 -void helper_restored(CPUSPARCState *env) +void HELPER(restored)(CPUSPARCState *env) { env->canrestore++; if (env->cleanwin < env->nwindows - 1) { @@ -294,24 +294,24 @@ void cpu_put_cwp64(CPUSPARCState *env, int cwp) cpu_set_cwp(env, env->nwindows - 1 - cwp); } =20 -target_ulong helper_rdccr(CPUSPARCState *env) +target_ulong HELPER(rdccr)(CPUSPARCState *env) { return cpu_get_ccr(env); } =20 -void helper_wrccr(CPUSPARCState *env, target_ulong new_ccr) +void HELPER(wrccr)(CPUSPARCState *env, target_ulong new_ccr) { cpu_put_ccr(env, new_ccr); } =20 /* CWP handling is reversed in V9, but we still use the V8 register order. */ -target_ulong helper_rdcwp(CPUSPARCState *env) +target_ulong HELPER(rdcwp)(CPUSPARCState *env) { return cpu_get_cwp64(env); } =20 -void helper_wrcwp(CPUSPARCState *env, target_ulong new_cwp) +void HELPER(wrcwp)(CPUSPARCState *env, target_ulong new_cwp) { cpu_put_cwp64(env, new_cwp); } @@ -355,7 +355,7 @@ void cpu_gl_switch_gregs(CPUSPARCState *env, uint32_t n= ew_gl) } } =20 -void helper_wrgl(CPUSPARCState *env, target_ulong new_gl) +void HELPER(wrgl)(CPUSPARCState *env, target_ulong new_gl) { cpu_gl_switch_gregs(env, new_gl & 7); env->gl =3D new_gl & 7; @@ -390,7 +390,7 @@ void cpu_change_pstate(CPUSPARCState *env, uint32_t new= _pstate) env->pstate =3D new_pstate; } =20 -void helper_wrpstate(CPUSPARCState *env, target_ulong new_state) +void HELPER(wrpstate)(CPUSPARCState *env, target_ulong new_state) { cpu_change_pstate(env, new_state & 0xf3f); =20 @@ -403,7 +403,7 @@ void helper_wrpstate(CPUSPARCState *env, target_ulong n= ew_state) #endif } =20 -void helper_wrpil(CPUSPARCState *env, target_ulong new_pil) +void HELPER(wrpil)(CPUSPARCState *env, target_ulong new_pil) { #if !defined(CONFIG_USER_ONLY) trace_win_helper_wrpil(env->psrpil, (uint32_t)new_pil); @@ -418,7 +418,7 @@ void helper_wrpil(CPUSPARCState *env, target_ulong new_= pil) #endif } =20 -void helper_done(CPUSPARCState *env) +void HELPER(done)(CPUSPARCState *env) { trap_state *tsptr =3D cpu_tsptr(env); =20 @@ -447,7 +447,7 @@ void helper_done(CPUSPARCState *env) #endif } =20 -void helper_retry(CPUSPARCState *env) +void HELPER(retry)(CPUSPARCState *env) { trap_state *tsptr =3D cpu_tsptr(env); =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772660; cv=none; d=zohomail.com; s=zohoarc; b=ENRbFvo4VaNfwnA1UZU2/N9DS8GjYs9PZwitDY/mbx0yzbG9oKKY9IBMQRMNup6hHbNTSqb1sZW2A8KVwesjZsmm8tanvojw6TkvkYIR07coFyU220wtA4NuvQTv9jbkuLspNX1EfMXv5wno/rcbcdLt62jOYJ8IBHulup25TbE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772660; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=cXxGEShmoR2B48JvpnW4P/rdjicgcv8ibV83usvsnMU=; b=eL8T/KdEOmmFvMP8It/Qqp/tLCifmF3XX7AQkN/Cqe4OFoBM5o1rqN1k8rsrGAgiyk0VeMvDFcJIFHQoxqozHnqSu5mb3RC8C2RNbFg2+OTu8zRfVqSpyzh/zeypkZgLHnWeLuFfoWVFiVwQtSHH48qAF/aAtfnENy/m10Q4Nok= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772660723762.0067895250494; Fri, 23 Oct 2026 09:24:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI2s-0006RQ-St; Fri, 23 Oct 2026 12:23:07 -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 1xKI2Z-0005h6-DW for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:49 -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 1xKI2U-000382-Nu for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:47 -0400 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE5wl32109186 for ; Fri, 23 Oct 2026 16:22:41 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqms4h29-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:22:41 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f559420f3so108309385a.0 for ; Fri, 23 Oct 2026 09:22:41 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3ee6a5sm816897f8f.12.2026.10.23.09.22.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= cXxGEShmoR2B48JvpnW4P/rdjicgcv8ibV83usvsnMU=; b=ndTjtEk8giYQBJEl /VeHXf61c7nm0xOpZhf2XEc7ysjPx/7MuYm2CNaSPw+wkSh6vGWbRyGnU2BHAStG rPeXP+bqAM5W+CfaaElhqkpL3s4xXJlQ7OZzLCz9vhSQycmaSQoSxgmD86VBj1z5 iZkLjadlDQoza9Egs3DpHZciTNBoNkgR6wDUSupiMGpDVhL0FAWT6zXnlacKnnuc rfS/wG+jxa/qe4Ja8shpap1UF/EIAo25Is/5EgJj1H8c2lVfMSNukJOYbiD65oOn Vmfekp1a+SyUyJYmqi9D8ZIPHwngFkO/DcvVn54u43GQrd2ucGk7MroezE6nDZgU W43tcg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772560; x=1793377360; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cXxGEShmoR2B48JvpnW4P/rdjicgcv8ibV83usvsnMU=; b=Gihw5JsDAQ7d5A8Wze/uEmbL4KXLBn8bBCkQ2JvuL5aH80gXu3a3JbqG12vC5Xeyzr AdfXoj1VKnHogWrO2f8/WWI6l1sWm0jtEbqllrnZWZhvF2MnKY6hVTlO/ztpDtucdFiE AtOoa5ashuRpfQWJJ1prGzNMEl+jmkJp21XyTv8YDRxhb1/f2+1ToFfwv3CyTX9wSVAI nsTUxMpahiFr5WdAWgh2QgM9HQ0J3/fQ9BSG0iwhzaZcXQAQUQMtX702bBQqVd369pnO fmxde4dBlPbfFguTh6e9lMDtXOHwZJ/n7SAwLqBknhXeb/TuT1vK4aCh40pB/eyKqinh LvZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772560; x=1793377360; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=cXxGEShmoR2B48JvpnW4P/rdjicgcv8ibV83usvsnMU=; b=Xib3K175U52rWyNUbPgFABJgTd0IHcUBx73F8ADsHtvGTC2TBR54HKbVBYXbqfxxR7 HXIqYYS1WFPDOEMz10Yofc0kldDgRZyhXwPQF4/hvF67fndsuwmilph1lUY+1NWjqu3e cSmAU175xqsY5hrcKxnwB26A0+ncvFK0ngvlBUa1ZpBgHyiPL9weoCw7CWzAiozhdimG Zn4AoMa908UpBgDc/k2iG9RYYr1Ewo9wjkz2tuUbVJnqtRMRn2ZASIaS1XuX0qPCxNzZ 7UKKr+lbjhlQb1YJuVlO2F6NVA0Ye7At83JwYW4/HkroLBACGOg+AY+b81D2O74qh14D K40A== X-Gm-Message-State: AFq9FYKjtcYLIxyWM9A3d27l9e0WXafqoKSZMQI1hgWijaWy88/Lfkjj 0T6UfDcU2rgyueF6sI22g4MKv7K4Qd/aP/JfPSh20qXf1Xi96yvdxBZ9zq0S0vhbHVztbGtlLYt +b21QwuLPJKpknO6gBoftPAL2aZp9qfZk57+6RBJ7h083iFYwEicDHhKQkMlaJbW/xhV9 X-Gm-Gg: AYBFou34a4PNqFlB5IxZdLaa8koBOSbxWoYjoFoBJS6ZqnaSn9QtdjkSZFV3wMUyjgE sIRSSfDncaMBPuILKj0nxom1dFBMnWrLpyxTOayEQu8a+V3uhOrC9hB/qEfZ/SRVGw4rV6czQGf FK+hsxLzQ1RmSc7zAoy1DPfogk61at7UpDPxw+gyRkodB0FJvBLxOvkdKnUpagxnCECG9WQBCcC 53JneWjfX1oCXJLCw/Q+xvZTZKWTgYtyoBBm1hgWNvyR1y5RzaB9iPjGaHISePxFRPyWC60YeZS 760cWF6oKhj9SRBD8CvRZqUhgn8d3m5KfmspwW2TKYEXw4ucEwSfXnfAQqUVd+MeKWDtpw67qF3 0k7kMFzFdwAQGZ98XyFXDu4aHxCQRRu3jjTujmWFn X-Received: by 2002:a05:620a:6403:b0:93e:b729:879e with SMTP id af79cd13be357-93f6f908ed3mr486330285a.23.1792772559405; Fri, 23 Oct 2026 09:22:39 -0700 (PDT) X-Received: by 2002:a05:620a:6403:b0:93e:b729:879e with SMTP id af79cd13be357-93f6f908ed3mr486323285a.23.1792772558349; Fri, 23 Oct 2026 09:22:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 75/83] target/tricore: define and call helpers using HELPER macro Date: Fri, 23 Oct 2026 18:13:23 +0200 Message-ID: <20261023161332.60153-76-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX3iEm1JcJIOht D8817mPp5xnis0nhH1dCCRDHOEkZe5NIQ4xInQo7Htp+Ys2bN3TC11AQ5hhG4wdrSsMBE4RHDd/ afE8bfv388lhhVvXDdrm24ALbJx8ZUvwpKYgTT3oq8DTprLHcKqkU20biqx1CCOPnkChA6WD+f8 tvSmsgs7KCHF4/BS0HjZfQRcf73hvewybRUIiniwFlcr3+SqhfPC4mJF3pUJASNoz+5a4zd/xPY jG4BJmviygPlfibKnLtst3T9WriF8ZBKkWksQlpuDNVeJyiNC5cEJFun/bqEPLWAn18s4RX3A4t RsxCSS3Pd75/N/ezuwowuKPQVHhILxqqlpNX3h7E1anzgvtNYUEFS7STOUO+T5VzmX4YphMmWAu SsBnMetrvN2HzOyJ9UAlAH8bX3zsWs9A9mtq7krXaeTwmcKUSVbvqcplbdRoAhuTDa9w5FErjR3 8SIHTpJ0X2sM/ODDeXg== X-Proofpoint-GUID: Bf-pEvhwPg9MWftlCRlEI_4Yq_yonbui X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX4Ey5eGQ4ua7g nF5SuJ9cvKDyBWy/6ZjvktMzGZUUjDHZH2MneX3yWnODXHaMxDK1DDuksrsDYf0WLfSWW2lG0cc eady/aAoMaLne9egylbn3pa0IdMfKak= X-Authority-Analysis: v=2.4 cv=UdbE26SN c=1 sm=1 tr=0 ts=6adb89d1 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=eO6AAlOi-fcJYYpl75MA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: Bf-pEvhwPg9MWftlCRlEI_4Yq_yonbui X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772661119158500 From: Pierrick Bouvier In a upcoming commit, we'll prefix all helpers and helper_info with target prefix, to disambiguate symbols between targets. As a first step, we need to make sure all usages are using the existing HELPER macro. Signed-off-by: Pierrick Bouvier Acked-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20261019212046.149572-18-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/tricore/fpu_helper.c | 32 +++--- target/tricore/op_helper.c | 220 ++++++++++++++++++------------------ 2 files changed, 126 insertions(+), 126 deletions(-) diff --git a/target/tricore/fpu_helper.c b/target/tricore/fpu_helper.c index fa268a8a6bc..9d323a9b664 100644 --- a/target/tricore/fpu_helper.c +++ b/target/tricore/fpu_helper.c @@ -118,7 +118,7 @@ static void f_update_psw_flags(CPUTriCoreState *env, ui= nt8_t flags) } =20 #define FADD_SUB(op) = \ -uint32_t helper_tricore_f##op(CPUTriCoreState *env, uint32_t r1, uint32_t = r2) \ +uint32_t HELPER(tricore_f##op)(CPUTriCoreState *env, uint32_t r1, uint32_t= r2) \ { = \ float32 arg1 =3D make_float32(r1); = \ float32 arg2 =3D make_float32(r2); = \ @@ -144,7 +144,7 @@ uint32_t helper_tricore_f##op(CPUTriCoreState *env, uin= t32_t r1, uint32_t r2) \ FADD_SUB(add) FADD_SUB(sub) =20 -uint32_t helper_tricore_fmul(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2) +uint32_t HELPER(tricore_fmul)(CPUTriCoreState *env, uint32_t r1, uint32_t = r2) { uint32_t flags; float32 arg1 =3D make_float32(r1); @@ -203,7 +203,7 @@ static const uint8_t target_qseed_significand_table[128= ] =3D { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2 }; =20 -uint32_t helper_qseed(CPUTriCoreState *env, uint32_t r1) +uint32_t HELPER(qseed)(CPUTriCoreState *env, uint32_t r1) { uint32_t arg1, S, E, M, E_minus_one, m_idx; uint32_t new_E, new_M, new_S, result; @@ -251,7 +251,7 @@ uint32_t helper_qseed(CPUTriCoreState *env, uint32_t r1) return (uint32_t) result; } =20 -uint32_t helper_tricore_fdiv(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2) +uint32_t HELPER(tricore_fdiv)(CPUTriCoreState *env, uint32_t r1, uint32_t = r2) { uint32_t flags; float32 arg1 =3D make_float32(r1); @@ -277,7 +277,7 @@ uint32_t helper_tricore_fdiv(CPUTriCoreState *env, uint= 32_t r1, uint32_t r2) return (uint32_t)f_result; } =20 -uint32_t helper_fmadd(CPUTriCoreState *env, uint32_t r1, +uint32_t HELPER(fmadd)(CPUTriCoreState *env, uint32_t r1, uint32_t r2, uint32_t r3) { uint32_t flags; @@ -303,7 +303,7 @@ uint32_t helper_fmadd(CPUTriCoreState *env, uint32_t r1, return (uint32_t)f_result; } =20 -uint32_t helper_fmsub(CPUTriCoreState *env, uint32_t r1, +uint32_t HELPER(fmsub)(CPUTriCoreState *env, uint32_t r1, uint32_t r2, uint32_t r3) { uint32_t flags; @@ -331,7 +331,7 @@ uint32_t helper_fmsub(CPUTriCoreState *env, uint32_t r1, return (uint32_t)f_result; } =20 -uint32_t helper_tricore_fcmp(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2) +uint32_t HELPER(tricore_fcmp)(CPUTriCoreState *env, uint32_t r1, uint32_t = r2) { uint32_t result, flags; float32 arg1 =3D make_float32(r1); @@ -354,7 +354,7 @@ uint32_t helper_tricore_fcmp(CPUTriCoreState *env, uint= 32_t r1, uint32_t r2) return result; } =20 -uint32_t helper_tricore_ftoi(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(tricore_ftoi)(CPUTriCoreState *env, uint32_t arg) { float32 f_arg =3D make_float32(arg); int32_t result, flags; @@ -373,7 +373,7 @@ uint32_t helper_tricore_ftoi(CPUTriCoreState *env, uint= 32_t arg) return (uint32_t)result; } =20 -uint32_t helper_hptof(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(hptof)(CPUTriCoreState *env, uint32_t arg) { float16 f_arg =3D make_float16(arg); uint32_t result =3D 0; @@ -409,7 +409,7 @@ uint32_t helper_hptof(CPUTriCoreState *env, uint32_t ar= g) return result; } =20 -uint32_t helper_ftohp(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(ftohp)(CPUTriCoreState *env, uint32_t arg) { float32 f_arg =3D make_float32(arg); uint32_t result =3D 0; @@ -447,7 +447,7 @@ uint32_t helper_ftohp(CPUTriCoreState *env, uint32_t ar= g) return result; } =20 -uint32_t helper_tricore_itof(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(tricore_itof)(CPUTriCoreState *env, uint32_t arg) { float32 f_result; uint32_t flags; @@ -462,7 +462,7 @@ uint32_t helper_tricore_itof(CPUTriCoreState *env, uint= 32_t arg) return (uint32_t)f_result; } =20 -uint32_t helper_utof(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(utof)(CPUTriCoreState *env, uint32_t arg) { float32 f_result; uint32_t flags; @@ -478,7 +478,7 @@ uint32_t helper_utof(CPUTriCoreState *env, uint32_t arg) return (uint32_t)f_result; } =20 -uint32_t helper_ftoiz(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(ftoiz)(CPUTriCoreState *env, uint32_t arg) { float32 f_arg =3D make_float32(arg); uint32_t result; @@ -503,7 +503,7 @@ uint32_t helper_ftoiz(CPUTriCoreState *env, uint32_t ar= g) return result; } =20 -uint32_t helper_ftou(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(ftou)(CPUTriCoreState *env, uint32_t arg) { float32 f_arg =3D make_float32(arg); uint32_t result; @@ -535,7 +535,7 @@ uint32_t helper_ftou(CPUTriCoreState *env, uint32_t arg) return result; } =20 -uint32_t helper_ftouz(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(ftouz)(CPUTriCoreState *env, uint32_t arg) { float32 f_arg =3D make_float32(arg); uint32_t result; @@ -567,7 +567,7 @@ uint32_t helper_ftouz(CPUTriCoreState *env, uint32_t ar= g) return result; } =20 -void helper_updfl(CPUTriCoreState *env, uint32_t arg) +void HELPER(updfl)(CPUTriCoreState *env, uint32_t arg) { env->FPU_FS =3D extract32(arg, 7, 1) & extract32(arg, 15, 1); env->FPU_FI =3D (extract32(arg, 6, 1) & extract32(arg, 14, 1)) << 31; diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index 46b17da2bc6..53837ed351f 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -43,7 +43,7 @@ void raise_exception_sync_internal(CPUTriCoreState *env, = uint32_t class, int tin if (class =3D=3D TRAPC_CTX_MNG && tin =3D=3D TIN3_FCU) { /* upper context cannot be saved, if the context list is empty */ } else { - helper_svucx(env); + HELPER(svucx)(env); } =20 /* The return address in a[11] is updated */ @@ -99,7 +99,7 @@ void raise_exception_sync_internal(CPUTriCoreState *env, = uint32_t class, int tin cpu_loop_exit(cs); } =20 -void helper_raise_exception_sync(CPUTriCoreState *env, uint32_t class, +void HELPER(raise_exception_sync)(CPUTriCoreState *env, uint32_t class, uint32_t tin) { raise_exception_sync_internal(env, class, tin, 0, 0); @@ -126,7 +126,7 @@ static uint16_t reverse16(uint16_t val) return (rh << 8) | rl; } =20 -uint32_t helper_br_update(uint32_t reg) +uint32_t HELPER(br_update)(uint32_t reg) { uint32_t index =3D reg & 0xffff; uint32_t incr =3D reg >> 16; @@ -134,7 +134,7 @@ uint32_t helper_br_update(uint32_t reg) return reg - index + new_index; } =20 -uint32_t helper_circ_update(uint32_t reg, uint32_t off) +uint32_t HELPER(circ_update)(uint32_t reg, uint32_t off) { uint32_t index =3D reg & 0xffff; uint32_t length =3D reg >> 16; @@ -266,7 +266,7 @@ static uint32_t suov16(CPUTriCoreState *env, int32_t hw= 0, int32_t hw1) return (hw0 & 0xffff) | (hw1 << 16); } =20 -uint32_t helper_add_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(add_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int64_t t1 =3D sextract64(r1, 0, 32); int64_t t2 =3D sextract64(r2, 0, 32); @@ -274,7 +274,7 @@ uint32_t helper_add_ssov(CPUTriCoreState *env, uint32_t= r1, uint32_t r2) return ssov32(env, result); } =20 -uint64_t helper_add64_ssov(CPUTriCoreState *env, uint64_t r1, uint64_t r2) +uint64_t HELPER(add64_ssov)(CPUTriCoreState *env, uint64_t r1, uint64_t r2) { uint64_t result; int64_t ovf; @@ -299,7 +299,7 @@ uint64_t helper_add64_ssov(CPUTriCoreState *env, uint64= _t r1, uint64_t r2) return result; } =20 -uint32_t helper_add_h_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(add_h_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t ret_hw0, ret_hw1; =20 @@ -308,7 +308,7 @@ uint32_t helper_add_h_ssov(CPUTriCoreState *env, uint32= _t r1, uint32_t r2) return ssov16(env, ret_hw0, ret_hw1); } =20 -uint32_t helper_addr_h_ssov(CPUTriCoreState *env, uint64_t r1, uint32_t r2= _l, +uint32_t HELPER(addr_h_ssov)(CPUTriCoreState *env, uint64_t r1, uint32_t r= 2_l, uint32_t r2_h) { int64_t mul_res0 =3D sextract64(r1, 0, 32); @@ -354,7 +354,7 @@ uint32_t helper_addr_h_ssov(CPUTriCoreState *env, uint6= 4_t r1, uint32_t r2_l, return (result1 & 0xffff0000ULL) | ((result0 >> 16) & 0xffffULL); } =20 -uint32_t helper_addsur_h_ssov(CPUTriCoreState *env, uint64_t r1, uint32_t = r2_l, +uint32_t HELPER(addsur_h_ssov)(CPUTriCoreState *env, uint64_t r1, uint32_t= r2_l, uint32_t r2_h) { int64_t mul_res0 =3D sextract64(r1, 0, 32); @@ -401,7 +401,7 @@ uint32_t helper_addsur_h_ssov(CPUTriCoreState *env, uin= t64_t r1, uint32_t r2_l, } =20 =20 -uint32_t helper_add_suov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(add_suov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int64_t t1 =3D extract64(r1, 0, 32); int64_t t2 =3D extract64(r2, 0, 32); @@ -409,7 +409,7 @@ uint32_t helper_add_suov(CPUTriCoreState *env, uint32_t= r1, uint32_t r2) return suov32_pos(env, result); } =20 -uint32_t helper_add_h_suov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(add_h_suov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t ret_hw0, ret_hw1; =20 @@ -418,7 +418,7 @@ uint32_t helper_add_h_suov(CPUTriCoreState *env, uint32= _t r1, uint32_t r2) return suov16(env, ret_hw0, ret_hw1); } =20 -uint32_t helper_sub_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(sub_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int64_t t1 =3D sextract64(r1, 0, 32); int64_t t2 =3D sextract64(r2, 0, 32); @@ -426,7 +426,7 @@ uint32_t helper_sub_ssov(CPUTriCoreState *env, uint32_t= r1, uint32_t r2) return ssov32(env, result); } =20 -uint64_t helper_sub64_ssov(CPUTriCoreState *env, uint64_t r1, uint64_t r2) +uint64_t HELPER(sub64_ssov)(CPUTriCoreState *env, uint64_t r1, uint64_t r2) { uint64_t result; int64_t ovf; @@ -451,7 +451,7 @@ uint64_t helper_sub64_ssov(CPUTriCoreState *env, uint64= _t r1, uint64_t r2) return result; } =20 -uint32_t helper_sub_h_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(sub_h_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t ret_hw0, ret_hw1; =20 @@ -460,7 +460,7 @@ uint32_t helper_sub_h_ssov(CPUTriCoreState *env, uint32= _t r1, uint32_t r2) return ssov16(env, ret_hw0, ret_hw1); } =20 -uint32_t helper_subr_h_ssov(CPUTriCoreState *env, uint64_t r1, uint32_t r2= _l, +uint32_t HELPER(subr_h_ssov)(CPUTriCoreState *env, uint64_t r1, uint32_t r= 2_l, uint32_t r2_h) { int64_t mul_res0 =3D sextract64(r1, 0, 32); @@ -506,7 +506,7 @@ uint32_t helper_subr_h_ssov(CPUTriCoreState *env, uint6= 4_t r1, uint32_t r2_l, return (result1 & 0xffff0000ULL) | ((result0 >> 16) & 0xffffULL); } =20 -uint32_t helper_subadr_h_ssov(CPUTriCoreState *env, uint64_t r1, uint32_t = r2_l, +uint32_t HELPER(subadr_h_ssov)(CPUTriCoreState *env, uint64_t r1, uint32_t= r2_l, uint32_t r2_h) { int64_t mul_res0 =3D sextract64(r1, 0, 32); @@ -552,7 +552,7 @@ uint32_t helper_subadr_h_ssov(CPUTriCoreState *env, uin= t64_t r1, uint32_t r2_l, return (result1 & 0xffff0000ULL) | ((result0 >> 16) & 0xffffULL); } =20 -uint32_t helper_sub_suov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(sub_suov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int64_t t1 =3D extract64(r1, 0, 32); int64_t t2 =3D extract64(r2, 0, 32); @@ -560,7 +560,7 @@ uint32_t helper_sub_suov(CPUTriCoreState *env, uint32_t= r1, uint32_t r2) return suov32_neg(env, result); } =20 -uint32_t helper_sub_h_suov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(sub_h_suov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t ret_hw0, ret_hw1; =20 @@ -569,7 +569,7 @@ uint32_t helper_sub_h_suov(CPUTriCoreState *env, uint32= _t r1, uint32_t r2) return suov16(env, ret_hw0, ret_hw1); } =20 -uint32_t helper_mul_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(mul_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int64_t t1 =3D sextract64(r1, 0, 32); int64_t t2 =3D sextract64(r2, 0, 32); @@ -577,7 +577,7 @@ uint32_t helper_mul_ssov(CPUTriCoreState *env, uint32_t= r1, uint32_t r2) return ssov32(env, result); } =20 -uint32_t helper_mul_suov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(mul_suov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int64_t t1 =3D extract64(r1, 0, 32); int64_t t2 =3D extract64(r2, 0, 32); @@ -586,7 +586,7 @@ uint32_t helper_mul_suov(CPUTriCoreState *env, uint32_t= r1, uint32_t r2) return suov32_pos(env, result); } =20 -uint32_t helper_sha_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(sha_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int64_t t1 =3D sextract64(r1, 0, 32); int32_t t2 =3D sextract64(r2, 0, 6); @@ -601,14 +601,14 @@ uint32_t helper_sha_ssov(CPUTriCoreState *env, uint32= _t r1, uint32_t r2) return ssov32(env, result); } =20 -uint32_t helper_abs_ssov(CPUTriCoreState *env, uint32_t r1) +uint32_t HELPER(abs_ssov)(CPUTriCoreState *env, uint32_t r1) { uint32_t result; result =3D ((int32_t)r1 >=3D 0) ? r1 : (0 - r1); return ssov32(env, result); } =20 -uint32_t helper_abs_h_ssov(CPUTriCoreState *env, uint32_t r1) +uint32_t HELPER(abs_h_ssov)(CPUTriCoreState *env, uint32_t r1) { int32_t ret_h0, ret_h1; =20 @@ -621,7 +621,7 @@ uint32_t helper_abs_h_ssov(CPUTriCoreState *env, uint32= _t r1) return ssov16(env, ret_h0, ret_h1); } =20 -uint32_t helper_absdif_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(absdif_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2) { int64_t t1 =3D sextract64(r1, 0, 32); int64_t t2 =3D sextract64(r2, 0, 32); @@ -635,7 +635,7 @@ uint32_t helper_absdif_ssov(CPUTriCoreState *env, uint3= 2_t r1, uint32_t r2) return ssov32(env, result); } =20 -uint32_t helper_absdif_h_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t = r2) +uint32_t HELPER(absdif_h_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t= r2) { int32_t t1, t2; int32_t ret_h0, ret_h1; @@ -659,7 +659,7 @@ uint32_t helper_absdif_h_ssov(CPUTriCoreState *env, uin= t32_t r1, uint32_t r2) return ssov16(env, ret_h0, ret_h1); } =20 -uint32_t helper_madd32_ssov(CPUTriCoreState *env, uint32_t r1, +uint32_t HELPER(madd32_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2, uint32_t r3) { int64_t t1 =3D sextract64(r1, 0, 32); @@ -671,7 +671,7 @@ uint32_t helper_madd32_ssov(CPUTriCoreState *env, uint3= 2_t r1, return ssov32(env, result); } =20 -uint32_t helper_madd32_suov(CPUTriCoreState *env, uint32_t r1, +uint32_t HELPER(madd32_suov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2, uint32_t r3) { uint64_t t1 =3D extract64(r1, 0, 32); @@ -683,7 +683,7 @@ uint32_t helper_madd32_suov(CPUTriCoreState *env, uint3= 2_t r1, return suov32_pos(env, result); } =20 -uint64_t helper_madd64_ssov(CPUTriCoreState *env, uint32_t r1, +uint64_t HELPER(madd64_ssov)(CPUTriCoreState *env, uint32_t r1, uint64_t r2, uint32_t r3) { uint64_t ret, ovf; @@ -717,7 +717,7 @@ uint64_t helper_madd64_ssov(CPUTriCoreState *env, uint3= 2_t r1, } =20 uint32_t -helper_madd32_q_add_ssov(CPUTriCoreState *env, uint64_t r1, uint64_t r2) +HELPER(madd32_q_add_ssov)(CPUTriCoreState *env, uint64_t r1, uint64_t r2) { int64_t result; =20 @@ -757,7 +757,7 @@ helper_madd32_q_add_ssov(CPUTriCoreState *env, uint64_t= r1, uint64_t r2) return (uint32_t)result; } =20 -uint64_t helper_madd64_q_ssov(CPUTriCoreState *env, uint64_t r1, uint32_t = r2, +uint64_t HELPER(madd64_q_ssov)(CPUTriCoreState *env, uint64_t r1, uint32_t= r2, uint32_t r3, uint32_t n) { int64_t t1 =3D (int64_t)r1; @@ -808,7 +808,7 @@ uint64_t helper_madd64_q_ssov(CPUTriCoreState *env, uin= t64_t r1, uint32_t r2, return (uint64_t)result; } =20 -uint32_t helper_maddr_q_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2, +uint32_t HELPER(maddr_q_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t = r2, uint32_t r3, uint32_t n) { int64_t t1 =3D sextract64(r1, 0, 32); @@ -841,7 +841,7 @@ uint32_t helper_maddr_q_ssov(CPUTriCoreState *env, uint= 32_t r1, uint32_t r2, return ret & 0xffff0000ll; } =20 -uint64_t helper_madd64_suov(CPUTriCoreState *env, uint32_t r1, +uint64_t HELPER(madd64_suov)(CPUTriCoreState *env, uint32_t r1, uint64_t r2, uint32_t r3) { uint64_t ret, mul; @@ -866,7 +866,7 @@ uint64_t helper_madd64_suov(CPUTriCoreState *env, uint3= 2_t r1, return ret; } =20 -uint32_t helper_msub32_ssov(CPUTriCoreState *env, uint32_t r1, +uint32_t HELPER(msub32_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2, uint32_t r3) { int64_t t1 =3D sextract64(r1, 0, 32); @@ -878,7 +878,7 @@ uint32_t helper_msub32_ssov(CPUTriCoreState *env, uint3= 2_t r1, return ssov32(env, result); } =20 -uint32_t helper_msub32_suov(CPUTriCoreState *env, uint32_t r1, +uint32_t HELPER(msub32_suov)(CPUTriCoreState *env, uint32_t r1, uint32_t r2, uint32_t r3) { uint64_t t1 =3D extract64(r1, 0, 32); @@ -905,7 +905,7 @@ uint32_t helper_msub32_suov(CPUTriCoreState *env, uint3= 2_t r1, return result; } =20 -uint64_t helper_msub64_ssov(CPUTriCoreState *env, uint32_t r1, +uint64_t HELPER(msub64_ssov)(CPUTriCoreState *env, uint32_t r1, uint64_t r2, uint32_t r3) { uint64_t ret, ovf; @@ -937,7 +937,7 @@ uint64_t helper_msub64_ssov(CPUTriCoreState *env, uint3= 2_t r1, return ret; } =20 -uint64_t helper_msub64_suov(CPUTriCoreState *env, uint32_t r1, +uint64_t HELPER(msub64_suov)(CPUTriCoreState *env, uint32_t r1, uint64_t r2, uint32_t r3) { uint64_t ret, mul; @@ -963,7 +963,7 @@ uint64_t helper_msub64_suov(CPUTriCoreState *env, uint3= 2_t r1, } =20 uint32_t -helper_msub32_q_sub_ssov(CPUTriCoreState *env, uint64_t r1, uint64_t r2) +HELPER(msub32_q_sub_ssov)(CPUTriCoreState *env, uint64_t r1, uint64_t r2) { int64_t result; int64_t t1 =3D (int64_t)r1; @@ -1005,7 +1005,7 @@ helper_msub32_q_sub_ssov(CPUTriCoreState *env, uint64= _t r1, uint64_t r2) return (uint32_t)result; } =20 -uint64_t helper_msub64_q_ssov(CPUTriCoreState *env, uint64_t r1, uint32_t = r2, +uint64_t HELPER(msub64_q_ssov)(CPUTriCoreState *env, uint64_t r1, uint32_t= r2, uint32_t r3, uint32_t n) { int64_t t1 =3D (int64_t)r1; @@ -1057,7 +1057,7 @@ uint64_t helper_msub64_q_ssov(CPUTriCoreState *env, u= int64_t r1, uint32_t r2, return (uint64_t)result; } =20 -uint32_t helper_msubr_q_ssov(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2, +uint32_t HELPER(msubr_q_ssov)(CPUTriCoreState *env, uint32_t r1, uint32_t = r2, uint32_t r3, uint32_t n) { int64_t t1 =3D sextract64(r1, 0, 32); @@ -1090,7 +1090,7 @@ uint32_t helper_msubr_q_ssov(CPUTriCoreState *env, ui= nt32_t r1, uint32_t r2, return ret & 0xffff0000ll; } =20 -uint32_t helper_abs_b(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(abs_b)(CPUTriCoreState *env, uint32_t arg) { int32_t b, i; int32_t ovf =3D 0; @@ -1113,7 +1113,7 @@ uint32_t helper_abs_b(CPUTriCoreState *env, uint32_t = arg) return ret; } =20 -uint32_t helper_abs_h(CPUTriCoreState *env, uint32_t arg) +uint32_t HELPER(abs_h)(CPUTriCoreState *env, uint32_t arg) { int32_t h, i; int32_t ovf =3D 0; @@ -1136,7 +1136,7 @@ uint32_t helper_abs_h(CPUTriCoreState *env, uint32_t = arg) return ret; } =20 -uint32_t helper_absdif_b(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(absdif_b)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t b, i; int32_t extr_r2; @@ -1160,7 +1160,7 @@ uint32_t helper_absdif_b(CPUTriCoreState *env, uint32= _t r1, uint32_t r2) return ret; } =20 -uint32_t helper_absdif_h(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(absdif_h)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t h, i; int32_t extr_r2; @@ -1185,7 +1185,7 @@ uint32_t helper_absdif_h(CPUTriCoreState *env, uint32= _t r1, uint32_t r2) return ret; } =20 -uint32_t helper_addr_h(CPUTriCoreState *env, uint64_t r1, uint32_t r2_l, +uint32_t HELPER(addr_h)(CPUTriCoreState *env, uint64_t r1, uint32_t r2_l, uint32_t r2_h) { int64_t mul_res0 =3D sextract64(r1, 0, 32); @@ -1223,7 +1223,7 @@ uint32_t helper_addr_h(CPUTriCoreState *env, uint64_t= r1, uint32_t r2_l, return (result1 & 0xffff0000ULL) | ((result0 >> 16) & 0xffffULL); } =20 -uint32_t helper_addsur_h(CPUTriCoreState *env, uint64_t r1, uint32_t r2_l, +uint32_t HELPER(addsur_h)(CPUTriCoreState *env, uint64_t r1, uint32_t r2_l, uint32_t r2_h) { int64_t mul_res0 =3D sextract64(r1, 0, 32); @@ -1261,7 +1261,7 @@ uint32_t helper_addsur_h(CPUTriCoreState *env, uint64= _t r1, uint32_t r2_l, return (result1 & 0xffff0000ULL) | ((result0 >> 16) & 0xffffULL); } =20 -uint32_t helper_maddr_q(CPUTriCoreState *env, uint32_t r1, uint32_t r2, +uint32_t HELPER(maddr_q)(CPUTriCoreState *env, uint32_t r1, uint32_t r2, uint32_t r3, uint32_t n) { int64_t t1 =3D sextract64(r1, 0, 32); @@ -1289,7 +1289,7 @@ uint32_t helper_maddr_q(CPUTriCoreState *env, uint32_= t r1, uint32_t r2, return ret & 0xffff0000ll; } =20 -uint32_t helper_add_b(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(add_b)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t b, i; int32_t extr_r1, extr_r2; @@ -1315,7 +1315,7 @@ uint32_t helper_add_b(CPUTriCoreState *env, uint32_t = r1, uint32_t r2) return ret; } =20 -uint32_t helper_add_h(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(add_h)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t h, i; int32_t extr_r1, extr_r2; @@ -1340,7 +1340,7 @@ uint32_t helper_add_h(CPUTriCoreState *env, uint32_t = r1, uint32_t r2) return ret; } =20 -uint32_t helper_subr_h(CPUTriCoreState *env, uint64_t r1, uint32_t r2_l, +uint32_t HELPER(subr_h)(CPUTriCoreState *env, uint64_t r1, uint32_t r2_l, uint32_t r2_h) { int64_t mul_res0 =3D sextract64(r1, 0, 32); @@ -1378,7 +1378,7 @@ uint32_t helper_subr_h(CPUTriCoreState *env, uint64_t= r1, uint32_t r2_l, return (result1 & 0xffff0000ULL) | ((result0 >> 16) & 0xffffULL); } =20 -uint32_t helper_subadr_h(CPUTriCoreState *env, uint64_t r1, uint32_t r2_l, +uint32_t HELPER(subadr_h)(CPUTriCoreState *env, uint64_t r1, uint32_t r2_l, uint32_t r2_h) { int64_t mul_res0 =3D sextract64(r1, 0, 32); @@ -1416,7 +1416,7 @@ uint32_t helper_subadr_h(CPUTriCoreState *env, uint64= _t r1, uint32_t r2_l, return (result1 & 0xffff0000ULL) | ((result0 >> 16) & 0xffffULL); } =20 -uint32_t helper_msubr_q(CPUTriCoreState *env, uint32_t r1, uint32_t r2, +uint32_t HELPER(msubr_q)(CPUTriCoreState *env, uint32_t r1, uint32_t r2, uint32_t r3, uint32_t n) { int64_t t1 =3D sextract64(r1, 0, 32); @@ -1444,7 +1444,7 @@ uint32_t helper_msubr_q(CPUTriCoreState *env, uint32_= t r1, uint32_t r2, return ret & 0xffff0000ll; } =20 -uint32_t helper_sub_b(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(sub_b)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t b, i; int32_t extr_r1, extr_r2; @@ -1470,7 +1470,7 @@ uint32_t helper_sub_b(CPUTriCoreState *env, uint32_t = r1, uint32_t r2) return ret; } =20 -uint32_t helper_sub_h(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(sub_h)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t h, i; int32_t extr_r1, extr_r2; @@ -1495,7 +1495,7 @@ uint32_t helper_sub_h(CPUTriCoreState *env, uint32_t = r1, uint32_t r2) return ret; } =20 -uint32_t helper_eq_b(uint32_t r1, uint32_t r2) +uint32_t HELPER(eq_b)(uint32_t r1, uint32_t r2) { uint32_t ret, msk; int32_t i; @@ -1512,7 +1512,7 @@ uint32_t helper_eq_b(uint32_t r1, uint32_t r2) return ret; } =20 -uint32_t helper_eq_h(uint32_t r1, uint32_t r2) +uint32_t HELPER(eq_h)(uint32_t r1, uint32_t r2) { int32_t ret =3D 0; =20 @@ -1527,7 +1527,7 @@ uint32_t helper_eq_h(uint32_t r1, uint32_t r2) return ret; } =20 -uint32_t helper_eqany_b(uint32_t r1, uint32_t r2) +uint32_t HELPER(eqany_b)(uint32_t r1, uint32_t r2) { int32_t i; uint32_t ret =3D 0; @@ -1539,7 +1539,7 @@ uint32_t helper_eqany_b(uint32_t r1, uint32_t r2) return ret; } =20 -uint32_t helper_eqany_h(uint32_t r1, uint32_t r2) +uint32_t HELPER(eqany_h)(uint32_t r1, uint32_t r2) { uint32_t ret; =20 @@ -1549,7 +1549,7 @@ uint32_t helper_eqany_h(uint32_t r1, uint32_t r2) return ret; } =20 -uint32_t helper_lt_b(uint32_t r1, uint32_t r2) +uint32_t HELPER(lt_b)(uint32_t r1, uint32_t r2) { int32_t i; uint32_t ret =3D 0; @@ -1563,7 +1563,7 @@ uint32_t helper_lt_b(uint32_t r1, uint32_t r2) return ret; } =20 -uint32_t helper_lt_bu(uint32_t r1, uint32_t r2) +uint32_t HELPER(lt_bu)(uint32_t r1, uint32_t r2) { int32_t i; uint32_t ret =3D 0; @@ -1577,7 +1577,7 @@ uint32_t helper_lt_bu(uint32_t r1, uint32_t r2) return ret; } =20 -uint32_t helper_lt_h(uint32_t r1, uint32_t r2) +uint32_t HELPER(lt_h)(uint32_t r1, uint32_t r2) { uint32_t ret =3D 0; =20 @@ -1592,7 +1592,7 @@ uint32_t helper_lt_h(uint32_t r1, uint32_t r2) return ret; } =20 -uint32_t helper_lt_hu(uint32_t r1, uint32_t r2) +uint32_t HELPER(lt_hu)(uint32_t r1, uint32_t r2) { uint32_t ret =3D 0; =20 @@ -1608,7 +1608,7 @@ uint32_t helper_lt_hu(uint32_t r1, uint32_t r2) } =20 #define EXTREMA_H_B(name, op) \ -uint32_t helper_##name ##_b(uint32_t r1, uint32_t r2) \ +uint32_t HELPER(name ##_b)(uint32_t r1, uint32_t r2) \ { \ int32_t i, extr_r1, extr_r2; \ uint32_t ret =3D 0; \ @@ -1622,7 +1622,7 @@ uint32_t helper_##name ##_b(uint32_t r1, uint32_t r2)= \ return ret; \ } \ \ -uint32_t helper_##name ##_bu(uint32_t r1, uint32_t r2) \ +uint32_t HELPER(name ##_bu)(uint32_t r1, uint32_t r2) \ { \ int32_t i; \ uint32_t extr_r1, extr_r2; \ @@ -1637,7 +1637,7 @@ uint32_t helper_##name ##_bu(uint32_t r1, uint32_t r2= ) \ return ret; \ } \ \ -uint32_t helper_##name ##_h(uint32_t r1, uint32_t r2) \ +uint32_t HELPER(name ##_h)(uint32_t r1, uint32_t r2) \ { \ int32_t extr_r1, extr_r2; \ uint32_t ret =3D 0; \ @@ -1655,7 +1655,7 @@ uint32_t helper_##name ##_h(uint32_t r1, uint32_t r2)= \ return ret; \ } \ \ -uint32_t helper_##name ##_hu(uint32_t r1, uint32_t r2) \ +uint32_t HELPER(name ##_hu)(uint32_t r1, uint32_t r2) \ { \ uint32_t extr_r1, extr_r2; \ uint32_t ret =3D 0; \ @@ -1673,7 +1673,7 @@ uint32_t helper_##name ##_hu(uint32_t r1, uint32_t r2= ) \ return ret; \ } \ \ -uint64_t helper_ix##name(uint64_t r1, uint32_t r2) \ +uint64_t HELPER(ix##name)(uint64_t r1, uint32_t r2) \ { \ int64_t r2l, r2h, r1hl; \ uint64_t ret =3D 0; \ @@ -1695,7 +1695,7 @@ uint64_t helper_ix##name(uint64_t r1, uint32_t r2) = \ return ret; \ } \ \ -uint64_t helper_ix##name ##_u(uint64_t r1, uint32_t r2) \ +uint64_t HELPER(ix##name ##_u)(uint64_t r1, uint32_t r2) \ { \ int64_t r2l, r2h, r1hl; \ uint64_t ret =3D 0; \ @@ -1722,7 +1722,7 @@ EXTREMA_H_B(min, <) =20 #undef EXTREMA_H_B =20 -uint32_t helper_clo_h(uint32_t r1) +uint32_t HELPER(clo_h)(uint32_t r1) { uint32_t ret_hw0 =3D extract32(r1, 0, 16); uint32_t ret_hw1 =3D extract32(r1, 16, 16); @@ -1740,7 +1740,7 @@ uint32_t helper_clo_h(uint32_t r1) return ret_hw0 | (ret_hw1 << 16); } =20 -uint32_t helper_clz_h(uint32_t r1) +uint32_t HELPER(clz_h)(uint32_t r1) { uint32_t ret_hw0 =3D extract32(r1, 0, 16); uint32_t ret_hw1 =3D extract32(r1, 16, 16); @@ -1758,7 +1758,7 @@ uint32_t helper_clz_h(uint32_t r1) return ret_hw0 | (ret_hw1 << 16); } =20 -uint32_t helper_cls_h(uint32_t r1) +uint32_t HELPER(cls_h)(uint32_t r1) { uint32_t ret_hw0 =3D extract32(r1, 0, 16); uint32_t ret_hw1 =3D extract32(r1, 16, 16); @@ -1776,7 +1776,7 @@ uint32_t helper_cls_h(uint32_t r1) return ret_hw0 | (ret_hw1 << 16); } =20 -uint32_t helper_sh(uint32_t r1, uint32_t r2) +uint32_t HELPER(sh)(uint32_t r1, uint32_t r2) { int32_t shift_count =3D sextract32(r2, 0, 6); =20 @@ -1789,7 +1789,7 @@ uint32_t helper_sh(uint32_t r1, uint32_t r2) } } =20 -uint32_t helper_sh_h(uint32_t r1, uint32_t r2) +uint32_t HELPER(sh_h)(uint32_t r1, uint32_t r2) { int32_t ret_hw0, ret_hw1; int32_t shift_count; @@ -1809,7 +1809,7 @@ uint32_t helper_sh_h(uint32_t r1, uint32_t r2) } } =20 -uint32_t helper_sha(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint32_t HELPER(sha)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t shift_count; int64_t result, t1; @@ -1847,7 +1847,7 @@ uint32_t helper_sha(CPUTriCoreState *env, uint32_t r1= , uint32_t r2) return ret; } =20 -uint32_t helper_sha_h(uint32_t r1, uint32_t r2) +uint32_t HELPER(sha_h)(uint32_t r1, uint32_t r2) { int32_t shift_count; int32_t ret_hw0, ret_hw1; @@ -1867,7 +1867,7 @@ uint32_t helper_sha_h(uint32_t r1, uint32_t r2) } } =20 -uint32_t helper_bmerge(uint32_t r1, uint32_t r2) +uint32_t HELPER(bmerge)(uint32_t r1, uint32_t r2) { uint32_t i, ret; =20 @@ -1881,7 +1881,7 @@ uint32_t helper_bmerge(uint32_t r1, uint32_t r2) return ret; } =20 -uint64_t helper_bsplit(uint32_t r1) +uint64_t HELPER(bsplit)(uint32_t r1) { int32_t i; uint64_t ret; @@ -1898,7 +1898,7 @@ uint64_t helper_bsplit(uint32_t r1) return ret; } =20 -uint32_t helper_parity(uint32_t r1) +uint32_t HELPER(parity)(uint32_t r1) { uint32_t ret; uint32_t nOnes, i; @@ -1934,7 +1934,7 @@ uint32_t helper_parity(uint32_t r1) return ret; } =20 -uint32_t helper_pack(uint32_t carry, uint32_t r1_low, uint32_t r1_high, +uint32_t HELPER(pack)(uint32_t carry, uint32_t r1_low, uint32_t r1_high, uint32_t r2) { uint32_t ret; @@ -1976,7 +1976,7 @@ uint32_t helper_pack(uint32_t carry, uint32_t r1_low,= uint32_t r1_high, return ret; } =20 -uint64_t helper_unpack(uint32_t arg1) +uint64_t HELPER(unpack)(uint32_t arg1) { int32_t fp_exp =3D extract32(arg1, 23, 8); int32_t fp_frac =3D extract32(arg1, 0, 23); @@ -2004,7 +2004,7 @@ uint64_t helper_unpack(uint32_t arg1) return ret; } =20 -uint64_t helper_dvinit_b_13(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint64_t HELPER(dvinit_b_13)(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2) { uint64_t ret; int32_t abs_sig_dividend, abs_divisor; @@ -2027,7 +2027,7 @@ uint64_t helper_dvinit_b_13(CPUTriCoreState *env, uin= t32_t r1, uint32_t r2) return ret; } =20 -uint64_t helper_dvinit_b_131(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2) +uint64_t HELPER(dvinit_b_131)(CPUTriCoreState *env, uint32_t r1, uint32_t = r2) { uint64_t ret =3D sextract32(r1, 0, 32); =20 @@ -2044,7 +2044,7 @@ uint64_t helper_dvinit_b_131(CPUTriCoreState *env, ui= nt32_t r1, uint32_t r2) return ret; } =20 -uint64_t helper_dvinit_h_13(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint64_t HELPER(dvinit_h_13)(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2) { uint64_t ret; int32_t abs_sig_dividend, abs_divisor; @@ -2067,7 +2067,7 @@ uint64_t helper_dvinit_h_13(CPUTriCoreState *env, uin= t32_t r1, uint32_t r2) return ret; } =20 -uint64_t helper_dvinit_h_131(CPUTriCoreState *env, uint32_t r1, uint32_t r= 2) +uint64_t HELPER(dvinit_h_131)(CPUTriCoreState *env, uint32_t r1, uint32_t = r2) { uint64_t ret =3D sextract32(r1, 0, 32); =20 @@ -2084,7 +2084,7 @@ uint64_t helper_dvinit_h_131(CPUTriCoreState *env, ui= nt32_t r1, uint32_t r2) return ret; } =20 -uint64_t helper_dvadj(uint64_t r1, uint32_t r2) +uint64_t HELPER(dvadj)(uint64_t r1, uint32_t r2) { int32_t x_sign =3D (r1 >> 63); int32_t q_sign =3D x_sign ^ (r2 >> 31); @@ -2107,7 +2107,7 @@ uint64_t helper_dvadj(uint64_t r1, uint32_t r2) return remainder | quotient; } =20 -uint64_t helper_dvstep(uint64_t r1, uint32_t r2) +uint64_t HELPER(dvstep)(uint64_t r1, uint32_t r2) { int32_t dividend_sign =3D extract64(r1, 63, 1); int32_t divisor_sign =3D extract32(r2, 31, 1); @@ -2139,7 +2139,7 @@ uint64_t helper_dvstep(uint64_t r1, uint32_t r2) return ((uint64_t)remainder << 32) | (uint32_t)dividend_quotient; } =20 -uint64_t helper_dvstep_u(uint64_t r1, uint32_t r2) +uint64_t HELPER(dvstep_u)(uint64_t r1, uint32_t r2) { int32_t dividend_quotient =3D extract64(r1, 0, 32); int64_t remainder =3D extract64(r1, 32, 32); @@ -2157,7 +2157,7 @@ uint64_t helper_dvstep_u(uint64_t r1, uint32_t r2) return ((uint64_t)remainder << 32) | (uint32_t)dividend_quotient; } =20 -uint64_t helper_divide(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint64_t HELPER(divide)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { int32_t quotient, remainder; int32_t dividend =3D (int32_t)r1; @@ -2186,7 +2186,7 @@ uint64_t helper_divide(CPUTriCoreState *env, uint32_t= r1, uint32_t r2) return ((uint64_t)remainder << 32) | (uint32_t)quotient; } =20 -uint64_t helper_divide_u(CPUTriCoreState *env, uint32_t r1, uint32_t r2) +uint64_t HELPER(divide_u)(CPUTriCoreState *env, uint32_t r1, uint32_t r2) { uint32_t quotient, remainder; uint32_t dividend =3D r1; @@ -2206,7 +2206,7 @@ uint64_t helper_divide_u(CPUTriCoreState *env, uint32= _t r1, uint32_t r2) return ((uint64_t)remainder << 32) | quotient; } =20 -uint64_t helper_mul_h(uint32_t arg00, uint32_t arg01, +uint64_t HELPER(mul_h)(uint32_t arg00, uint32_t arg01, uint32_t arg10, uint32_t arg11, uint32_t n) { uint32_t result0, result1; @@ -2228,7 +2228,7 @@ uint64_t helper_mul_h(uint32_t arg00, uint32_t arg01, return (((uint64_t)result1 << 32)) | result0; } =20 -uint64_t helper_mulm_h(uint32_t arg00, uint32_t arg01, +uint64_t HELPER(mulm_h)(uint32_t arg00, uint32_t arg01, uint32_t arg10, uint32_t arg11, uint32_t n) { uint64_t ret; @@ -2253,7 +2253,7 @@ uint64_t helper_mulm_h(uint32_t arg00, uint32_t arg01, ret =3D ret << 16; return ret; } -uint32_t helper_mulr_h(uint32_t arg00, uint32_t arg01, +uint32_t HELPER(mulr_h)(uint32_t arg00, uint32_t arg01, uint32_t arg10, uint32_t arg11, uint32_t n) { uint32_t result0, result1; @@ -2276,7 +2276,7 @@ uint32_t helper_mulr_h(uint32_t arg00, uint32_t arg01, return (result1 & 0xffff0000) | (result0 >> 16); } =20 -uint32_t helper_crc32b(uint32_t arg0, uint32_t arg1) +uint32_t HELPER(crc32b)(uint32_t arg0, uint32_t arg1) { uint8_t buf[1] =3D { arg0 & 0xff }; =20 @@ -2284,7 +2284,7 @@ uint32_t helper_crc32b(uint32_t arg0, uint32_t arg1) } =20 =20 -uint32_t helper_crc32_be(uint32_t arg0, uint32_t arg1) +uint32_t HELPER(crc32_be)(uint32_t arg0, uint32_t arg1) { uint8_t buf[4]; stl_be_p(buf, arg0); @@ -2292,7 +2292,7 @@ uint32_t helper_crc32_be(uint32_t arg0, uint32_t arg1) return crc32(arg1, buf, 4); } =20 -uint32_t helper_crc32_le(uint32_t arg0, uint32_t arg1) +uint32_t HELPER(crc32_le)(uint32_t arg0, uint32_t arg1) { uint8_t buf[4]; stl_le_p(buf, arg0); @@ -2325,7 +2325,7 @@ static uint32_t crc_div(uint32_t crc_in, uint32_t dat= a, uint32_t gen, return crc_in; } =20 -uint32_t helper_crcn(uint32_t arg0, uint32_t arg1, uint32_t arg2) +uint32_t HELPER(crcn)(uint32_t arg0, uint32_t arg1, uint32_t arg2) { uint32_t crc_out, crc_in; uint32_t n =3D extract32(arg0, 12, 4) + 1; @@ -2363,7 +2363,7 @@ uint32_t helper_crcn(uint32_t arg0, uint32_t arg1, ui= nt32_t arg2) return extract32(crc_out, 0, n); } =20 -uint32_t helper_shuffle(uint32_t arg0, uint32_t arg1) +uint32_t HELPER(shuffle)(uint32_t arg0, uint32_t arg1) { uint32_t resb; uint32_t byte_select; @@ -2532,7 +2532,7 @@ static void restore_context_lower(CPUTriCoreState *en= v, uint32_t ea, env->gpr_d[7] =3D cpu_ldl_le_data(env, ea + 60); } =20 -void helper_call(CPUTriCoreState *env, uint32_t next_pc) +void HELPER(call)(CPUTriCoreState *env, uint32_t next_pc) { uint32_t tmp_FCX; uint32_t ea; @@ -2595,7 +2595,7 @@ void helper_call(CPUTriCoreState *env, uint32_t next_= pc) psw_write(env, psw); } =20 -void helper_ret(CPUTriCoreState *env) +void HELPER(ret)(CPUTriCoreState *env) { uint32_t ea; uint32_t new_PCXI; @@ -2648,7 +2648,7 @@ void helper_ret(CPUTriCoreState *env) } } =20 -void helper_bisr(CPUTriCoreState *env, uint32_t const9) +void HELPER(bisr)(CPUTriCoreState *env, uint32_t const9) { uint32_t tmp_FCX; uint32_t ea; @@ -2692,7 +2692,7 @@ void helper_bisr(CPUTriCoreState *env, uint32_t const= 9) } } =20 -void helper_rfe(CPUTriCoreState *env) +void HELPER(rfe)(CPUTriCoreState *env) { uint32_t ea; uint32_t new_PCXI; @@ -2736,7 +2736,7 @@ void helper_rfe(CPUTriCoreState *env) psw_write(env, new_PSW); } =20 -void helper_rfm(CPUTriCoreState *env) +void HELPER(rfm)(CPUTriCoreState *env) { env->PC =3D (env->gpr_a[11] & ~0x1); /* ICR.IE =3D PCXI.PIE; */ @@ -2755,31 +2755,31 @@ void helper_rfm(CPUTriCoreState *env) } } =20 -void helper_ldlcx(CPUTriCoreState *env, uint32_t ea) +void HELPER(ldlcx)(CPUTriCoreState *env, uint32_t ea) { uint32_t dummy; /* insn doesn't load PCXI and RA */ restore_context_lower(env, ea, &dummy, &dummy); } =20 -void helper_lducx(CPUTriCoreState *env, uint32_t ea) +void HELPER(lducx)(CPUTriCoreState *env, uint32_t ea) { uint32_t dummy; /* insn doesn't load PCXI and PSW */ restore_context_upper(env, ea, &dummy, &dummy); } =20 -void helper_stlcx(CPUTriCoreState *env, uint32_t ea) +void HELPER(stlcx)(CPUTriCoreState *env, uint32_t ea) { save_context_lower(env, ea); } =20 -void helper_stucx(CPUTriCoreState *env, uint32_t ea) +void HELPER(stucx)(CPUTriCoreState *env, uint32_t ea) { save_context_upper(env, ea); } =20 -void helper_svlcx(CPUTriCoreState *env) +void HELPER(svlcx)(CPUTriCoreState *env) { uint32_t tmp_FCX; uint32_t ea; @@ -2822,7 +2822,7 @@ void helper_svlcx(CPUTriCoreState *env) } } =20 -void helper_svucx(CPUTriCoreState *env) +void HELPER(svucx)(CPUTriCoreState *env) { uint32_t tmp_FCX; uint32_t ea; @@ -2865,7 +2865,7 @@ void helper_svucx(CPUTriCoreState *env) } } =20 -void helper_rslcx(CPUTriCoreState *env) +void HELPER(rslcx)(CPUTriCoreState *env) { uint32_t ea; uint32_t new_PCXI; @@ -2897,12 +2897,12 @@ void helper_rslcx(CPUTriCoreState *env) env->PCXI =3D new_PCXI; } =20 -void helper_psw_write(CPUTriCoreState *env, uint32_t arg) +void HELPER(psw_write)(CPUTriCoreState *env, uint32_t arg) { psw_write(env, arg); } =20 -uint32_t helper_psw_read(CPUTriCoreState *env) +uint32_t HELPER(psw_read)(CPUTriCoreState *env) { return psw_read(env); } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772692; cv=none; d=zohomail.com; s=zohoarc; b=VbJLDt4ije5h0HO7S1BYsn5VehAkLSwJkO2kSrczDpNYD3QKvs3YY/wP75/JvuVqQRgJQrhE7A4YgIIxK1mvdijBhWqmibR8ijTJbPZZA5sy9pr9qAytiWlDopyS5QiRRt4zQou1yzoOY1V6a123hdAMcXmJvqN2cWzqFqpBR9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772692; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ts79TeREy8Sq12zABKQMPXAqndH8RorOrpPYppY4wus=; b=SrTNOrW1WWN4OFbo828grU58GKoc/xoD9XGKQHBjfIsPuMtX7AOQsQ0p+y2KqwXES6CscKdx2R2y+Uq/FErglYMrto1PgMW2Wkf/ViXHXXsNOhnryyYLAtGj+mvf5Rkk9k0cO3IgxDxGBldcaBshQ0vULtMGcr0dHJpop06C63U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772692948326.7725678450845; Fri, 23 Oct 2026 09:24:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI2n-0005zb-Uy; Fri, 23 Oct 2026 12:23:02 -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 1xKI2d-0005mC-C9 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:53 -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 1xKI2b-00038X-B0 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:50 -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 69NE5x2Q4063503 for ; Fri, 23 Oct 2026 16:22:48 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmrchdj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:22:47 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93f33438950so243208785a.1 for ; Fri, 23 Oct 2026 09:22:47 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d405cc0sm735823f8f.30.2026.10.23.09.22.44 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ts79TeREy8Sq12zABKQMPXAqndH8RorOrpPYppY4wus=; b=jBQgCBgJevxUGLFl rjNVwmFz5wa6GlNn8cAyesvxT6xp8XOKyb63hxpgTSWQ078G7dAtgzFqzUiL9Au5 DceQFhihV+OtNhV4n52c8reb71c29eQRV3zRERd/GO66J4btREh2ZOWyJ1G+ZpMH yvTdz83RbAG/dzeuLDm/9xVapS4G5ZqRoFPOfPLe73P00AioEERvhxmdyyyo/m9W wz1zNj49wIF9kCIxW1qMGQFWeq3fCH+nsMQoFtPgoABsKnxN79Q8AzHILdjh1bj5 SoKOJIVJG4A3EkmgN67OikICTIlM8rkLKIFJsIm4BoZqcQBF8cwRXJI6jIiRRPBF /n4ggw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772567; x=1793377367; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ts79TeREy8Sq12zABKQMPXAqndH8RorOrpPYppY4wus=; b=CC/cWvn26IrbLgnPRXfqfxe9NUul8XJLVAyYXMuLJPvxZEJzC0sc/5ok2aQR9tsPPC pDrAbRvYzFB/y0Cj22t+57kWmyRMFUHEzM0wEPGZtQHykP19YWm2RjC1TezU64+OePo7 EOZsmPxwe+ElhuoJppoIy16Gj93BnQMLeapGx9S1g9P6ioUXwwhl/ROFwCNZsSXX6rIu VdSYDbimjLsKsD+fYsZbTSRY3freRBvFzJz7i9eNSgoLWgR2v0/EwuygVRdqFTkOX+k/ ZPhXYDzxEWcwoSSpE6YWlVbvXX9AxKn5/qbDIHaQxOt1Nz2V22eYNstn8v+ASwrEr0rq pjwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772567; x=1793377367; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ts79TeREy8Sq12zABKQMPXAqndH8RorOrpPYppY4wus=; b=ojYZBXY1uLMna7MZVikRqOd3plBTqK4JVcDU9Lx2f6WDRYbggcudzDD5r25CMsp9LS tNQI6ybBz4+jCg4uMVI46IHosLGM/I6nb8OCwQszTTCLUZ4rA6H/Bwxu63HMcYGCycxv eoBNJH3LYztXdPYQe7leEumN/9W6VxQCj9WuKtSAthAijjFPwMKonNyAtGzAiyw5n/mp fkc5iIwHfd3RYsoSUOJFUrT0JNHNzorzMCjeAN7gARAz0GVLszd1L8/xuiZDw5kY6NfV V0il+VGIAV/H7ixyrmWnPt/6gVAQKbwQwmCoOdXhX9iw0OJ6DUZVFHGQvR5c+RrabI8n 7V2g== X-Gm-Message-State: AFq9FYJtBlJgdcl8HVrqbZgnRqEYpe99yEebnu9SD+4Isgk81hHI5ult EOiTNCcajBU5+Iaj6tsjc1ufAJytRynrF0XmKXdBa+FX4vaC92W8vz9EAu0B5+9xsKSgoe4hIOx TLNszWnNPrugDcw0N+YWg2izZjTgP6U8Us/Yy3u5MqBzE6jJiXn4w4jGOj/KzDDwnJkCu X-Gm-Gg: AYBFou2aC2hv7luqu2gKTj1HQlL9e85T8Pv6EAugl+x++glTVYvvl8uz1E5EzVNtUNq POMP9V4LHcx/cQ2nIWIjHaDxy8v1I9/kkCNtRZa6P0VRJQD94HYNO5jb2rXhky0yi4wRElbUOXB 9KnwA8vU2jkBFnqe1V4+HBdTrpcDu/cV/nQa9yqCOSRGu2oXm3wX4KQvkN7mXpVG583c8YwAJxG YLbbrFXVaFFYgMKSS687mDXHyPXjfksK4tStKrUjvHqYGA+EootKz7nV1vVBfpjwJJb/dxKJ//g EAZCFHj+veK64LMh68jXlkaOkneKAK8hkRTTTIXbt9I/HeHTvJxeCKotklEjAoZTVVkl8Ou/c27 dwg7Qxss2AW55rJ4+EcQV3/LnVFT+mu2OTwWZ8yXq X-Received: by 2002:a05:620a:2688:b0:934:ab73:ac53 with SMTP id af79cd13be357-93f6f3cc32cmr504437085a.0.1792772566883; Fri, 23 Oct 2026 09:22:46 -0700 (PDT) X-Received: by 2002:a05:620a:2688:b0:934:ab73:ac53 with SMTP id af79cd13be357-93f6f3cc32cmr504432785a.0.1792772566294; Fri, 23 Oct 2026 09:22:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 76/83] target/hexagon: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:24 +0200 Message-ID: <20261023161332.60153-77-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: zQFki3SqotCBVX1Ke8miVb0MMj_OsnOc X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX44NfSyE/S105 XrVZGxAHiC5GUjJb9J9AcaIzvCt4+oP3L83mmWGO9KkDad5JWq/aAnr75sRFsORzyBv4jrATqjw 4vjd11bzW13mj7+IkBpVzhLXduLn9CE= X-Authority-Analysis: v=2.4 cv=VNZIDNPX c=1 sm=1 tr=0 ts=6adb89d7 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=e5iG3p4lFUziAqCKwoAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX+INrABO6p/S6 u9419qceCY5aX/34qrIcyu7VaJX/rnRzG/ZGdKcn6QKv//QKEBeDLrRy+n+8ATG0K6hb1GsfgDk 6HgurNo/fLLxATu14I5eD3fNePEbF9CnkMunRj+DRAlTT2SaZgj7kJXwL5MTfUh52D7nzEIE+2p 9nbo491BOKw3xeqD94C3NF8I9WuWHpToA4W0XHG3rtJYtRZCysgrGZNC3vWLtNTTNUsu/nB5eSF cCG5DHpbG2r9eqYcI25X7oFHQgKB6W7fxVh5zIxztj3yJsNDkFqfo3FSttHo4p/u8lT086+Gs5I CnxPnvWk8lM0DoIJuky51wQW5SqJ976UtU1l4jR+So4FUjshxuNJ8Q7+700ClGQzpqjEMo4h4gB d/8NS4kFXgRHu0aWZFSSJrdCKBvlZgjMLZYHyDe5py3Xylq/2p5m4idRhetKhsIR1W1GP1qUQCI JUlagNoI3DIqghLOoHw== X-Proofpoint-ORIG-GUID: zQFki3SqotCBVX1Ke8miVb0MMj_OsnOc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772693736158500 From: Peter Maydell Convert hexagon to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Brian Cain Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261022125858.310252-2-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/hexagon/cpu.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 8df63e43260..ebd77e0f7dd 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -646,7 +646,8 @@ static void find_qemu_subpage(vaddr *addr, hwaddr *phys= , uint64_t page_size) *phys +=3D offset; } =20 -static hwaddr hexagon_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +static bool hexagon_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *resul= t) { CPUHexagonState *env =3D cpu_env(cs); hwaddr phys_addr; @@ -660,10 +661,16 @@ static hwaddr hexagon_cpu_get_phys_addr_debug(CPUStat= e *cs, vaddr addr) vaddr page_offset =3D addr & (TARGET_PAGE_SIZE - 1); find_qemu_subpage(&addr, &phys_addr, page_size); phys_addr +=3D hexagon_cpu_mmu_enabled(env) ? page_offset : 0; - return phys_addr; + + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys_addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 - return -1; + return false; } =20 =20 @@ -789,7 +796,7 @@ static bool hexagon_tlb_fill(CPUState *cs, vaddr addres= s, int size, =20 static const struct SysemuCPUOps hexagon_sysemu_ops =3D { .has_work =3D hexagon_cpu_has_work, - .get_phys_addr_debug =3D hexagon_cpu_get_phys_addr_debug, + .translate_for_debug =3D hexagon_cpu_translate_for_debug, }; =20 static bool hexagon_cpu_exec_interrupt(CPUState *cs, int interrupt_request) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772666; cv=none; d=zohomail.com; s=zohoarc; b=A0w47oI69PP888haPim/duCmcgzLztCY7y/JoTy42jsJQKwdJY9drTnh+ECYS+mWHBBe5zA4b9Cq+tG9p3LmwfJpsCepkh7IJuhHaa14MukXOXFdFCwLUKOF3sAYFV2cCX8s8gNLqN9EG4tPQfZjAyjtpZuOZMQqEWQnbpIs4/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772666; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=jBbNY9oPYF73vu93PC0fHmlndFzvdOwBK1juP50uIZo=; b=FSpbFHZ2+ok5Alnq3ILwndN5UPAgivJuQJUSsSRxgEuIUjZvSOIQJ9BobLPwe+2fBrCLRXHtmbvyVjUe66BMGJAaOT97BxQUIMajyIzjWZ5J9GlcbNb4wMfXOzZBArpo6YgyHNyrg3BTqrPNGWZlVK+C8D9H9ETTxA7R9RYrB8g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772666198799.4052535120292; Fri, 23 Oct 2026 09:24:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI2q-0006Hc-Sx; Fri, 23 Oct 2026 12:23:04 -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 1xKI2k-0005wJ-5F for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:58 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI2i-000395-Cb for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:22:57 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG3ld92931048 for ; Fri, 23 Oct 2026 16:22:55 GMT Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas6r2at-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:22:55 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-9308eafb465so309140285a.2 for ; Fri, 23 Oct 2026 09:22:55 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3fac9esm744473f8f.24.2026.10.23.09.22.52 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= jBbNY9oPYF73vu93PC0fHmlndFzvdOwBK1juP50uIZo=; b=HO8jB1JqPIxXfN5k KPf0NXWWDsAiFBrKz3LFhSbeKU2bT86v9AfG9wO4FVlMrf3KAJCoL9QuzOcoxuny 46f++SfIW6IdY/ejY6rY7SBu4S8DQtPjH1NBNXLgxg2NBKg/3xeU7CRN5t599nDX bAIrLryEfgVJ5k3oTG5nPgWiNhHl0i1BR0halpJNztoEl7q/plUtw/HO25snbeIG 1FIAwfDiM0FSPSwDwOWZzrF0gsDKwUrsYzenNSzAPl9I/Ev9clwaimr6yLi7/8Z1 B64KyEgOgaL6YoWNwj/schpXFV4R8gh1yn5URuAT2N0nLmq9jUerhwfgzJUDuRbt nBpFGA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772575; x=1793377375; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=jBbNY9oPYF73vu93PC0fHmlndFzvdOwBK1juP50uIZo=; b=Zb4ZWyiDUzahJSlxE/ERzWcNEHfERv9ice/OlYPHmoYt7A0x/4+sIDScm069SjW0dO cAJhZBBPTwnMUjIixZi9fAgReYaLQ4BN/W+jYDFJD00Hl4O+WrHh+g0tASVGxJfz9dt1 0b+OclctSiRd4g12yNARk5YSushMOoEP8BC6OK2WaRd+rTWeeJdgm38hEHY9YBH6cUZQ rb6MIFn9pLoOlyQLPt/rkJt/V9oblG4HeYov2WoWwu11g5RzncWf3aKtLTjhxmqidbWI Bk7wzGCCixUe7uWAt2yHcgqgJ9SPEs3MHdukgN/z4fcpnKyeWvqkQhaUEng1Ib2pVvCc 0q9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772575; x=1793377375; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=jBbNY9oPYF73vu93PC0fHmlndFzvdOwBK1juP50uIZo=; b=rVRlenqLVsseFLgOgqDBcQedg0M16ieNvHOlPvmTs2Ae7+xoz4ST2EbmNI39NfIGrq 1E3ZenoP1aHCqssYCHD3fJE3hs9FllufdFF6sxnHjzBkAxrqy5GIkQj+f6cdEi5RZ/eR l2vqPymbULzctOMzqxNBrMLOSnRBfR8g0WSgeyopOvftYJ5vznOC5pddn2O6P3poL0eJ Sn+RGEvzgqOTY+KXYGy0dp+/yEoz38y53H1xi5E+24rjK8QwjCDwr4dCig0Ob60g1NFO NmmvcGAoiSyChiMNAj4Tw0A1XOOZ3Bj9gp1VViVVik8rTR0pQyXaxflBFbx6UiNVVKID XCog== X-Gm-Message-State: AFq9FYIUxD3DV8UwsmZhYGLkmSXE8wer1hDbW+H92DIjNG4OEsnIIiw2 jeJwkvDNFCt/2rhPP4h8Z7kZ/XjKOtnTHVZa8dC7DcNG6Y9lpR+ZcGMgW9fTwra/5l9B0d4EL9D M+ykLUOW+2tpn13ZngPTGiXjh28HL4YZnx9qsaPKNW3yKuT8RNONCz9LOxtgVXn1YPFv5 X-Gm-Gg: AYBFou2K9F50KNr22KWD0tCjocVO9StlBDx4HWJdsZdgvM2z0pu4wRQPyvkcL2qVBlC VRg2RXfbTpJ2hnjVTuEIBBKhoFvihwj0N/G4z0/3fLb9FcQDgwoWo3rA/hBIMAifmL61GFUNnJs Xds4EB3IKax9KXCVXOWyUhEOL14nO3z6+9Dh3Ng7EjNYeZs3Oba/3QIKprXTKwZebVSZNR1hHz1 00ZjysCZEO0f5aY2qUDJsM5A+StgDovPaD4qjfP2iq1rgkWuBf6Ib+4Dt+mgQmxlX9SzgZpU/M4 MvvwkU9FMGYJOGgEXjm4Wkdk6Vf74oQ3JC0bhDFyzPssTMxs0jiTVpBu/ZT5zXodAuQN7XL2gaT +u28I+i3S7JP2IsAEk2lthVvgtyb6T7vKy94jVSPm X-Received: by 2002:a05:620a:4712:b0:93e:869c:43e2 with SMTP id af79cd13be357-93f6f9a2bcamr507399485a.50.1792772574665; Fri, 23 Oct 2026 09:22:54 -0700 (PDT) X-Received: by 2002:a05:620a:4712:b0:93e:869c:43e2 with SMTP id af79cd13be357-93f6f9a2bcamr507394985a.50.1792772574124; Fri, 23 Oct 2026 09:22:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 77/83] target/hppa: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:25 +0200 Message-ID: <20261023161332.60153-78-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXwvt+jAwtoMiT /kbDsohVoDsOcKk+kizt9GbCnK/L0WJivgpvcUJtkDNysRrYJuEKBUFtBOw7qX7Ej66kSPUGruT 4YU43MuUZl4fHA1sSOhS5oYzBVgPSC6f8E9dWNu8a1sUMyLgEW+cKAnPkw7cX4axfXSL3f6Tolb uIW/iJRBQOKmp1+reiylcxnCbdfnPdXdqP4NR0+qS0zDlqTxWVEMk3IUi1CNuCcxkzkKMMt2Vrc T19iAfcatbgTiLpZKjGBa88R0+tmpiSUKDnzFk36LsNRCRggbkgxb+7DNTidkysLfue5CasjCkV X7zsopmqU3fcfRQc67i/cYkNIzxuosrZpRHonphSd4QzJ08j7YVMi31p4rSdr91RId7XqR8syS0 Nr6KHSSC+oClgxq98okUrADINQiRoCRXWaInz5XZ8WHUMzPukVHFgx+EOkkHB65TgrxNSWTN4x9 nbTSFiMeKa4xtN7fZHA== X-Authority-Analysis: v=2.4 cv=DK0acCNb c=1 sm=1 tr=0 ts=6adb89df cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=wFESi-ZcbIeh2K4vyBAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: w1BSH9v-ajYQuIxyxyb9M0-0z25NNsJH X-Proofpoint-ORIG-GUID: w1BSH9v-ajYQuIxyxyb9M0-0z25NNsJH X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX07BfxsEFC7Iq uzrTUe2KOb/AuDl2ZzHWiP0jcyJyyWT+lJHWuc/ZKIPgbW3socFkEuyRLTi+pQutFjSj9WNztSu PJPK/vhSm7po3XVk1S2nqS7y64WyGxg= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 priorityscore=1501 adultscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772667317158501 From: Peter Maydell Convert hppa to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261022125858.310252-3-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/hppa/cpu.h | 3 ++- target/hppa/cpu.c | 2 +- target/hppa/mem_helper.c | 21 ++++++++++++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 3914b3285c5..8818d47dcd4 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -391,7 +391,8 @@ int hppa_cpu_gdb_write_register(CPUState *cpu, uint8_t = *buf, int reg); void hppa_cpu_dump_state(CPUState *cs, FILE *f, int); #ifndef CONFIG_USER_ONLY void hppa_ptlbe(CPUHPPAState *env); -hwaddr hppa_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr); +bool hppa_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result); void hppa_set_ior_and_isr(CPUHPPAState *env, vaddr addr, bool mmu_disabled= ); bool hppa_cpu_tlb_fill_align(CPUState *cs, CPUTLBEntryFull *out, vaddr add= r, MMUAccessType access_type, int mmu_idx, diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index dbf86941cf0..9d643223980 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -246,7 +246,7 @@ static ObjectClass *hppa_cpu_class_by_name(const char *= cpu_model) =20 static const struct SysemuCPUOps hppa_sysemu_ops =3D { .has_work =3D hppa_cpu_has_work, - .get_phys_addr_debug =3D hppa_cpu_get_phys_addr_debug, + .translate_for_debug =3D hppa_cpu_translate_for_debug, }; #endif =20 diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 01e6149c811..2393a155076 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -346,7 +346,8 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr = addr, int mmu_idx, return ret; } =20 -hwaddr hppa_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool hppa_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { HPPACPU *cpu =3D HPPA_CPU(cs); hwaddr phys; @@ -361,10 +362,20 @@ hwaddr hppa_cpu_get_phys_addr_debug(CPUState *cs, vad= dr addr) excp =3D hppa_get_physical_address(&cpu->env, addr, mmu_idx, 0, 0, &phys, &prot); =20 - /* Since we're translating for debugging, the only error that is a - hard error is no translation at all. Otherwise, while a real cpu - access might not have permission, the debugger does. */ - return excp =3D=3D EXCP_DTLB_MISS ? -1 : phys; + /* + * Since we're translating for debugging, the only error that is a + * hard error is no translation at all. Otherwise, while a real cpu + * access might not have permission, the debugger does. + */ + if (excp =3D=3D EXCP_DTLB_MISS) { + return false; + } + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 void hppa_set_ior_and_isr(CPUHPPAState *env, vaddr addr, bool mmu_disabled) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792773152; cv=none; d=zohomail.com; s=zohoarc; b=CY3v2D5F4CYcmrq6rClhS2E1ReH5S7jsbGTvvIXyHq5hjwSiW4IrAwhNmg40FtikgyQ73lZ2spfGeSqORfwBctO8xLpczGUGlyRJPi0SBoofCO5SJgJNie5JjHJEMpwjGRYosbanFe/m3YTUHASF5RIpoeHiO0kSYHN1wPVDj1w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792773152; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=3w248Jc7xcLUDTW16O4L+qNzaKAGQWJpZl7tQ3+ofR4=; b=aX1hnFoz0Y96/fDTGa5Up8Y/OvK82ByQghtLK6wh12RUKuReJUdSspyS7swM/Sr3ksbmKf1JF8jP3EfBdtN+O/70XiZEksYVmqwJOe1iBcsvrXU+xq91t68vgFGa1AVoYuquGFVF3DzjiMH/pTLwtfMNDC7GzGfVzIwLdmnuPHc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792773152799551.8935869407545; Fri, 23 Oct 2026 09:32:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKIAj-00084n-3X; Fri, 23 Oct 2026 12:31:13 -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 1xKIAg-00084Y-5t for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:31:10 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKIAe-00042b-1g for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:31:09 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG2qTi3228258 for ; Fri, 23 Oct 2026 16:31:05 GMT Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgart03q4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:31:05 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-186c1aae818so3797209c88.0 for ; Fri, 23 Oct 2026 09:31:05 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a2fe31a7a4sm9909285e9.0.2026.10.23.09.23.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 3w248Jc7xcLUDTW16O4L+qNzaKAGQWJpZl7tQ3+ofR4=; b=aQxqo5hZf6t4+3b+ jkcgOUcCSYxUe1umMjmc42arwdP5AjI4woRxcDdYDb/8MfWFuS6WLqeSAjcphfhK adpFyNxSmxlUrFfcMeg0OzbfCxrh2Sex6R4Z4sbLiQow0TJC/w+RIq9AWnNiCfaW QzCD/oBpOIL1JUqciuoDksulICCQMhIIymvc3uWakmTgZRNxhsqfYLAE70YlpgMj 0xRYKIb9xvfiSOjFAR6cRM7sj/vFF1pWCwFd+N52QVnXmXffEYRZR3cAWrgEFKv9 t8dRb24LQuBhQdfHpZpvi6ZDWyNroxojV9k2ihb9DJVAEJOLj73AXQp9Bsdsnqvm /JdQ1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792773064; x=1793377864; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=3w248Jc7xcLUDTW16O4L+qNzaKAGQWJpZl7tQ3+ofR4=; b=YpsvE3nPRuIcCR2c+pQjWcssJSPx0aG9QVD2ZLW/E+NSl1Xj6sW5MHh+LjLM/RwvHf xX7NIaVPxmy20vXMJ46Mn/AOeuFpR266TtyMdChlUVjvmmFQC5MYx3OydT8zMRpsp2RM GiXnGQC3K5ZsPJ0AF0LSw9je2wfQY6iGts3jjykzL5PX9AkQS4aFNc5V9wDDxpyx92zz xAXRBtU4EEI+Cp7sF+JCwmFsJNr4PTylUu/IjWwgcHbR2BCdIojE6zf6IcZABubCRBKP VGfICdJVfDmMysgceOgyqmN7mcCQ81NDMfrm44MqIvoZFd8eGAVqcjR/hdyythN8msLK /sRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792773064; x=1793377864; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=3w248Jc7xcLUDTW16O4L+qNzaKAGQWJpZl7tQ3+ofR4=; b=2bT5LrXq9/PYqRp+FEbsX9GRwEYwptb+GUlL1U6cKEDn+k3ZEYRGdf8dJNHCiuNqlW Unp9lNaGy5ohYAdcV9Vs/Hcy/8H6h/ALTO7lU3jPAH1FRY118BMMMtsI2cdru/NTguh5 ecFNO6Y0ydVi9EOpZcuQR92e0Uwt3XopnUq9WWvJinosQ9we+caP4T+U62agxU0MTy16 CJ5oDpVAlSgl+h8hYi3IkZllqKeO3c6yODy4wKr74Ky8T6f6HWNqs0CKSdGtdulEbqlD aJie5wbLncGBpQ7XAeBvfGs2QnWANcNjDg4lEg7nRpmt6WAmjTc9skba4n9gO+5WMUWn N5gg== X-Gm-Message-State: AFq9FYI60k37INLS4zQi/EAGWhQ7ALUTslMQ9oqvjL/Ky7FBq25+KiiD nkfp3COHXns2YrWvcEpFjGxKyG93S+riM4TJx69UV/tdJl7gNtS4kQ6AmyDljElmJBb8NCvLtUa NVV/7KrwLY3UujtwjaT7DnwfJtICI6LHUdXQDtRVyswDKMoUwetJ66hUrQ7IMkOETGUaW X-Gm-Gg: AYBFou1hRoz/TboTLnZKkDS3zNE1A0PWHoVgLPwnnlzuxx6cggx5rmn7QlKzAR3mwvT IpiIX0/gpzOffnh1NTmnZ5OIRWJ5exOG0+6LyWOchKe86LaR+mPN1PN4/pNtXmZESHBIvTf3kSc h0oIlQK0tbRIo4fSnUWHv1iRp/woudqXxwVukdDXeWZ/yXX1uRFoOT3GlvMSprsk20QDhQhvj0t 6SbfUMrmr0aR+ZoIlhIx+eVOJJUB/gi5qFFD0/inYyndOUZdQnlNuMKOewPiGT8a+6GTim12672 P2I5pEwd/6JuH0yMOEEf2aPakzbs6Js0qvFwtTo15QQlPim1W9RleDb5hzEs7Q5l4wHuO/sSJBP FCad0rgX5A4YHh9euqcXMRtG+R8K2rXXsNd9MHc4E X-Received: by 2002:a05:701b:4189:20b0:12d:d972:b96e with SMTP id a92af1059eb24-195c1a7f2ebmr4173936c88.20.1792773064462; Fri, 23 Oct 2026 09:31:04 -0700 (PDT) X-Received: by 2002:a05:620a:2842:b0:93f:353c:6bed with SMTP id af79cd13be357-93f6f79c4fcmr484202385a.20.1792772581238; Fri, 23 Oct 2026 09:23:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 78/83] target/loongarch: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:26 +0200 Message-ID: <20261023161332.60153-79-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX1VvAT0KwPbZE e7Rf9aBGRadLdAKFkNJsYCwxuYaOHNJ226khSCeMg1rGKRDN07YyXelFZaiEaT9AffJZK1O3jBI m9SXSxeBba9xogymE7H1O0tdpsMK4Z2B5PYAILM4fNVCKM2tuRf5MjpLHzfRvkW1Bye2heZbBM9 idM0BodlCWsJyYlyp7bqWZhSf8GLYI5oL73LsNNa4I+f6P2b5+D6fBF0nWoENJLL18A4YxEeHS/ QcMjQ1aQ7HiWG19e5t7pJoy6qL8nmDbGwL0IaJdm42P5B3YC+XPpTDUmMzVybRVD6k1kr1A61Bv AKkoV5k7kDffViIvFw2k2zUXWtyZbTAO0i2PYQSb76ym/gWH6qGwu3nWyYxGcfKvARPAwlNlUvC BLH1xQDsnQ9dO8w9JTf7XQHBdfri6m/dqgK8auRn94KoYgrDxpcG6KJR5eSI4QUi40Xo80AJFaU ue74r2fdK7r3K1oqCPQ== X-Authority-Analysis: v=2.4 cv=JI+uIMKb c=1 sm=1 tr=0 ts=6adb8bc9 cx=c_pps a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=2oa03tQm7PxnfrxzRLwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=vBUdepa8ALXHeOFLBtFW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX/5EspRL/4nCs E1cE6pQsYTHopn5P/TiXYyHrY9osWSx1ns6DVVq1y7d1R08iGFxGeMYEzORuDWnMXLC49g/t/Ys /8PvXbjAGeWL26hExvpjHWho5BiTKCQ= X-Proofpoint-ORIG-GUID: TLYPnVf5aiqkZoH1TtIbWuorhuVUp-FB X-Proofpoint-GUID: TLYPnVf5aiqkZoH1TtIbWuorhuVUp-FB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792773154611158500 From: Peter Maydell Convert loongarch to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261022125858.310252-4-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/cpu-mmu.h | 3 ++- target/loongarch/cpu.c | 2 +- target/loongarch/cpu_helper.c | 12 +++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/target/loongarch/cpu-mmu.h b/target/loongarch/cpu-mmu.h index 54fb732d62d..491eb514d9d 100644 --- a/target/loongarch/cpu-mmu.h +++ b/target/loongarch/cpu-mmu.h @@ -99,7 +99,8 @@ TLBRet loongarch_ptw(CPULoongArchState *env, MMUContext *= context, int access_type, int mmu_idx, int debug); void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base, uint64_t *dir_width, unsigned int level); -hwaddr loongarch_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool loongarch_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); uint64_t loongarch_palen_mask(CPULoongArchState *env); =20 #endif /* LOONGARCH_CPU_MMU_H */ diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 9579f4db2a1..de4af284fba 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -880,7 +880,7 @@ static const struct SysemuCPUOps loongarch_sysemu_ops = =3D { .write_elf64_note =3D loongarch_cpu_write_elf64_note, .get_dump_info =3D loongarch_get_dump_info, .get_note_size =3D loongarch_get_note_size, - .get_phys_addr_debug =3D loongarch_cpu_get_phys_addr_debug, + .translate_for_debug =3D loongarch_cpu_translate_for_debug, }; =20 static int64_t loongarch_cpu_get_arch_id(CPUState *cs) diff --git a/target/loongarch/cpu_helper.c b/target/loongarch/cpu_helper.c index 123cad3d930..270917184a6 100644 --- a/target/loongarch/cpu_helper.c +++ b/target/loongarch/cpu_helper.c @@ -363,7 +363,8 @@ TLBRet get_physical_address(CPULoongArchState *env, MMU= Context *context, return loongarch_map_address(env, context, access_type, mmu_idx, is_de= bug); } =20 -hwaddr loongarch_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool loongarch_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { CPULoongArchState *env =3D cpu_env(cs); MMUContext context; @@ -371,9 +372,14 @@ hwaddr loongarch_cpu_get_phys_addr_debug(CPUState *cs,= vaddr addr) context.addr =3D addr; if (get_physical_address(env, &context, MMU_DATA_LOAD, cpu_mmu_index(cs, false), 1) !=3D TLBRET_MATC= H) { - return -1; + return false; } - return context.physical; + *result =3D (TranslateForDebugResult) { + .physaddr =3D context.physical, + .attrs.debug =3D 1, + .lg_page_size =3D TARGET_PAGE_BITS, + }; + return true; } =20 uint64_t loongarch_palen_mask(CPULoongArchState *env) --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772610; cv=none; d=zohomail.com; s=zohoarc; b=CSU2KjKZ0btYmc7g0RnkBpsIAln/xaOtJkK0IQPaRx7Bzl+q89z4YXTgCVz1aHBp9dCc8RW92PswlJmEsoJaVuWBtwT4ge8vLXFF22QsuWHh9P6fkUOUbF1Je5VNQN26WY+iLuJe2/vHNrQbMl5nI5wzftobLX/OfYa40MQW4h4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772610; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=aZuD0DENIiKbyrh1c5c4+LO1FpVBkl9u5xfG9H9NzX0=; b=TztiI3yAW5V2sFFJdcVWaGOBbkd0DDGUDH2Ct+eObMiKY3t33l/x0KBp2pk5K15SVvdZhGNn/XEFEtoTaEfkXtlKN4yFnhRJ5F+xmfrr7zlRP0TnVVNsHKAqSRSNueMuh5pz8w1zNDw/gbfNuXTngo8KbhNxKISd01ktBNa2cDE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772610448674.9508077654322; Fri, 23 Oct 2026 09:23:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI34-0007H1-9A; Fri, 23 Oct 2026 12:23:18 -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 1xKI30-00070j-Qv for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:15 -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 1xKI2y-00039p-MW for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:14 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6D7W2462574 for ; Fri, 23 Oct 2026 16:23:10 GMT Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfqmtvju8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:23:10 +0000 (GMT) Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-917a109c937so16300956d6.2 for ; Fri, 23 Oct 2026 09:23:10 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a312fc7012sm8799725e9.5.2026.10.23.09.23.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= aZuD0DENIiKbyrh1c5c4+LO1FpVBkl9u5xfG9H9NzX0=; b=JlWdyEyMQXPMuj9A wnVP5QFvPu9NDUmKMQcdwHMpj28qkJeRY7JxDbZGAajHKQzd4i4Na1sDpWYLQTy+ EeubVtHdVYh+OMcMtKRYhcYifSBW11KUivAGvGieuibnrCU2i1lj5oYVHfVUFqqP w9HMSxoFBx9dBbdSa1AFWv8nG8VWqO1/AolMaCxLDQpNLEe2LjljXhq7dFi5mhR5 bQDJcccBbh60fm2ZW04j/O3rt8C+AXMCZvXoO4gqZLbWkAzaYW9OivjtK58lWLHP wa1Sj5JlWZf4ijvv2+3SKklNNPD+8lr2llrAiLWKYTxdvTT0G7P7KimUAmozCRSm ZaJNsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772589; x=1793377389; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=aZuD0DENIiKbyrh1c5c4+LO1FpVBkl9u5xfG9H9NzX0=; b=BbfRTfF1y1BO7PdqY4nl/7J2gSR+RTcnhd4219ZPwCevtD7z/BIh7PYileSeJNrwBo m7Ni0zzZDkpAASBAcm5RMEjy+Xbm6NZDqwagYq0fjgG+DU3jcc6on/zXHjGbmcnSKONp SBcBLsoNH9zvTK1PaGZcncFKmcECmw1jkE4C3zYREmrVsC9girZhkPB/0BX3GS1bx5RV Fjk1VtioTC0TjCLe4xQ7UVSzqG1/3C3xy/ljs5oS1LUGrU8oPPyVRlh5sD/8RsFn8zJo MP5h61wPVRniAP18FbQonf6uvQhJpjrxWgI7WSxwQ42M4m6ar2BE4xkvJsqe57VTHRM8 lV0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772589; x=1793377389; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=aZuD0DENIiKbyrh1c5c4+LO1FpVBkl9u5xfG9H9NzX0=; b=I7TtbeaGzoRV6tO/BLomCXEgfu9Qq1EhZ6CqkXkiRm2Ht8ZACPXRtvg1os/ebc+K5q g8boaOZUtuHfv8OJTOqPkRNi/RydUsRMVuy4QvYIQK7OdqLKyLKK2GLWfZ3d+NBNsXQ4 0Jo1T5sReDVZsULp0WRwq7ByAFyAGwEKucMlKAaO/gL9qi05uuSdhndoqXeA3GNDLDDO uIxZx2plyzsIhWcOYOvZLd2kQYvJGoNVBiyAx7l9j9vPA6FmN6TJusxcWP49I0NqDnTs A4RUt+O3DooVJ0wUyWsfAURN5byHqbEZ1O1p8YoxRM95MSZxTCGYPo7PDWzRDXTlf6VS YuKg== X-Gm-Message-State: AFq9FYLxYCDzlcgHezHUnF5lTLkFpPypRXYezOML+hobwqTfAhVQfyBI 4hN8/UWP6OpSyChJP165XlbrpBhp4T7Zhp/CYgIMW6iBUm0v7muFoZi80q693zh+fSc6m0/xzCq y4qiYreNz9m2gSGJF4eth43jf0r3ylfN01KOjnu7wQpJTOkbI8NHu7mnyx15Yhu16z6xz X-Gm-Gg: AYBFou3G9RRgOiW0wztrPi86BASJYn7pgnTq0a+rY3rg0ppneZqbgLrWR2RHR28r07X 2eClYsyoeUXG3Hzil2yMrmU+VSRKxN7hW8f9dFeYpt1DTqcciRp2JTnq6n2fJ2A5TG89ud7eJgy sBAZJ2Ke7x6TiVyMbgj4EnK3RMDxRClzgHYJfst0kq3yE/pCv+ZmXP821KqX9kci3h+bQltFfRk KChvzUyKowaBWC88Ui7xzV+F/RSyYV5qZIN2dXO9E2NK6TetCTBmcFRnT8IzROWCBxhZvYFf6jj LdWnTByxPMMfbWBHpZ1Bk32SrNJcBWgZNAdwEClhl2JMOYl+i/HgD7mEp9rg+1+c/54a/elUzJu E19OhsTfC4cadHrF7fJt7Gh/DqZ2KOdrdwVPA7sG6 X-Received: by 2002:a05:620a:4725:b0:93d:23b3:5088 with SMTP id af79cd13be357-93f6f907cc0mr503773785a.16.1792772589017; Fri, 23 Oct 2026 09:23:09 -0700 (PDT) X-Received: by 2002:a05:620a:4725:b0:93d:23b3:5088 with SMTP id af79cd13be357-93f6f907cc0mr503768485a.16.1792772588384; Fri, 23 Oct 2026 09:23:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 79/83] target/m68k: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:27 +0200 Message-ID: <20261023161332.60153-80-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=Gt3XaU1C c=1 sm=1 tr=0 ts=6adb89ee cx=c_pps a=7E5Bxpl4vBhpaufnMqZlrw==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=pwLHjLZDfaiR1KEsWAgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=pJ04lnu7RYOZP9TFuWaZ:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 983RIrfNxoX1GjaWUGnGbiwVEMud8Hv1 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX5mrQlqaUEfk3 q2DsJ47JLJXwJGa05gDfcrQRUS1prLA88BgAgGA7Oz4LlNWWyDLPHJtudNl96WNd2c6rH/4Pe+C rz5QGGyaaaqdxTKH1M23Wq56P1i3vHYJXJwB5V1SGMOoWKBzHjOOwzqjO1pYfgTFaVHfZtyPiyh Mei/s7v6v1HdJL0qGATjjTPnAK2KJF7HvAegTx4Ejtj4seMSDj0zAg2QPD78PXN8SgySBnjtigz Gyydhp/9/GJ2JZaXJ9/2hUxmdssmL269f2kXaiQGK0ObMtupx4fehYImWHhg06QITNa+lg0LFBT l1eTmB9MvN1siXk4yq+Ll7VMf8eIEHM2vAS9QhSuDB8YOtf/tEcV0zppfvDqFfc3fnNUbk/JYz4 KOEK4nxaaLHbrOTVGDdHH1VR3qUpk4x3ljj4uJf0vAg5td+yt1xCnKLeD2aNo1YRV6EQPb5ZRX7 VRrEGVWHnDnE4HBLOzA== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX3t1ji56PLVMu aPboieGo5RhClnWRccicY33vulPFadAUhcoTqmpmqh9a8uA7DM2Rbu7DADK61MnousZa0FrJ0X/ k8b4wiujGd8+Ixmb4QDw75xxoMimdmM= X-Proofpoint-ORIG-GUID: 983RIrfNxoX1GjaWUGnGbiwVEMud8Hv1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 adultscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772612211158500 From: Peter Maydell Convert m68k to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261022125858.310252-5-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/m68k/cpu.h | 3 ++- target/m68k/cpu.c | 2 +- target/m68k/helper.c | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 44b4afc41c6..781c98f7840 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -187,7 +187,8 @@ struct M68kCPUClass { #ifndef CONFIG_USER_ONLY void m68k_cpu_do_interrupt(CPUState *cpu); bool m68k_cpu_exec_interrupt(CPUState *cpu, int int_req); -hwaddr m68k_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool m68k_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); #endif /* !CONFIG_USER_ONLY */ void m68k_cpu_dump_state(CPUState *cpu, FILE *f, int flags); int m68k_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 01c6b6afb1f..f7d289e591a 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -688,7 +688,7 @@ static const MonitorDef m68k_monitor_defs[] =3D { =20 static const struct SysemuCPUOps m68k_sysemu_ops =3D { .has_work =3D m68k_cpu_has_work, - .get_phys_addr_debug =3D m68k_cpu_get_phys_addr_debug, + .translate_for_debug =3D m68k_cpu_translate_for_debug, #ifdef CONFIG_HMP .monitor_defs =3D m68k_monitor_defs, #endif diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 5f91d206f59..c30854a6746 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -908,7 +908,8 @@ txfail: return -1; } =20 -hwaddr m68k_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool m68k_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { CPUM68KState *env =3D cpu_env(cs); hwaddr phys_addr; @@ -918,7 +919,8 @@ hwaddr m68k_cpu_get_phys_addr_debug(CPUState *cs, vaddr= addr) =20 if ((env->mmu.tcr & M68K_TCR_ENABLED) =3D=3D 0) { /* MMU disabled */ - return addr; + phys_addr =3D addr; + goto success; } =20 access_type =3D ACCESS_DATA | ACCESS_DEBUG; @@ -928,10 +930,16 @@ hwaddr m68k_cpu_get_phys_addr_debug(CPUState *cs, vad= dr addr) =20 if (get_physical_address(env, &phys_addr, &prot, addr, access_type, &page_size) !=3D 0) { - return -1; + return false; } =20 - return phys_addr; +success: + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys_addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 /* --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772692; cv=none; d=zohomail.com; s=zohoarc; b=fRpB8S1yy1+K/bTyrqMwyjC2E0c0TTHfVU2wEjt1cAmQr5p2+kB+LFYBKimF3O+GMnVbg7qjDMyL+yNtjjHwgcPYCcWTkYIcCHWCka4x74hujnTHHkawTbqAG4dg6TiF200Niv2d+MrsXozbHV0mDP1sLhFHP7cfwbF6X87xtnI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772692; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Ajir7S+iuMCY9fLagjetcNkEg7+rFaUjEG50RV42aUk=; b=RUH975DutmmsNnL7d/z8ER8iTyDGXw+4Bv7CXfDEEVF5SgD7+aYHkfKjg06VwMQdam27Lls5vU2gSpD/CXAPSfqWukd9nRY9ForDdH1rdeXMdkcNss74MG87QBc6EMmKD7KmNwHZ7Jhn2O/bQSE1rpItGIdB3lVByFoJWTVCzt0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772692955417.8768618069164; Fri, 23 Oct 2026 09:24:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI39-0007cu-8S; Fri, 23 Oct 2026 12:23:23 -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 1xKI35-0007Tp-VL for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:20 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI34-0003AE-4k for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:19 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6E4g2215919 for ; Fri, 23 Oct 2026 16:23:17 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc8228-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:23:16 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93f322ef7d3so239905485a.0 for ; Fri, 23 Oct 2026 09:23:16 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a29cd9d09csm15959055e9.5.2026.10.23.09.23.14 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Ajir7S+iuMCY9fLagjetcNkEg7+rFaUjEG50RV42aUk=; b=YQit3WF+zRGNVcvk mlaxlG5pxsmKtFSCIy6y+5pY1ULAuhxdBcrZUtJmR54Zai55037IsZGdyuXBCrdT QsVbh/CIYKozPLwzvIdOZF1blSB7WQ+aRXoqPUZSijuGqAt73gnfAKi/RKBxtwLe v0qufcWZQZRyAxei+xz/q+wSp9bVH4l/wgeQQyhVLN8KZxAUv1Q4DY5UhS/UT2Od 1MBlgnCnXHUsvxm/i6j9E1LAqEqFNiRVpvHCS9zTw7tPjaBECeAEc+HCBfcgTJSt 4wUh/WHKVEPRR+ZRX5MkEkfpMJPLVJTKZK3+gPX9kIK40g3gyXOijKZUmZB1TQoV MSm3qw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772596; x=1793377396; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Ajir7S+iuMCY9fLagjetcNkEg7+rFaUjEG50RV42aUk=; b=G2JrJiOT2b7ZLfEXYzo7dZpAGme5pQHNhMOUP6sh3NrsTWZpFh0oLuMsdBL225HphD R7xEg9zEo2dY90VS934i+w4keStBOV/qXjpGT+F8zFnqGLnf2agQFyQWYzLn9HBb9ck/ cahWn+ztmLCMH7GsubxIIzbw5VOU9RF7Q5Pr0ByDFUzy7QyAkJNusmCX5X5iPQm6gu10 ewtXgucUnEiucf/c8GT4YaPonxTiUL3oJzFcVNbtzCFUvcZsjF2p77edfAPBsMyDHLVF +xwo3nuMR3wdNNSCj7tgiYGQLVX+eE+oJFwZWcvqGpV3GrWDzzNJ9sXMVkrqw6rL2TDC ypjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772596; x=1793377396; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Ajir7S+iuMCY9fLagjetcNkEg7+rFaUjEG50RV42aUk=; b=CKxMvGCOU08aLF2EhSjSnvPh7kFpni31rIvO8zYZw82Y/yPqjoiEJnYjE6Obo4HrVw RZLJGSCpFR235ptGoZiBjVD4s7u30ed8I58HZErG2KvAr4LZztGS5x/b8byJ5233vJid n2g0iC6PCm08SCZO13OGyjQhrt9GGWKHR7EC2YM72bd66jqyxA7hBf1rHhS8DOIsVxxL aFGup97P7WaN4T2M8rzebxoGMOG407xT071+FraFB7IXtOM1C9rOCDx7p+zf5iMs5F6Q u2O/CY2bpZ8DgBW/4Wb2dhIVuEX/4ZYKPqu01K7q+i10+ditG1JdtdqWfTBNY8xhUHgD Fk7A== X-Gm-Message-State: AFq9FYJdm6ym1zy/0+ocNYTgXQ/yP3zfxLk7jxKl5nHV5uNVeHjEwPfD jOrvbFi+KscEkoWf34tBTYF0GbLcWJ284Gc3CVABFbVRJ1EAMzts/kIJwBDTKO0SKqXsEl7odxs a2Q++4fYF88OD3E9iukVbyruPLnY7CwcQCLwHa/HYUrVwog8oGtrnOBYh68Ly58QChnFk X-Gm-Gg: AYBFou1QwTVmNLbf00iaMKbRpB9zx7zmL4L2t8P0pLJQlfCY/jGawpSbxBuN2nG/WWq cHbfmvV6+3bX7rkA3jL6KG26g7Sb+2GPIftGouBNS8007lDDR/PKwtCqXJa7MiqgqWVjNezCH6u dxGqvbRuQBCFh5AsyVQTiVaPoDac9orkWBFd2JJPHqN4bfmjLwEoA1ngWW7bl3de5n82FYlsvOY QYY7uzUl+0fUxjEBHB3sJgD0osQ8hyNO6WuuH/UQ0wQ5kRIZ58anSyeA5VqlNZesDub7FQXOPAU wHCU11iU9aOYpp2cVDES5TY7waCgiOPaFjMwQqm4X2Wl3/S9C+oMPUrChPj4zplJvSu81UivxTT /f+5qFQE4ZhlMZeackv2ETwFa6f7C67H4Ux9tBur+ X-Received: by 2002:a05:620a:801c:b0:93f:1dbf:6ceb with SMTP id af79cd13be357-93f6f585032mr458546385a.3.1792772596234; Fri, 23 Oct 2026 09:23:16 -0700 (PDT) X-Received: by 2002:a05:620a:801c:b0:93f:1dbf:6ceb with SMTP id af79cd13be357-93f6f585032mr458541985a.3.1792772595624; Fri, 23 Oct 2026 09:23:15 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 80/83] target/mips: Convert to translate_for_debug Date: Fri, 23 Oct 2026 18:13:28 +0200 Message-ID: <20261023161332.60153-81-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXzdB9l4rhmnOP vIVtaOAgSzcM3O+/a3Jc4cMppc9MATf+fwDld5QAiMNJjNV733vN0sptE2RfyKSgP3Gmg9A0lW1 KlPbLZ59BtPIFbYXc4HbfltULq7dDpVwMbLp+DRs+OaNaRUwbgaKeNOQZWcehYap4JO24eGEZJb e4BhfHI6RKjoHLbfqVEAExC05NkQHjSw4E/QFHATfetaIjbOIshK8SjEA2veRAiimP+3U1gUYiJ AcJuZX7UDnlcsEFeSOKT4apLCQYErNU/XL2smmMmX/MEZHXOGJY3IEsVnkPJ98hGY22U/piHqP+ nOzQ15Y82vU+m4TE8x2DzcJ5DWoQK6q+XB1YXrQejzgxdPBZmeDdC+UhjWpjEqjcWeHCyKaJVu0 mV4lJrVohfNJV9Yb+p1vxQa+NrtBP/88Z8cttHqWDj9ujiAMUYDcSyrKVAD35wn0sw80OdSQ2j7 L9UMJ34/MOufm/FK3jQ== X-Proofpoint-GUID: -kH-nPrXXrTUe8941pFrt5BTYYFOMS0w X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb89f4 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=zDhEfTcEUI2QNMyCiQAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: -kH-nPrXXrTUe8941pFrt5BTYYFOMS0w X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX0Rxr/ZcUfFAh 0MJ/AW7ohGhlJfhkpa/5kO1l+CkkKlthjj1vC55mSbXA22FNuA/JXDUE5ebLDhs42EvNWcG0iN0 fxcmKF0YFJQxbR1/7AMGDd4uTj/Yqcs= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772693749158500 From: Peter Maydell Convert mips to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20261022125858.310252-6-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/internal.h | 3 ++- target/mips/cpu.c | 2 +- target/mips/system/physaddr.c | 13 ++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 0c9b1335ebb..a302fc0c20b 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -118,7 +118,8 @@ enum { int get_physical_address(CPUMIPSState *env, hwaddr *physical, int *prot, target_ulong real_address, MMUAccessType access_type, int mmu_idx); -hwaddr mips_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool mips_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); =20 typedef struct r4k_tlb_t r4k_tlb_t; struct r4k_tlb_t { diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 759a4e93a0a..c5193dbc8e3 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -659,7 +659,7 @@ static ObjectClass *mips_cpu_class_by_name(const char *= cpu_model) =20 static const struct SysemuCPUOps mips_sysemu_ops =3D { .has_work =3D mips_cpu_has_work, - .get_phys_addr_debug =3D mips_cpu_get_phys_addr_debug, + .translate_for_debug =3D mips_cpu_translate_for_debug, .legacy_vmsd =3D &vmstate_mips_cpu, }; #endif diff --git a/target/mips/system/physaddr.c b/target/mips/system/physaddr.c index 746dbf8aa4e..6f11e70ba80 100644 --- a/target/mips/system/physaddr.c +++ b/target/mips/system/physaddr.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "../internal.h" =20 static int is_seg_am_mapped(unsigned int am, bool eu, int mmu_idx) @@ -227,7 +228,8 @@ int get_physical_address(CPUMIPSState *env, hwaddr *phy= sical, return ret; } =20 -hwaddr mips_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool mips_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { CPUMIPSState *env =3D cpu_env(cs); hwaddr phys_addr; @@ -235,7 +237,12 @@ hwaddr mips_cpu_get_phys_addr_debug(CPUState *cs, vadd= r addr) =20 if (get_physical_address(env, &phys_addr, &prot, addr, MMU_DATA_LOAD, mips_env_mmu_index(env)) !=3D 0) { - return -1; + return false; } - return phys_addr; + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys_addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772688; cv=none; d=zohomail.com; s=zohoarc; b=TwagAfLud9LKISpLh+rAIp6SF8owEptdqgyrZZGbP3qXC9Lnq2jfxkFsuVo/cwK2PPHls8cWTYxpKWuwM9tM08JpMGO4GUbEpfPddEM/bDMHOQoMGuK/fYKXfOVUXM/VBVrJfNV0q9wBY0nuvkWrgJdMytztCG0iYzHAydoX7W8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772688; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=03j8g5aUIgadKLzv4Szplf3KH1eWTKQPWnvbYhYyolk=; b=AN8RV7bgNc+UodYQuyBISunBg12VoebUE2kevbij1FBpZSWWDBx7N7+5m1gtpJa5+BWFU2ek9cfy0U0dT0DQbC86iNJjGXpWvHvJkw2MQVXWjXQSsC6yb0q64T+xr3gUtSmHZR+jBszfEfna7/2Ci6vwMJTD+hbt53xPp+W19dk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772688514365.45466748546664; Fri, 23 Oct 2026 09:24:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI3d-00082q-4d; Fri, 23 Oct 2026 12:23:55 -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 1xKI3D-0007ry-S8 for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:29 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI3C-0003Al-Bk for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:27 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG6C5v2215802 for ; Fri, 23 Oct 2026 16:23:25 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgatc822t-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:23:25 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f1f2fafeaso140600885a.2 for ; Fri, 23 Oct 2026 09:23:24 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d42b275sm934215f8f.55.2026.10.23.09.23.21 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 03j8g5aUIgadKLzv4Szplf3KH1eWTKQPWnvbYhYyolk=; b=YOlHp/ClaHzZqELu dlIoKm9x3jvhwcxfPyOXXl6L5eydNckBIFmoaX0j3CB0/ljXdLnjIE9KRBahs86x PkDMSf64tJdE9tnePgMH9V90oepCTd6htY7CejWCG9S0zfxxrzxI0tDRrcCI5ZvM qzZXxCv7NLQRJWknjqpYteYNATjBAApJLIOhrwxvmgl+ITnz2KpoiEWn5Z43/v4c Xjsc9B330iQjw71zSk0+eI1dz+9xs86NWkBK+s2aIswW/L0d69jdx70SewgWpwkD Xt1xRFSyKlb9qwp4prFvy9r1T+6zypKEVSdVBafGlJZA0aqUTqr4o1Kq0gZwG3VA 6xLuuQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772604; x=1793377404; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=03j8g5aUIgadKLzv4Szplf3KH1eWTKQPWnvbYhYyolk=; b=OV5TsVF6gTTXIYOBh01s8w6nGIR+e4yWEw5m5Dn0i53nzE3XkXOysKk13FspdWWuye Gu/Q80Zy2RNYKHlGhec/z5/rKPEgLsKI4wq6FiYgc10bZ9gb/ZQ8EhjficPHAdTwy/O9 kBmAYKY6PLQ+fzASnSxSvmgErWRmwnxD0+a++rxXo/WEGvMB1WYW9PUMH1VDKnRos1Xg 65CbZtCaQFM0R1yVV0eJ86jY0xiqi5IgACwuAHX8kGs6mNYivB0Zt5/Tyu0jTv5fhXM+ MUKMmhPcimeDzPdoa4JbXhqyAKHNYMrrnvycbPR+f8pu+0ut89Jz8uM4a6Gi+SWHWp3r c+nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772604; x=1793377404; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=03j8g5aUIgadKLzv4Szplf3KH1eWTKQPWnvbYhYyolk=; b=W95hoSLAaOV6QjRJw49kLOKq3zhD2DVFQNHLj4sgihcwvnxGlFkFnWM5wzoc+aYl3K VXmiHnCfrdfTBwAUu4yN9anzNdHMZEhH0CtnBiLFvHwcBNyNv11/ItngIYUbdXRukxNz KqgDrArwihfVK6mwczsgWsNbOO1bJwqNLRDaW68vjBE5CoRk7pVPXKiIIFbDSN3+HdDs czV9CGXSYlsCbCBv0ph4WKXLqXriL8JMFy4h+Pd995wmj1t5dRDS4EcIJJjLMNbiPwxC 12LYgjUNSWxWL26sBUkNidULpGCUnRb/aX4veJS8QRlRbdi6fUYi5rAEVlQwH4+yt3I0 IjDQ== X-Gm-Message-State: AFq9FYL3KfD9XcMMYJm/n+nRN5jg1Hs+Nx/LFhUSZCM99iBGZHuKwLyh FB/lJsFltOpSIUG/b0NNnKkh7PPfeVoUB2DMfxNsWyRJ7EvlS2MGn7x0UKYWhMRy/Ea9PGBjx/c UcYng9X7fwjtdLlruu2C2T8NHwf2wvyemao7F1jAi2o/9CEGjgiT/kXyZVjLPu75DE8LB X-Gm-Gg: AYBFou2oXHq9fSEdbra15yjVMFPcSGD0MuA7QNyg6xQnDtBsL791cXLVL3040+kBkow +4+2MyaI3b2uxw9YaD5fXgVMukNmwvy5+U6UfBpaNB92iTHnMcr5fZGImEpxdUGeP8C/uEnJIg2 FnmBkSSU/p6LBQLr+UufYqJv3gpXno2x5m77UavTn63FKB36c6gooXWt71skIS+Fuhe+to5zKP/ BOSJL+oouM2k20qnS8bzAU4OrwCKIj+ch8V0S3tHuXa9XLteNhzdCo8O7m3kXo5/ZPUSSCaHU8P hKJkQ6jnXsKLWR65KUdEi5sKtGeTgCgqVmotxYSwzvPKSXgurKwqBkd2qnR4IiUPE5teSVQQjki sVSntPqsuRh1rf7SfWZ8QuIg2+k90tcogqGsGn8EV X-Received: by 2002:a05:620a:6c0d:b0:93c:7f48:8f46 with SMTP id af79cd13be357-93f6f79b469mr475484685a.4.1792772604405; Fri, 23 Oct 2026 09:23:24 -0700 (PDT) X-Received: by 2002:a05:620a:6c0d:b0:93c:7f48:8f46 with SMTP id af79cd13be357-93f6f79b469mr475478985a.4.1792772603735; Fri, 23 Oct 2026 09:23:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 81/83] MAINTAINERS: cover m68k GDB XML files Date: Fri, 23 Oct 2026 18:13:29 +0200 Message-ID: <20261023161332.60153-82-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX9/c9mQelel9y Br3h8rvbhR314ELeDuyMRJ6p2d3ZYxEh2FfL8UCaAHYnesdu2zKjlm7OFErYpkmn5j9QivIzDAR yL7SgGgYHsJGgJVW/WVTBByQNVjqaXaez1MJQKNiOX6IR9clSvaWbab8uIzx5Q59Kcj6Ox/cRSU /KXF6PNNjoPKHTZ9V+XcXS2vmyLilBSNssk58I63YZjPmDnIezCpOOhgU1ZxwhVJ/mDq0z3bbRK jErWvQoQKkKBUMcWLW6/wkgS5iDXLOV1niNPm08yXH8/DGbBFxRwenevIfM5jk+OCIDUQFt61Iv KFdUOD/dbQcjiJLE4WHt5/XdZgf4Me0eeBu0sIE2NdgdS+ZOaHfAD2UEGxH+4FyEaJNrULXoyeh CSXxMc0J+MJA27RriItTkss+LkQaFQbHtSOf1rfh7yzvzqXMMLCpLsWLFjvWrS3d9W27tA2zszC SKEX/pB3xSzLnGMGLtw== X-Proofpoint-GUID: wb-aeRs_-KwDeN3LuTSRBOKT8uLjS03n X-Authority-Analysis: v=2.4 cv=Scxi5fRu c=1 sm=1 tr=0 ts=6adb89fd cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=20KFwNOVAAAA:8 a=EUspDBNiAAAA:8 a=cplnpDx6AAAA:8 a=IoNqaDBMnLll6KUDmakA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 a=bHwCOBSOUrNypjIvOSWD:22 X-Proofpoint-ORIG-GUID: wb-aeRs_-KwDeN3LuTSRBOKT8uLjS03n X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX3I8bVHLDRaHI FhK5rxKLX0mut4tulQysh8D90Ad7995UPCN9U0QvlhT5VzDouhEnns7qVuf+bfeEE+oT8RJJ3RY wW5P5at7nHESLbuPpAxKoSySut5oDjA= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772689618158500 From: Marc-Andr=C3=A9 Lureau Add entries so changes to these files are routed to the m68k maintainers. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Pierrick Bouvier Message-ID: <20261022-query-reg-v3-12-7ad902b9a7cf@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d9209f043f0..b09c54f9ee0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -302,6 +302,8 @@ M: Laurent Vivier S: Maintained F: target/m68k/ F: disas/m68k.c +F: gdbstub/gdb-xml/cf*.xml +F: gdbstub/gdb-xml/m68k*.xml F: tests/functional/m68k/meson.build F: tests/tcg/m68k/ =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772709; cv=none; d=zohomail.com; s=zohoarc; b=hkeR9oxsv/Z6y0CSJNUQ0mEH5XpkQWHmrskhnrgnejZg64GewzOvAISHbCV/bmt7N+sjhvmQ6Ix9wu7J6sKcNXXYfuac35vPve7r3aEP+rW3ig8DJyqQyqKcne0si3cX/b7WwamT7U27KWhGDIu1BYLng/5okgIBaZBQpNL7uGU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772709; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=9g2kSnPsen9wzmsMJTdNE2cj4Syh7+oSRmYGPn/T9tg=; b=aHDHRz7SEUPMYlhKInqOcvdJK2ccOF164R6J0ZYMspASZ7wYc/ExbiBQMEj9qAGqAaNt+yH70mSJaNSDIJiTBKxsanzDlQ9tZ7wh7eAwNZ5eFqaKY/ORSwuzUE60uRu90FkbAjT/7AZOhN0SYNV6vSgp4iyLR/GsLEHdzDWkU7o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772709082711.9581527065332; Fri, 23 Oct 2026 09:25:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI3f-00088V-BM; Fri, 23 Oct 2026 12:23:55 -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 1xKI3L-0007w4-Rs for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:42 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xKI3J-0003BL-4Q for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:35 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NG3ldF2931048 for ; Fri, 23 Oct 2026 16:23:32 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hgas6r2cu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:23:32 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-93c5ab5c136so169162285a.3 for ; Fri, 23 Oct 2026 09:23:32 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d3eefacsm918144f8f.9.2026.10.23.09.23.29 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 9g2kSnPsen9wzmsMJTdNE2cj4Syh7+oSRmYGPn/T9tg=; b=ZjLiR1IXbKbGEhtc o70N50yH/SEdp7TniKk4le2XCox29dA3IJaEqOCrA3nqXxzBzXkWVIifo80yNTda TzDBTG7sKRDW0qzwg09Ck7CjJXPqN1S53ph5L7htn6khmiP0I84hWnba7DFYFJPE NgbGMerW1Yr5XEBfflP7wNM1TtOL7DjtgyrRyDpbf71MzkV+RquWjO+tvmA4kd0/ KfeepTPZzCLJLPXcVrlGiNky8bqo+RXx9KPs/zIeOvaRNh/3LofRanW9Vnoctj3A Re4Cmu9NsqS7r96ZWogC6hPgA9GBhPu1+DLMqzJWtybtcY/z2YTIqdovDAN1NnDu 2RzsNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772611; x=1793377411; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9g2kSnPsen9wzmsMJTdNE2cj4Syh7+oSRmYGPn/T9tg=; b=bGlNPs3ESeeT9hyd1qKOjj98nPUwGW+FQ2dYVNij7pS/rdXsVzgM9YcyvRw9wOoG+S Asn9HFGgoA6YGL6+hfzDu4zTCliooBs7iq/3mh7mZIY/E8sdUGLJZXUWK7zPsVkuRD3B TP3/H0EJS5k3UGk9U+0WVg7zGOkUWVoI2S3Nkenc24rsv35f77vNL9VFeTkgKkhXIrg3 oyTfu1Sq4rbyf7ghiLWddJOW3OzoO7Wx7+AsImXAtcZxFcG08P0oKvGGFYa8FT5PiRhV sqjWGRrotH0o3LT7kblVBqGT59V+F9mGIfIShzaFdmLfofHfoPwfEaZbU+peFWy48cd5 B0og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772611; x=1793377411; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9g2kSnPsen9wzmsMJTdNE2cj4Syh7+oSRmYGPn/T9tg=; b=hsRpHbaLn6QoxKjrnByP2oBzS887HoWGgFtp/OlvYOMLKxxZ7cqyXC9xaZfyAUOhCJ VslU7dnQPuEQA9aNBvKyoej8Tp2QUv2UZ4Bf6MOJb8Kocl1vZdIc8waY6JyItQEP+T+Z uDsY0raBz8Ioa0FozrQu5yzdYXerujy5HnlqLybkqGVmVct6HySAJ1bKbMd/Mj+0eSzd Ijt1Kc2dtBOBZcUmAfCSTzQw2W4wRJiFliCdevI1HizWIm43vW5/jaOk+tvgZhMeMFJs L39iQS5QGeQD62CntfoO/lpK4KcbCwDNann7rOQ6S6XRp4z+DRLs+2h5TM9qZICDE016 lsuQ== X-Gm-Message-State: AFq9FYJQ/wRTEBIV8UQybeAGP1zeJLj7DwPyTuuPB6blAAGZ7uRtGFlN mkr47uvah5om8SnI3Pa7bx2EDg/H3PACCFIiNB2iEQ+cWiFWzNEENOuG3PFToooXsSwD+Si67Fk micwU33X0vFSoQgD6ptF0owiZHkveQyGcPoULYMxjwc3NTMBCLM8Om0AnkgbMziohB1kU X-Gm-Gg: AYBFou33V3OIPpZWDmb9Cm+k8/IDNJWlTS4C+gQK5HkN2PCoFotId11lvdrF5iKe3R+ OTP6DgJ9gElEpndsHlVUmPUzl2rUlPOs+63lHs4XkkgLPNaVv9KYPiIjd8UgDWC+H5KwzB1s4iC HDeT4oCa8rKPzM2P5hKMI0yPy9KOF6HVVoJ/kwc5JUkL0wZ5crD9/UyRlhfBlEWFs+KOeP76Dg8 /b+vnRQtUXum90l6FvoX+WGDV+dESQG4nuTVc0ndbjlkvdVIZjkP6owPAlqAmSaEfz5dAY/Jg0r i3fGO+3SsGtqDyLYwjIm4dRFsLxWcCmY9RbwrTiRD0TqwgEFMH/wZcdoD7dA1rdllk4udWWr0wU FeBHXAE4CSxusZH/FiOvJ1bwfQ2GXYRwVvY2PmguS X-Received: by 2002:a05:620a:1d09:b0:93c:a191:88fe with SMTP id af79cd13be357-93f6f55abedmr488077885a.8.1792772611382; Fri, 23 Oct 2026 09:23:31 -0700 (PDT) X-Received: by 2002:a05:620a:1d09:b0:93c:a191:88fe with SMTP id af79cd13be357-93f6f55abedmr488072785a.8.1792772610836; Fri, 23 Oct 2026 09:23:30 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 82/83] MAINTAINERS: cover x86 GDB XML files Date: Fri, 23 Oct 2026 18:13:30 +0200 Message-ID: <20261023161332.60153-83-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX7Rx/tdRJYOgD omnr3XmnF/FOXE4Jq7O6GPhzjt2t7FeSh8FxIVmtOXMJDYNHngrQ1T/4JbzRLFfDQoReRn0Df14 d3CmOI3Dgl5fotViptZr+RLqraPvJltsJN2DDSZy12aYYS9yHviWbbXDTj7xbblNCgH2ifftqPW lNEAV+IgYM6WUdOKftH36tP6QGGoQCcuE53qJrAIuPEQEQ5/+4OK0EiwFY6NgehkByK9Z2IxJW7 iQpdfykOaeHdZXVnaMKqOZTpaAP/vLiBpwyLQF8SVxQGng9B0tx5ki5rXVgNsPdIsvxUg9Y8P/K IHA/DhXNXsirUoHWyWNNdup8LvolSHiwWFPzfKIe/p3PGrcE+OpPgCl+WR7cO8K+zZDZCZFvbz+ BIrjjb4BOghU3mxRZPICDaUkB1hBWKo0xLtEzljIsb9MWmRCM9jF7B3FJaQCsEsE0aJN+ejU7gU AqAUNl7ZHWbvDXYHnXw== X-Authority-Analysis: v=2.4 cv=DK0acCNb c=1 sm=1 tr=0 ts=6adb8a04 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=20KFwNOVAAAA:8 a=EUspDBNiAAAA:8 a=AC0s2TdIQzFrwImDGQYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: GdxJ6LyV4m3rEho2rYLeIJaQjJBiA961 X-Proofpoint-ORIG-GUID: GdxJ6LyV4m3rEho2rYLeIJaQjJBiA961 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfXzqblcoIutfCB cNHCQ7gqCXSLqGHhImQijLrmerpo+2cQOOHbG30E4OWoVGqLWdH/LvE4KG1n/rh3kSic5dD1I1b 53zFtQsqppRsOSiXC7skbO0UX8xZFwQ= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 priorityscore=1501 adultscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772710040158500 From: Marc-Andr=C3=A9 Lureau Add entries so changes to these files are routed to the X86 maintainers. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Pierrick Bouvier Message-ID: <20261022-query-reg-v3-5-7ad902b9a7cf@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index b09c54f9ee0..de3cb9dcaf2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -149,6 +149,7 @@ F: configs/targets/i386-softmmu.mak F: configs/targets/x86_64-softmmu.mak F: docs/system/i386/ F: docs/system/target-i386* +F: gdbstub/gdb-xml/i386-*.xml F: stubs/hmp-cmds-target-i386.c F: target/i386/*.[ch] F: target/i386/Kconfig --=20 2.55.0 From nobody Mon Nov 23 04:34:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1792772692; cv=none; d=zohomail.com; s=zohoarc; b=MbaMulasHNI7tPQQZjPOtCdzzDJk8JNwra5/3NtWf5GonCxuEdlU/wVRI4U/SDfcbQG44RZS14H1yJhst3pkHP7epNk64+sikspoIEjtQegrSMi3CIIwcQ3w0vU/Z4mzLquOJjq4x3K5OJPsmT6a9pjoVmwzDGwWq0yh7f6qxAo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792772692; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=SLURXAXV9LIzQqyUPzZSTy97PEo8fESRCNPoOtbqhcc=; b=DjWPQnfCq9uIUou/6JpF16Y1ApcuodlwWtP6Sk24D8RByABeaDErXEQ9Ci2TQmUcx06a0kCss34TvD0eXe8mTQn4O10dzVw2fGK9Uxtb2i2TM2KXdzNvMRyhLMwtVvgbYFwafYTiXGXApHFJf0e1DBqOy4GjU5lPO8MOwrgH2xo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792772692343265.76927197066266; Fri, 23 Oct 2026 09:24:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xKI3i-0008M4-5f; Fri, 23 Oct 2026 12:23:58 -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 1xKI3V-00080U-BE for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:49 -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 1xKI3T-0003Bs-Ei for qemu-devel@nongnu.org; Fri, 23 Oct 2026 12:23:45 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69NE6rC21492221 for ; Fri, 23 Oct 2026 16:23:39 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hfsmav00h-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Oct 2026 16:23:39 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-9308eafb465so309366085a.2 for ; Fri, 23 Oct 2026 09:23:39 -0700 (PDT) Received: from localhost.localdomain (pmd666.hd.free.fr. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d413c00sm753157f8f.40.2026.10.23.09.23.36 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 23 Oct 2026 09:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= SLURXAXV9LIzQqyUPzZSTy97PEo8fESRCNPoOtbqhcc=; b=pcwqofLBIN4hxdRD A6hTXJLwnaMXZWBdc/ZvBSijoLg9ww0FvDerz3oKhnRlnjpKLPAa8Pl5j8h5i1Vp m+IRET+9rREGUJwQk9Xy+IgVX8u5iqALtQPaWT4JyUHKuwfzS6nMOcytUPnUpZm/ nHW9IjS/Shdv7GRc5Yv08XwPKlEPlbumL1/7l6KEwul2MxAtaVme4cEG2anzHsKV pJfSYV4izleBaY9avSSHa1z1BuGl9tIFQbruj8LpUutC3ygvHq8NDzBNbrVBS10M w5CSF0k4ndCryPSEMm4T0WmsI6QKzZpc3qgHPuI3wSre4IevSxunsmktkLxiU2TM 0FY2JA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1792772618; x=1793377418; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SLURXAXV9LIzQqyUPzZSTy97PEo8fESRCNPoOtbqhcc=; b=jaXop/1VZvZ4jP/XDiDyGmvyjmDp1BKVv2/Yg2dUQc2RG/lCS0ZZSfKyoUC4BUwZPq ibwrPVcSe0Z/sM6tvl3rNVa8VqmIbO0uMMzSDZ25w1i4w5ADiyKQlBBRJpk3LKRPPpvn n/CfurvHox7wpKlvjlLJNdMT/0FvsJKUBU4ycR0jMssMQ2hOUJ0TaQoXRCI1mfkgV+b2 WF62HtY2nwCxwjxxOOB6NkuW7mIrnoVJg47U7vf9FAjaupiMx6b11NcN1xqxRMV7pVom 4W2FL29WPYWgoUItHLU3Jxyhx8Ahk5tNToyxhjs3UgvG4QNsc8eZQPkvgCSsZa9K02Vz 5slw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792772618; x=1793377418; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SLURXAXV9LIzQqyUPzZSTy97PEo8fESRCNPoOtbqhcc=; b=FjQS+uWk3Mcdez2ZtpI58T9z5l14DGnIeQJ5fm8eXQGh+dvOIW21YoNh3MujCskR3Z 72potcWVkcFFe3LZWjREO/Gw/d8t7DYsfSry446+tN3WKTG7lpOgt45yOz8vmm88zraH 8EHIQVAoXCZl324YsK9GuoFz0x6RwTYdJoEPwyAzirnFu5FjufEz4VMsvZdl4yNOqTzq H0I9y2Blu4sb5lSLbf0/SjGl6tPPUbFvLUncpJuUefX8ukZUFUCD9KEmZy5OI2k/UEiH fvMMywzA0B5+YWBrEh4W2OjZ5Dqbn18mTk0PAokSKt/WooRn8CD5+JyKhztaoI2OswYx d1pw== X-Gm-Message-State: AFq9FYKMLFKCKtXx6F7C1UMMenoTJN3HB4nelJAp1FglNrPMSYFhQtlH ZMe8zxJ1sxm+hNQXGGAS90I2i2qdLpamtQ60u3F/L0j1PEn/js/E4+fLUeLK6g984AczjBxtr2n TjgLDoh6FcGcIvtjgkmLibo0JjI2ruYstOWpE5Q+s8cubeLTciKdmA/pnGMZHxFwPuLyy X-Gm-Gg: AYBFou1QfkY252wX0nA6G7Jr+1/HRgBs9UcONG58Xo+5QrBMYJUCtq044APrWW6klTZ PHUOfWiP9zeDNT5FIebnnHr49FDJbz/2Kz/Q2/cZC6XwB5GO7/GIhFe/GvKO6U59jYlEhUNEXbk Ig0AiS34Q7GF0SBFmmj+OgjnDsVH9Ghb+xMGZ/afvGE+v/m/NMrILolLTIH8HR4UXiOyTe+f81m I9dUek81CW5st1b7SFEo4BkbXCVnudyVqlofwYuDmrvXUzSIQV+ck7+UDcE+m6ycb1YtQQAmzDm 9l9ME3WuW36UuDD36t7WGux2yVLBhFPwdo+lp9bs1FGyfPq2TzZBFXQSTgF/1BiE+8a4NmvFNpL KeVtz1FIXR2uWQhz6XkfTtp4p0ZnewNRHa3DRdiHe X-Received: by 2002:a05:620a:4712:b0:93e:869c:43e2 with SMTP id af79cd13be357-93f6f9a2bcamr507725685a.50.1792772618575; Fri, 23 Oct 2026 09:23:38 -0700 (PDT) X-Received: by 2002:a05:620a:4712:b0:93e:869c:43e2 with SMTP id af79cd13be357-93f6f9a2bcamr507721285a.50.1792772618005; Fri, 23 Oct 2026 09:23:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 83/83] MAINTAINERS: cover riscv GDB XML files Date: Fri, 23 Oct 2026 18:13:31 +0200 Message-ID: <20261023161332.60153-84-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261023161332.60153-1-philmd@oss.qualcomm.com> References: <20261023161332.60153-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V7LoQuni c=1 sm=1 tr=0 ts=6adb8a0b cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=20KFwNOVAAAA:8 a=EUspDBNiAAAA:8 a=Ii8euAZ9dv00lu50D7cA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX6bNV8Om9gJHa XKNwSDWpc+lmG8YNRx2txyVo1KsWShaY9Y6D4bhS1hd5r1mvEJ8knwE124GWRyBcKipG6KAF4vR D4y0oG5ZXDdzP7057XxNarZ6G2Ywbp0= X-Proofpoint-GUID: sWw06dV2giuzBeOH7N42_1SD7Pkzp_5g X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NCBTYWx0ZWRfX1PXVAKK6Ml+s H59pfVDXDTTXkQUPUSswbdLN/qFMZkZYBJgvIV2cdEMWJxEeKwr8Um0Zqiv6/0CrMUXILCAiocY JsCmXDXfib6PmbQF5rp3tX6dz4gPiuzZ2LXfq1qzna985/InXUCW3SgVAqK/5D4nS/Pzfi4zxPU x5ffI5ISAsw4CGcBg7Sr4l+zUqlo1wD9oUNxZukXCar+dmEPCRkRzUk5mWLF/fdY0qjj3+yVu7s NSpq9VX9tmqjvxNOhA2ea2YXlsl2nPJ1hlsTdJ/kCiSRE6mw9n+2xN8bs42ykTYSSmGsQTlbTpy mD8nCGiHvBZMDKAq9+qWkjgcUjJlAABLpXV9mlTisb/FoP/zRZ5CMRTTW4XjnsrXxbo0flHwlXt lQDUxMHX8X1/j9uTWm9J+LBXrnXndua/wuk0z8XREa7bsnYG7f0oDWGJ3Y7WaTR+S7IxXO0S8p3 n6wFyEYkrp1z7TLdPYQ== X-Proofpoint-ORIG-GUID: sWw06dV2giuzBeOH7N42_1SD7Pkzp_5g X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-23_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610230064 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@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-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1792772693710158500 From: Marc-Andr=C3=A9 Lureau Add an entry so changes to these files are routed to the RISC-V maintainers. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Pierrick Bouvier Message-ID: <20261022-query-reg-v3-16-7ad902b9a7cf@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index de3cb9dcaf2..010539dd358 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -372,6 +372,7 @@ F: configs/targets/riscv* F: docs/system/target-riscv.rst F: docs/specs/riscv-iommu.rst F: target/riscv/ +F: gdbstub/gdb-xml/riscv*.xml F: hw/char/riscv_htif.c F: hw/riscv/ F: hw/intc/riscv* --=20 2.55.0