From patchwork Fri Mar 10 22:09:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 661655 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:1b90:b0:222:2e2e:b2c3 with SMTP id e16csp15120lty; Fri, 10 Mar 2023 14:12:30 -0800 (PST) X-Google-Smtp-Source: AK7set+Tb2eVcwLPsSpmSwR+ZC72/qAc0ejQgMiZBckb/rJR+l9lYNIH/dDYdBzx8OIB6t8pdDb/ X-Received: by 2002:ac8:7f84:0:b0:3bf:d9ee:8822 with SMTP id z4-20020ac87f84000000b003bfd9ee8822mr10311990qtj.36.1678486350086; Fri, 10 Mar 2023 14:12:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678486350; cv=none; d=google.com; s=arc-20160816; b=zDMJ9MKwrNORbp2Sb0ub1RrrPr31nBH9Po01k8sWoYinDkosXnczZ/pPl+dGX76l57 9KZppzbKEeEMqUNvHNOBy3RHElD6minAsMGPOJ1aHtfUnzhf29VRHC1cdN+lvEVMbOmW uXCk9wsDbFfm849ajFKFR2rNYIWWV0YByMviszFFvCfMflUn/tAIbzI900i0IvV/hFxw Tk3g0xMHUQzohZCE345nyAO1R/Ev57y2r+4fgDUal5ughg1JhPWDasDKqpxG8Y28PPE4 Bl0NXL4AzqFpQD1EOQXKG0uafWJNnNCk9fI2GRm6TDFf8m2mVgIDPxM8m2/soL+F53QZ Eyhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:ui-outboundreport :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=0ZZ+tPgHVSYSmK305rK7KZRTZCmOpPPrDTUrn0qkjcY=; b=Md/3TvScSbc2T8xhC8zS5G/eEakYAWtC+6p5s2mx0fpjdU9RU/oRsZfJP1x6X5EGKD Y3R5a6iKq0jkTyg07Fhh5GQoZMbzmujX9UDmyA5gp7YXNXAZlRx0+sDG7KVyP6B9rtB3 fINceMdQRJgAkCTyFbG0E9lVt/uf9jh5H+sdy6QPa+Hn06IB7AHGwYb9H1sZT9ozStdF LCwYs78WeDlpCjDeqdQknNw8gIPjlckOoFAmAfPUtbQkh+qk+PziV5rBZPf9FaDxfbm9 3ULV6wWCrOLVw4p5RW8kfrjY2ARumtJRJAqVd38jWEpsWfNirPfg6eocidnLSaZXbg5a TEsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o9-20020a05622a008900b003bfef95515asi794026qtw.43.2023.03.10.14.12.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Mar 2023 14:12:30 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pakvo-0008Fr-7O; Fri, 10 Mar 2023 17:09:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pakvm-0008EX-DO for qemu-devel@nongnu.org; Fri, 10 Mar 2023 17:09:42 -0500 Received: from mout.kundenserver.de ([212.227.126.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pakvk-000331-Ol for qemu-devel@nongnu.org; Fri, 10 Mar 2023 17:09:42 -0500 Received: from quad ([82.64.211.94]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MAOa3-1pgUDh1yLj-00BxOH; Fri, 10 Mar 2023 23:09:38 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Cc: Laurent Vivier , Richard Henderson Subject: [PULL 19/28] linux-user/sparc: Handle software breakpoint trap Date: Fri, 10 Mar 2023 23:09:18 +0100 Message-Id: <20230310220927.326606-20-laurent@vivier.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310220927.326606-1-laurent@vivier.eu> References: <20230310220927.326606-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:uinLufA9+QpEWx0rvu0QzlvVtOyW5M/ZpPMPDssj6w3j2U8+/Nd lvV84qdaMRnaUVxmCMYAKkZPd5thDkzNJZYmZDuFsGiIgAZG1iGYmpOhJWGd5zRZeB1B/Xb Pc33dbQdlio7XkKY/zVecwCOZRMRz2q5j8qWapLJ2Nkwv1/CnKkMPgNAJGF9wtX2onkdQ2F uqGbk0ErITuDGqwRk+o3w== UI-OutboundReport: notjunk:1;M01:P0:xdQqFgzZDHw=;CMDBuahdiGdndJ+3eP6z3YhNoA+ luUtUXUSGE1xK2MFiRCwj4yPaUlLxW/Ws8fHDxAq7fRsXxSDRiV/0Z1QlAmbrX+uGixkXA38Z JBKUqFm0VCBtUFFEJkzusiui6ZCGnCpzJiwWP2rsAwchRFXtG6WokDBUAnHOjaUcrJkoKt37/ xxwZb9xzSxpd/BWfKN5F0cerwykI27ZQKLFrfEahdAHZ0dtjCDB4xa5ao+biYt5Iz8uZXxXC1 1migLNT8Gg1it1T+6++bZADeoZGWdNQNDcntEjC5kkDOvCb3EXXdsl82jXp4V3koqHKinOmMD FKi4Aao14gllsAdSaH4GLkd3JY+tQyOUmsUQ3uvoTJeNs9u8j1HXxgzvebuIVKsMIdmpxwh2W skvjq49Z1czTYs5fq2Tu1gVmSKWuESLckpysZvLnwOvSTqN28Xc130eXTSWxkTYCExGXcSqvN OyNM+YIVbY8alpNA5nij1khx2kabzxjcBmTBIHAoJ3AhCYWPZHRIvEmhDAiO3ttTOH3irRg1l xGnFYC+WC4zmkE1nfyHW5DKgnRO8FVKijdacyLJYtpAU92xm4dcdKpeqNlru7aGe5Tdto+OiR tIrNct4NoeXIY6W+0jkp5qq4twdRyzjydl1Q3DcBz5s630YFUco7bVV5ILM+CqnOy4RYOrzPz 77C2zh9lQl9QD+U1XeKhvy3LP3dkdzO8MHXOA1JB6w== Received-SPF: none client-ip=212.227.126.134; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson This is 'ta 1' for both v9 and pre-v9. Signed-off-by: Richard Henderson Message-Id: <20230216054516.1267305-8-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/cpu_loop.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index edbc4f3bdcbf..c14eaea16370 100644 --- a/linux-user/sparc/cpu_loop.c +++ b/linux-user/sparc/cpu_loop.c @@ -206,6 +206,11 @@ void cpu_loop (CPUSPARCState *env) env->npc = env->npc + 4; break; + case TT_TRAP + 0x01: /* breakpoint */ + case EXCP_DEBUG: + force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->pc); + break; + case TT_TRAP + 0x03: /* flush windows */ flush_windows(env); /* next instruction */ @@ -237,9 +242,6 @@ void cpu_loop (CPUSPARCState *env) case TT_ILL_INSN: force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->pc); break; - case EXCP_DEBUG: - force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->pc); - break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); break;