Message ID | 20220421151735.31996-59-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp601649map; Thu, 21 Apr 2022 09:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiMIUjZDurVNB/rdPElk7Qlay7If+eMhTKoKbIaZIkMaJeQrptyK6vbTTBm8ZWUM6RZ+vz X-Received: by 2002:a25:cc49:0:b0:645:3bec:8179 with SMTP id l70-20020a25cc49000000b006453bec8179mr590501ybf.274.1650559532801; Thu, 21 Apr 2022 09:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650559532; cv=none; d=google.com; s=arc-20160816; b=ESnuWt+0qGTFrC+Hdwoia8YRTxtLRJDh8jUMeLQoLgw/JyjjEiQCort6DnReTNdNhK WqwarkU/psonWH7q12ipadC6lzokeSfrYAxLAEeQVQYk9Pkz4qzX5H7MCK70n9pfyqCv PsTMLm/n9Wl+1zKnEHhCk0GC0tn/fBUJwRhxFqMTkicioGoy8OdU+YCEwQViRbrgkKSG 5hDwN0LIFk0p1PMKaSWyOiDdt9yKCDKUsAiM6Xqt09meiFoQgJeZlYPfH6i8oiiTCrgl 8WDB66kzwQpXBGZvOP20Ogdo1Mn5UjDkH7UAiyppG+rrxjqMKeT0TbTaRkjwlInghdOA 9cxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=6CaarkqQrAAyxbYSlNSLaV7b+x4O7r/FJICreGNNBLc=; b=Zv2roRapwFI1pd7tG7NNec1oX+czLfpzkjRHyrXvhOvl7ifm88JH/rp9vDHjvYk7Yd rmUwJicQ71+EDhRQwLfMhbdzLyEIsjNB2AK8CrAj5CpnUYSQP5NVGrJwLXBhiOAdL3du DPYzkw897hLoDmRVyD4+FSgPNbAVyHh+opIP0V/0Ki1kKSkueAvTmxYsoO9CXGgHwPji AKpzyg4T1Msj/ETrfhV3LKY4JRU4gPQj2+kDE0MfpWSky5iEnbeIH45QVRzM8aJCQ4mL IBJagPeI+i7YauAaqOABHOFP5tBPVSGgNPypMzJ0PQYObeOOtkWsuBHGrw7lQF5zwYVn grTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TQ/g9IvP"; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l7-20020a252507000000b00641418edd92si2571061ybl.647.2022.04.21.09.45.32 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Apr 2022 09:45:32 -0700 (PDT) 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="TQ/g9IvP"; 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]:39196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1nhZvw-0002ti-9C for patch@linaro.org; Thu, 21 Apr 2022 12:45:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nhYdD-0005jr-Jn for qemu-devel@nongnu.org; Thu, 21 Apr 2022 11:22:07 -0400 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]:40712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nhYdC-0007DC-4I for qemu-devel@nongnu.org; Thu, 21 Apr 2022 11:22:07 -0400 Received: by mail-io1-xd2a.google.com with SMTP id 79so5627735iou.7 for <qemu-devel@nongnu.org>; Thu, 21 Apr 2022 08:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6CaarkqQrAAyxbYSlNSLaV7b+x4O7r/FJICreGNNBLc=; b=TQ/g9IvP6VHkOxZFfWIIFhMXPQp47KD1j+a2nhxJ0+ZNTbIqCDpjPc4wLkGLLyV9WO SWfd5uWajyUQNT/25IKQWi7B1RtLULxvC8xBzIDtKTPyi49u1tKgCdpu/pDcshi/7nJW I1+xyfrya/Mp12vmzjqnt4+LMSVuHW0KC6BfMzkgTyLUSuYO1aUMpl29+s5LdgFEJHx2 0u5US9Ik+FXgrY/jjSxJynFukFTXDzTS2DZhen+j2rv4mOQJ8kkgWo4eCzVDgiAgLiwm Fwi5dMsq551mfQolppmDLCjOt+HrUixacvmGJpFfn9GE2eTM4uIpT0OKDBihtIqUKFxm xL6g== 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=6CaarkqQrAAyxbYSlNSLaV7b+x4O7r/FJICreGNNBLc=; b=bsMhu6SZG37xArklp2Ex77Zow0iypwgDd7NuJaMjCAUDKU4wtQqE+qfCiipCEZIHnf 65WwW3AqsPKrOIqKQ5h5Askp6OlEdPA1pIccRrCggwE+ZBP2GIhTc6DzgPqZxPyrvK6E jPZUpssovLmAj960de5NvWv5FIa4J0H3Vuya2kTxTbfDYkgx27Q4roawyI2Lg6c7RVq+ j9k14qi/POvF1rAzRZLicnBQFlCyeDoqahymqw6rwfTnoAgICCfnaymz4nLCuIq6P74i PJA6aQgqEvG944wTn/lG+HTkyhwSEzDy0gfpvdG4XC7i4YHcjw9QaAFTq59j8HX1Ggy/ goYg== X-Gm-Message-State: AOAM530W6Ow03wWyeA7WdTOA1kW+jnoBbLTYtRguh6U8mz0bcqPI+K6s 57V6dE0U2BkhXvTIQMi3mjG+bGyFF04djw== X-Received: by 2002:a5d:8450:0:b0:64c:cc87:c5fc with SMTP id w16-20020a5d8450000000b0064ccc87c5fcmr87744ior.190.1650554525184; Thu, 21 Apr 2022 08:22:05 -0700 (PDT) Received: from stoup.. ([2607:fb90:80c8:6cf3:a91a:4957:ba18:ac18]) by smtp.gmail.com with ESMTPSA id j1-20020a926e01000000b002cc52449a19sm3985402ilc.35.2022.04.21.08.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 08:22:04 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v7 58/64] linux-user/nios2: Handle various SIGILL exceptions Date: Thu, 21 Apr 2022 08:17:29 -0700 Message-Id: <20220421151735.31996-59-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220421151735.31996-1-richard.henderson@linaro.org> References: <20220421151735.31996-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::d2a; envelope-from=richard.henderson@linaro.org; helo=mail-io1-xd2a.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, 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
nios2 fixes, cleanups, shadow reg sets
|
expand
|
diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c index a5e86990e2..da77ede76b 100644 --- a/linux-user/nios2/cpu_loop.c +++ b/linux-user/nios2/cpu_loop.c @@ -50,6 +50,18 @@ void cpu_loop(CPUNios2State *env) env->ctrl[CR_BADADDR]); break; + case EXCP_ILLEGAL: + case EXCP_UNIMPL: + /* Match kernel's handle_illegal_c(). */ + env->pc -= 4; + force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->pc); + break; + case EXCP_SUPERI: + /* Match kernel's handle_supervisor_instr(). */ + env->pc -= 4; + force_sig_fault(TARGET_SIGILL, TARGET_ILL_PRVOPC, env->pc); + break; + case EXCP_TRAP: switch (env->error_code) { case 0: