From nobody Tue Feb 10 08:41:02 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=quarantine dis=none) header.from=kalray.eu ARC-Seal: i=1; a=rsa-sha256; t=1655735762; cv=none; d=zohomail.com; s=zohoarc; b=BP5Zuxc9E9/xhB28/cKxFGDlxewNMOoYswtOF2msIc0MBSolzrxksTBD6bJWb/sfXfmIG+n87msw7IwuQ4Ev1D+AAFXg0Q7X5OVbwt0Or1kVBIbmdKPikE8wFQWGBWGDi0cTkSYmBVKeaDrD24CYrZjNvk11C5rbJZfmk7jEIYk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655735762; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=pqO+2rhibMGYfEqFI+8R0ermok68nZKn3dLnJ/SKXcM=; b=lD6noU69mmPo443x6qqveBtXsVdQf/anR4Ad/udiNrdtPwsyLGzsqPISCgK9nR6D99sA2w8CQ2LMl3WXJezFqIEDivza0ClNHTaShDVm30q+5M7Lg603dhDddWetmbeQtTsEPDVR/hJ6o3xNGl3BccPb9pSnYFn+XlkOgQY2WTU= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1655735762206115.6548576165834; Mon, 20 Jun 2022 07:36:02 -0700 (PDT) Received: from localhost ([::1]:57928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3IVV-0003RJ-6F for importer@patchew.org; Mon, 20 Jun 2022 10:36:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3IL9-0005jB-1J for qemu-devel@nongnu.org; Mon, 20 Jun 2022 10:25:19 -0400 Received: from mxout.security-mail.net ([85.31.212.42]:34069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3IL6-0001Sd-IT for qemu-devel@nongnu.org; Mon, 20 Jun 2022 10:25:18 -0400 Received: from localhost (localhost [127.0.0.1]) by fx302.security-mail.net (Postfix) with ESMTP id 483693D3B108 for ; Mon, 20 Jun 2022 16:25:15 +0200 (CEST) Received: from fx302 (localhost [127.0.0.1]) by fx302.security-mail.net (Postfix) with ESMTP id 527693D3B11B; Mon, 20 Jun 2022 16:25:10 +0200 (CEST) Received: from zimbra2.kalray.eu (unknown [217.181.231.53]) by fx302.security-mail.net (Postfix) with ESMTPS id C0E003D3B13A; Mon, 20 Jun 2022 16:25:09 +0200 (CEST) Received: from zimbra2.kalray.eu (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTPS id 9D19E27E04DD; Mon, 20 Jun 2022 16:25:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 793DD27E04D7; Mon, 20 Jun 2022 16:25:09 +0200 (CEST) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Sb7X1iJqwTtQ; Mon, 20 Jun 2022 16:25:09 +0200 (CEST) Received: from ws2101.lin.mbt.kalray.eu (unknown [192.168.36.68]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 5F96D27E04D8; Mon, 20 Jun 2022 16:25:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalray.eu; s=sec-sig-email; t=1655735115; bh=T95sWA5zxe4fWS53roiVVcEs3JYFnRvZjn+m8zQR/+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=5OeM9K3LjoHF0qEKE55kLdCQZLzU7zVa1XeqoJVsADw7ScbZqD/geut6ZKqL6QMJa +gPAdWbFkoLUY2m2NZXSA1Y7Vx7vcFGR6ZCdgNwvjaxQ2kHOsn0q7eTH5EA7Tugf4y 3C0OPsEyqA1pDreNdo3k316kyD1Fj+VYWGe75QAM= X-Virus-Scanned: E-securemail Secumail-id: <9b0e.62b08345.c01cf.0> DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 793DD27E04D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1655735109; bh=pqO+2rhibMGYfEqFI+8R0ermok68nZKn3dLnJ/SKXcM=; h=From:To:Date:Message-Id; b=liwULzCxnJjZ1m2AEasAr6ym0hX31FqIQGDprC66mv+5to/Xfc79fYxMyyPyOlcZl KSk207ua3FciEKpL0ek58m10V1LZaP+LSdAvVvNVkvLrTjDX5G4F1dSXSZI+jIaFL5 w5c/5Ol+WAC4kEHg1XR2hKGyuYlnmZveqIw8q1w4= From: Luc Michel To: qemu-devel@nongnu.org Cc: Luc Michel , Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Eric Blake , Markus Armbruster , Laurent Vivier , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo , Chris Wulff , Marek Vasut , Max Filippov Subject: [PATCH 4/7] target/m68k: use semihosting_exit_request on semihosted exit syscall Date: Mon, 20 Jun 2022 16:24:23 +0200 Message-Id: <20220620142426.15040-6-lmichel@kalray.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220620142426.15040-1-lmichel@kalray.eu> References: <20220620142426.15040-1-lmichel@kalray.eu> X-Virus-Scanned: by Secumail 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=lists.gnu.org; Received-SPF: pass client-ip=85.31.212.42; envelope-from=lmichel@kalray.eu; helo=mxout.security-mail.net 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, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @kalray.eu) X-ZM-MESSAGEID: 1655735762893100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- target/m68k/m68k-semi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c index 37343d47e2..b3de3c6874 100644 --- a/target/m68k/m68k-semi.c +++ b/target/m68k/m68k-semi.c @@ -27,10 +27,11 @@ #else #include "exec/softmmu-semi.h" #include "hw/boards.h" #endif #include "qemu/log.h" +#include "semihosting/semihost.h" =20 #define HOSTED_EXIT 0 #define HOSTED_INIT_SIM 1 #define HOSTED_OPEN 2 #define HOSTED_CLOSE 3 @@ -193,12 +194,11 @@ void do_m68k_semihosting(CPUM68KState *env, int nr) uint32_t result; =20 args =3D env->dregs[1]; switch (nr) { case HOSTED_EXIT: - gdb_exit(env->dregs[0]); - exit(env->dregs[0]); + semihosting_exit_request(env->dregs[0]); case HOSTED_OPEN: GET_ARG(0); GET_ARG(1); GET_ARG(2); GET_ARG(3); --=20 2.17.1