From patchwork Thu Mar 10 11:27:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 550124 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp930950mag; Thu, 10 Mar 2022 04:11:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0udaiHfunrhdcZz7VsDWlVotXba0qFA2z2d0x2KJ2mlaxMBuLald/O9Nf4Q/apCfHpkR8 X-Received: by 2002:a25:cc8b:0:b0:628:9263:38ba with SMTP id l133-20020a25cc8b000000b00628926338bamr3561838ybf.291.1646914301396; Thu, 10 Mar 2022 04:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646914301; cv=none; d=google.com; s=arc-20160816; b=H6QOtr2xAvOQP27z/J+ddCXpxFYgC+tBC5eE1ZUfmwfLh7ySngQXFjemhs5tJOlTqc JZ+KwwDS/EBQtnzS2PuQX6VihlNtWXoHTvysJylrE878evm/84b5tnpAZzcxVmf8N/8+ e6fOHNZr2jJOv9nWp45iPQkuZo9AKosX7FEv+hxUQP+lKEHwzxR9ugZfrRl+sLD69hZe u3KZ64ZFL9lMRWvlb8+Po39iEtUidGr9PGuQk2D/3x7CPE739/B9Uk0yBGtd69P9ZOuV sa4NO84PTVoT7X03TNtWyq2l4dYsxZgNNXHr1TePdDTIV4uj4KzVyXzuzDS85S8qp+GQ 7Q4g== 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=GQKtq5EmgHv2pf8acDMhuJ8SB17+NoN37aNM30IhfvE=; b=m5vKyuDTXaN7ChADOd2GpXvRua6cFdPkNID504Ly0KYDzv1F3l8d/oPQ9pwqQbvTaf 5DgC9Q8GAjScsMJUTpRZtyDBYS8YlithWqVbQrxqvQrI3PRRAZF1vnSnnyMknIRHMk4F KMML7KSwzc6mwYm/OHLY8HLgaCZaSwAVvkty8ag/BdMltoAYjtNi1IVUGsb/e+aqHiqt oyaVFSNaqHFu8ZGNxQqQ8LIT+P35u2D4uVPTSwChL/m68otd7Axrbs1mEnQ5qP2TCNdy isJMB0ueJOiD6Y9X4phGAftYmxeoXS3f50Hg23BKWy/KNYPXPlR/cQ1pSfDPCAWD19pU NKKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jtOiGy3F; 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=fail (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 w4-20020a25ef44000000b00624417cd8aesi2624754ybm.72.2022.03.10.04.11.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Mar 2022 04:11:41 -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=fail header.i=@linaro.org header.s=google header.b=jtOiGy3F; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nSHds-0003qq-V7 for patch@linaro.org; Thu, 10 Mar 2022 07:11:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSGxX-0005nW-6e for qemu-devel@nongnu.org; Thu, 10 Mar 2022 06:27:55 -0500 Received: from [2607:f8b0:4864:20::1036] (port=42533 helo=mail-pj1-x1036.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nSGxV-0007zS-PS for qemu-devel@nongnu.org; Thu, 10 Mar 2022 06:27:54 -0500 Received: by mail-pj1-x1036.google.com with SMTP id c16-20020a17090aa61000b001befad2bfaaso4970182pjq.1 for ; Thu, 10 Mar 2022 03:27:53 -0800 (PST) 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=GQKtq5EmgHv2pf8acDMhuJ8SB17+NoN37aNM30IhfvE=; b=jtOiGy3FYwQP3MCPQKueM36CjJDClkhfzP7GS1+H6iFjFbaIXyJp1fZpmcMN5vi1JW qhuify425kryo/WWX5g5MFg9FAHMSm6N0SVWagC2XWw25AFjw89Xqa/NnVXZneZpCGgH N15S6EBfr/5VKd9Q9GcD8taM7E3w+wpHQ+FKxE9W2ePy3jht47IGi95b4dz3kE44Ii6z tdzNlpZRh7DUWpWPqUWW9WGK3iB4FgFfaGtW7Qi1ehVWHxwtHUYISBM3yvxWQLAFLJLr O0QRVJrWth9FgbsTf+A9sg4N5TBt/MMoYuK3aaKKsBCKxXzRUIKQcBfS8PF9W9OcWu1M HwyA== 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=GQKtq5EmgHv2pf8acDMhuJ8SB17+NoN37aNM30IhfvE=; b=hjHS8HWjYQr5vKPiMRlfE/QSTH6EDkGr92jpIaUKZteMvxuUUGGXrMcUZdpfMCNr4n PRgXoPd5PMw3OPWVZATo7HorTLBOOkCOcQnQtejB1+50NHwTp4b8A+nJ70cJx63FkBeH Gs216/ZSarLT+dgdPEodCRF2KIfSxYSW8l2i+A/PKSYkMtldsQSUXy4BfXZA2ALiY7sT QhsMT7wZww7JxeIv4HgQMn1kmrhHnjchCrEsiUtB5PH8arynwBGXXBWPlnIQluB3tRE7 7C4XQuJEAbuSUbCHG8+VwjOpnJP2QyvJuQGNr5r/nn4tfy7tunsGKBW5PTfyBW4Lnv+h 1bvA== X-Gm-Message-State: AOAM530jmoGLqLDR0tIeCXUyIqeXvVkljgEC39AWGkjUKqpxMZ4ezWn/ HG4XSqnrA1jl8SLLlEYUfgg6mSBruA6MHw== X-Received: by 2002:a17:90b:788:b0:1bf:41d:a9ff with SMTP id l8-20020a17090b078800b001bf041da9ffmr4456639pjz.116.1646911672487; Thu, 10 Mar 2022 03:27:52 -0800 (PST) Received: from localhost.localdomain (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id js15-20020a17090b148f00b001bfc8614b93sm3114977pjb.1.2022.03.10.03.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Mar 2022 03:27:51 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 23/48] target/nios2: Handle EXCP_UNALIGN and EXCP_UALIGND Date: Thu, 10 Mar 2022 03:27:00 -0800 Message-Id: <20220310112725.570053-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310112725.570053-1-richard.henderson@linaro.org> References: <20220310112725.570053-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1036 (failed) 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: marex@denx.de, peter.maydell@linaro.org, amir.gonnen@neuroblade.ai Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These misaligned data and misaligned destination exceptions are defined, but not currently raised. Signed-off-by: Richard Henderson --- target/nios2/helper.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/nios2/helper.c b/target/nios2/helper.c index 285f3aae1d..0392c0ea84 100644 --- a/target/nios2/helper.c +++ b/target/nios2/helper.c @@ -119,6 +119,12 @@ void nios2_cpu_do_interrupt(CPUState *cs) case EXCP_ILLEGAL: name = "ILLEGAL insn"; break; + case EXCP_UNALIGN: + name = "Misaligned (data)"; + break; + case EXCP_UNALIGND: + name = "Misaligned (destination)"; + break; case EXCP_TRAP: name = "TRAP insn"; break; @@ -167,6 +173,8 @@ void nios2_cpu_do_interrupt(CPUState *cs) case EXCP_SUPERD: case EXCP_ILLEGAL: case EXCP_TRAP: + case EXCP_UNALIGN: + case EXCP_UNALIGND: do_exception(cpu, cpu->exception_addr, false); break;