From patchwork Sat Apr 30 17:53:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 568154 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp7375268map; Sat, 30 Apr 2022 11:05:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWoUr6O473IpnvRqr9qo7RR8CpiMVB7w5cNdn2bSeU1UER1eowo4e/vFA/kTa3CTCDp82f X-Received: by 2002:a05:622a:164b:b0:2f3:8701:2859 with SMTP id y11-20020a05622a164b00b002f387012859mr4303647qtj.33.1651341953660; Sat, 30 Apr 2022 11:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651341953; cv=none; d=google.com; s=arc-20160816; b=om85URdfa8Bz9PYanRKeMmykpy++QtUXwdfpew2aE3xd+QObDZYvwbO5nglZVzbkP0 ubBr7BOdn5lgqrH9Att+iZl+gclm8rOr87pQwT1ccLh1cktxjGM95Qu8M+76bipS74xK mIl8PmV5uxpNXnQuXAZhwsO7NzSImUu+0Yh35406TCpe3HoYUHuSkIRrLOXY8IXDqiR1 OKa6gPJPkor4xZgKazaS1t2lnCbuXYjDAt1MSMwMyDv/A+Qb2QSz+YfIK9QT9o7YM85G qriKaqqDQeai9h+/UfOCoQ7DHPX9aN11ulG7gY5g3osnKAZaoL3GhEGLqnyWJRBHRort IPBA== 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=QiL50oJATvoUHpaFbUSOhW72pyefXH6OHiLxuwc06l0=; b=gYJd5Eu+dib3p1czD2FUo5Sd5br86gzFfMGYY80hGTYY2F5hWs2Kvn02l+W/fIXIVc u7W/KrnJQ3vzhgwKSMrNiSSwXgikNVsnC1p1vcCOs35nEeYSdQuSqKwkUTgYg1t2daoM 5z4eKOpT7yD21PQcl8bVGWTnMEFAdm9AqHB5JIOZ0tpsJaNlhqWamAMpSb2bzLpPMTPT MU09ZSQKfGwdTgYxIBZO8BHvdj4BVBpvDRAITaH0t0JNbpvIdxoYzFRBKkdkkFXuDTfA Jgf9fhJ7OzvZZ7JZPynj4DHZOZtN2SfOeuNIAmzkHfF4+s76a7cNOMDWuOpdvZZwYq/q oJgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ernaJqMT; 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 q2-20020a05622a030200b002f3866fd0b1si4259719qtw.55.2022.04.30.11.05.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Apr 2022 11:05:53 -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=ernaJqMT; 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]:58218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkrTd-0004NU-65 for patch@linaro.org; Sat, 30 Apr 2022 14:05:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkrI3-0004dy-8t for qemu-devel@nongnu.org; Sat, 30 Apr 2022 13:53:56 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:39786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkrI1-00083C-C0 for qemu-devel@nongnu.org; Sat, 30 Apr 2022 13:53:54 -0400 Received: by mail-pl1-x636.google.com with SMTP id u9so8982724plf.6 for ; Sat, 30 Apr 2022 10:53:52 -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=QiL50oJATvoUHpaFbUSOhW72pyefXH6OHiLxuwc06l0=; b=ernaJqMTIkqITS2s+ZqNrq/Nrnth4SXgBsb439L7yEGQ3AuZvf5liSuaeXKvMnTWt3 e4e13BGy5K5R4UeXPFjQsc4qtb0Iaetzh0xyFceLIZ4XzY8XJopZkavdj+qh86/L/ChG SQFQAjd3haDDUwu3i0yrFZjfHidsYStsDZtM/bABifc+DAUzBiodQ6kNuzkY3kXWUDcp FEhMz7DA/gDgiI1Q50d67WHf34lJpQut8C/w2uw2JdVGnPkcO96300thWZttrJJPwGpD KaPSpjDmjbOq/JfgK0tmv9R8denXb9wUaTppE4AfspJcmrE9hMJ6PsCRxPTeTMWwDlxx DawQ== 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=QiL50oJATvoUHpaFbUSOhW72pyefXH6OHiLxuwc06l0=; b=rFgldu3ZAwPAHKYdD5YANR7UEUx0jdaFUgc2L7rjA3P6EUb+CgutE5W8k6/ZH8nn9x 1E/jDSvGsG/emA7VdaABWlKjp3aenQQiQEj6jSHU5vmAOf6sfZ9zW1AMZ02PzQ6y7ja/ 2KUmZLoIPFLNd1U8yozGAl0wX+oZ8ERxMtsoRq4cqPZH0cOBSxsrYcpuZKpNXKE4aBsW AtgJo2c9Y3Tn63T5wDsx+EMY5WwuWvFHQOWRbC0kOdnAyVdJUQlWZQw40NAs0TrU9AWd tIYikuYmeTENn7MELmhbD4CjAQTmlGhGdzpF1p6IjGw5F6ITcztEXreLxQum+NePcJFL PJ8w== X-Gm-Message-State: AOAM531i6BJM5W5SSLPPLIrfcFLUdTOAwZKeoTjSg8Yq3ktzWT2SFOmp EAXWRwJyB0pKTWVLwlV+VQkkFZabmKxcOw== X-Received: by 2002:a17:902:ec8c:b0:15e:8cbc:fd5b with SMTP id x12-20020a170902ec8c00b0015e8cbcfd5bmr4367819plg.141.1651341232123; Sat, 30 Apr 2022 10:53:52 -0700 (PDT) Received: from stoup.. ([71.212.142.129]) by smtp.gmail.com with ESMTPSA id 5-20020a170902c20500b0015e8d4eb282sm1740910pll.204.2022.04.30.10.53.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 10:53:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 09/17] target/m68k: Fix stack frame for EXCP_ILLEGAL Date: Sat, 30 Apr 2022 10:53:34 -0700 Message-Id: <20220430175342.370628-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220430175342.370628-1-richard.henderson@linaro.org> References: <20220430175342.370628-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" According to the M68040 Users Manual, section 8.4.3, Four word stack frame (format 0), includes Illegal Instruction. Use the correct frame format, which does not use the ADDR argument. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier --- target/m68k/op_helper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 3cb71c9140..aa62158eb9 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -391,11 +391,14 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw) } break; + case EXCP_ILLEGAL: + do_stack_frame(env, &sp, 0, oldsr, 0, env->pc); + break; + case EXCP_ADDRESS: do_stack_frame(env, &sp, 2, oldsr, 0, env->pc); break; - case EXCP_ILLEGAL: case EXCP_TRAPCC: /* FIXME: addr is not only env->pc */ do_stack_frame(env, &sp, 2, oldsr, env->pc, env->pc);