From patchwork Thu Feb 16 05:45:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 654014 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp178171wrr; Wed, 15 Feb 2023 21:48:50 -0800 (PST) X-Google-Smtp-Source: AK7set/aEbax6/BF+Likr8YPiVkmDfhnws/NS8Gj3U9znsP7iLfzQ/KIrI5o0lvUg//ih7aQV8TG X-Received: by 2002:ac8:5ac4:0:b0:3b8:2e36:efd with SMTP id d4-20020ac85ac4000000b003b82e360efdmr7518970qtd.55.1676526530658; Wed, 15 Feb 2023 21:48:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676526530; cv=none; d=google.com; s=arc-20160816; b=MciIeMObO7RsJLtlbEm2QhdyyCkVWaUyAjYAE/XWbfEcxIBT60BQV3aiLcAjTRvZkR DBzG7LrV5uYn3GflgrxCOF49kmb+pgxPVQ1SmbIrkuJY1HFe+JwAlOKGtju9IfyxelM5 3k7gp2VAYihOfAThfT9nRQ6msqCRNOzQv/jBdvi8cT8bTC24j1sgszqJJMW0MK+DZVPs Ma97pbRY4FeLYsv3pfC7WeYKpUOJT4mlTX6dKktim+J6cAMoj+Xisr1RtUZwzNQHI0fP LlpRrqYYwLhBYv3MTnOqs31SwMIjFwJtviPTuI/Eu2rhZpWffwVBL+M5PtH2h4OciQXj sxQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nwwEZS3IY8awyA29AWhLSBTJfEFo65LkYzhDCm7Aots=; b=MwrQg5n1h7OI21x4IkUkoSaQqBTqnXcpguEW8akunKN0mKH+wFosgKdPRMArGeTbsv eYvirpqH6TiORgl85PT82lF3icOCRwe7NbSoEr2W/xhCP9NNJwybiSCQdaeNOCaDIrpD oK67wT2FM1U2r4oq4+53UQcq3MzQh5nFaZuaxrmWdFU6xEr+WlSY7A6WewH4qCG1+6Cs yBNQECOlAVSbNuBsuf6YVpZELrfLxihXuSotxVy3talHUIdRTcfyT9Cjlji9+4jPIna1 8ZZdSIy6CTGqS6iAk0MWQY+nEqvbNm409bbV6U2PQFpaEQ/haEBQmLs68yZFtCTMXQAp JSwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q2qsPbeH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m1-20020a05622a118100b003b686c06bf6si850770qtk.384.2023.02.15.21.48.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2023 21:48:50 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Q2qsPbeH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSX7p-00045g-IG; Thu, 16 Feb 2023 00:48:09 -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 1pSX7n-00040b-Ks for qemu-devel@nongnu.org; Thu, 16 Feb 2023 00:48:07 -0500 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSX7m-0005PY-0b for qemu-devel@nongnu.org; Thu, 16 Feb 2023 00:48:07 -0500 Received: by mail-pj1-x1036.google.com with SMTP id gd1so864172pjb.1 for ; Wed, 15 Feb 2023 21:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nwwEZS3IY8awyA29AWhLSBTJfEFo65LkYzhDCm7Aots=; b=Q2qsPbeHO32QlZccTd8vPfrj4vY4qHL1tKim9kQChPhw+ommKTfWdM0+sYikGZ4/u+ fmVllyIjVzRCTWDUQu0zE0+QhXSGTvRs8bxD2f8YODOjdtn0o8zgiLtfZwy2bCGOBcrX m/gIBbMcj/QcgZTywWMMSjwWoUgxLiGPme/4bwVj2D6lbqet4ZdZhB+6Puj9sdcNWAAG eTPXHI3TxS0d9EOqOaBomAQr8AyD1tt+N0WZD782C04yz0/uofuPHExexGweJhaCrc3C IWGiaRW72KEa88CswtsHLSh0WX+08/wxZ3Tf/OuUWNG7QUSegv4m90c7Vpl3hpT5u8wd ljlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nwwEZS3IY8awyA29AWhLSBTJfEFo65LkYzhDCm7Aots=; b=M/7FcT36CzZbHBuQlyDgyX9SJA3bo8U1GE+ghfdjL6wL1wvKl9Pz4NAnnE5tuFCJ/w VXu4V6TzqelZ4flfuQwOpepYU936QZmARGlC2Yka/ppLg0OQJ4Jj9LPnnHzFti3t7K0z 0BNg5uLpJJ3ALTEvUCjE9BvdnS/z+mgbeRnnX44J7zI+lJNBv/MDyjtCzkgseNv1Lw0f gPAIEU45MkvhqZnnu4zp0dMHwhydaucRQH7HTgqDzmOOErYx3prX6CVWxW7KJE1H4oqj cWuh7MRu7FZmPS/FiYT2RSr0t4/tBUFEgM0fIEZgSxFMe/DbmIvOlqXEqOWLoGcvSybe 9o8Q== X-Gm-Message-State: AO0yUKWs8SxQNF8FFSNTAFYT57j+reSjKZQtconvTZNXVgTe4fBz3A39 uddJ7fbWvk9fcbriPkLdoZNfaAKLvSRyRpV1H20= X-Received: by 2002:a05:6a21:78a0:b0:c6:d8bf:265f with SMTP id bf32-20020a056a2178a000b000c6d8bf265fmr4026741pzc.28.1676526484522; Wed, 15 Feb 2023 21:48:04 -0800 (PST) Received: from stoup.. (rrcs-74-87-59-234.west.biz.rr.com. [74.87.59.234]) by smtp.gmail.com with ESMTPSA id j184-20020a6380c1000000b0047917991e83sm358034pgd.48.2023.02.15.21.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 21:48:04 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu Subject: [PATCH v2 07/15] linux-user/sparc: Handle software breakpoint trap Date: Wed, 15 Feb 2023 19:45:08 -1000 Message-Id: <20230216054516.1267305-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216054516.1267305-1-richard.henderson@linaro.org> References: <20230216054516.1267305-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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 This is 'ta 1' for both v9 and pre-v9. Signed-off-by: Richard Henderson --- 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 edbc4f3bdc..c14eaea163 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;