From nobody Sun Feb 8 12:37:29 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 ARC-Seal: i=1; a=rsa-sha256; t=1641745595; cv=none; d=zohomail.com; s=zohoarc; b=Y5HI/IvRUdgA23W4pgd/y/b0PeJD71IfdDElBBwty/gLZ9FwF814Bh4T2YUmGzlpx7SsbKyk4LXOjtfDi/0JpUZmeBN8AJz1UO8QUm2llpuTqaqLOz3D3W7TRZVA5oJfA1kfXPF5V6En2diLgk93PiyA5rWMxJutQpwlhNfBhHA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641745595; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uqy0flKsbKkUSoZqssjXKCl5UFRKmvmV8nOqjaZTBpE=; b=O61q+e9hyLop02rwEPqzAaTgzDkOQCCjYQVW3yCa76b5y71mzCIBW1InC2IwYjofmCoQ69bSMAfZdMiOKGhCwbX2HdkDDILOxOPF3+KZXKz25uaCMqTcu4A6+J1teo3GGUDKgiGM78MEifvIqwqBLBHdGFz5O1rlvxVs7RvATVc= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1641745595103120.92772137000452; Sun, 9 Jan 2022 08:26:35 -0800 (PST) Received: from localhost ([::1]:37966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6b1e-0007ZK-5R for importer@patchew.org; Sun, 09 Jan 2022 11:26:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6auw-0005OL-6w for qemu-devel@nongnu.org; Sun, 09 Jan 2022 11:19:38 -0500 Received: from [2607:f8b0:4864:20::d2d] (port=42914 helo=mail-io1-xd2d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6auu-00076L-Ui for qemu-devel@nongnu.org; Sun, 09 Jan 2022 11:19:37 -0500 Received: by mail-io1-xd2d.google.com with SMTP id o7so14344097ioo.9 for ; Sun, 09 Jan 2022 08:19:36 -0800 (PST) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id u10sm2683386ilq.76.2022.01.09.08.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 08:19:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uqy0flKsbKkUSoZqssjXKCl5UFRKmvmV8nOqjaZTBpE=; b=b9jx0XmJ9ZNnO8eaGPsQ+8ttWuB4QBKG7lVwSvfXO0WgAjDK1ZZFFYPENYa/tGyVa3 19Uuw9ZTectCo99hpybcdsjblPgPD3R95Qkyr5sfVdwwOl80fnc9hqC/Ij0JeS3AgU0/ X++lYVsd1By+uEs1SxkCo21i/hg6GPjUW8EiBsuCm8N3L4YvgzPtgsUkhOAVq9Pb30u/ kd3SRi9OEgDvgSo1n3z6AZ9weRb4o2KfXPCYeO0WntIupfc88ngASe7SCkFJFXKAchhp e+h85I5wOkSRFdEKBHXf/0X+OtAn+zFCV1rl/TfJkeMNV26Pkd1JsinT3tdweLa7NlP9 +JyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uqy0flKsbKkUSoZqssjXKCl5UFRKmvmV8nOqjaZTBpE=; b=aYpWt0ColynLUzdYHGHYyWl7G0qWca4wZegQvvVfeutMnxfkkPdvMiW1/asrHuEsKD BWHSg5L0TRmaRyeQluzY5RbvTx4VXi8JQ87SbDho+hl/fkwCyb66OxSaE5+nvrLgVa8F Uvw92Q9bIbl2UWESB6vQ5zRT1DbRgFk/3o/bhvGrSWlwToZuTa5qqPLxjYmN/hoWTIE7 nHA/it1PeCreUn7ebkHZzGRcc1rBUpHeYTq+JRwiFFuF8Sm7UqkBeMorOz7gX69ESx+q O6TZzl6z+KtlVZaXo+hs5bq3+zuFf3anWmPvk8iCKMQj9etu5jKIGh4ku13zDrgVECJO zPdw== X-Gm-Message-State: AOAM532K8pMycuFuWosUf+7P51gTx5gGpD2NJJ9po0EzwvgguVExA9nP FUkUUGx3cBGHHRpbfVPbvx4wNy4IhdshMyoT X-Google-Smtp-Source: ABdhPJzve/tZK3fjbT4Zox+8MplHAElU+jI6lj8ifJ0jox5rVfZqqLIhIRHXccEXtXnoDs3Zobn9TA== X-Received: by 2002:a05:6602:2ac2:: with SMTP id m2mr1222043iov.152.1641745175302; Sun, 09 Jan 2022 08:19:35 -0800 (PST) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH 07/30] bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF Date: Sun, 9 Jan 2022 09:19:00 -0700 Message-Id: <20220109161923.85683-8-imp@bsdimp.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220109161923.85683-1-imp@bsdimp.com> References: <20220109161923.85683-1-imp@bsdimp.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::d2d (failed) 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: none client-ip=2607:f8b0:4864:20::d2d; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2d.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no 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: , Cc: Kyle Evans , Warner Losh Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @bsdimp-com.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1641745597002100001 Content-Type: text/plain; charset="utf-8" Use force_sig_fault to implement unknown opcode. This just uninlines that function, so simplify things by using it. Fold in EXCP_NOCP and EXCP_INVSTATE, as is done in linux-user. Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h index 905f13aa1b9..996a361e3fe 100644 --- a/bsd-user/arm/target_arch_cpu.h +++ b/bsd-user/arm/target_arch_cpu.h @@ -51,18 +51,12 @@ static inline void target_cpu_loop(CPUARMState *env) process_queued_cpu_work(cs); switch (trapnr) { case EXCP_UDEF: - { - /* See arm/arm/undefined.c undefinedinstruction(); */ - info.si_addr =3D env->regs[15]; - - /* illegal instruction */ - info.si_signo =3D TARGET_SIGILL; - info.si_errno =3D 0; - info.si_code =3D TARGET_ILL_ILLOPC; - queue_signal(env, info.si_signo, &info); - - /* TODO: What about instruction emulation? */ - } + case EXCP_NOCP: + case EXCP_INVSTATE: + /* + * See arm/arm/undefined.c undefinedinstruction(); + */ + force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->regs[15= ]); break; case EXCP_SWI: { --=20 2.33.1