From patchwork Sat Apr 30 17:53:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 568147 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp7371312map; Sat, 30 Apr 2022 10:59:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxzA7ZLQcNmXkqOF1VLIiaWI+8tSYBxq79yfb1l4YpfZwPuIy8LGeK+dvDwHSIMaWchIKk X-Received: by 2002:a05:620a:2805:b0:67d:5c7e:c43a with SMTP id f5-20020a05620a280500b0067d5c7ec43amr3511112qkp.84.1651341543897; Sat, 30 Apr 2022 10:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651341543; cv=none; d=google.com; s=arc-20160816; b=IOmtx9CIBaLe3Ea9QU88m3beUjxSRAg+3GDo88PD7wmD5/CfMwTMkGKpqgxdtAvgPb wyJ8Q6ieE0IAFhVa3q+KjB7wRiTnNh2sMqYv//bmtPlZS8359Fgu6xhv0AP951Jlr+vd Ok6wEQQhL8wdwTRCe2vdfvCGOnwSW2koxNu71uPpngvWAe3iL7B4Vfc2FM87Mbkl+rxu gMnu+GdhWN7Bjk5nSd/lu5z95STop9m2nwpzsV02/toTPhOi3cuYrv1DdQwaIfxIpCGW p91Yw+KBi/5bpwpqohEDhUbsZlQibSJWKRD8LDak4fwE+JxwFhlX39XoKJvO6/zX9UdT fopA== 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=dBQmcYvQNWemNoz94qCXnnbynO5dcM+A32yDVQduyko=; b=jGFTYVj3U5Mb/KGZurviS/mSSRIYiKKASj9MdPpOBWTLwUu6sGWgd0z27BON7qna3F uirN5MGh/Y+s3z24Pa4ECNI53PKzEeE/Gbl6wOwqWCzMu548eHO7AyAMYeprB3WdDms8 8AP/7V7FteORs+RYlV2lMJp8N/zKqNqEaunlrdfBlMeUlIYEBva6NNh/RP7nbuPpGmqI CKFjjvL1V0qm9y9SOIZcirvrSdbr8u4lrRHjuiFScJGeJ2wO1K8mibNqtd8QRsPmNi2M vDTt+HMuIMHb/53MD05CKqF2z0c04mdutkuLqoOlEF8y2qIJZsRGWt/w90JdAWBmyPd/ SiYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PY+NS7nA; 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 k12-20020ac85fcc000000b002f38fc3ccd1si3022677qta.777.2022.04.30.10.59.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Apr 2022 10:59:03 -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=PY+NS7nA; 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]:41892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkrN1-0001lY-GN for patch@linaro.org; Sat, 30 Apr 2022 13:59:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkrHy-0004ZN-PG for qemu-devel@nongnu.org; Sat, 30 Apr 2022 13:53:50 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:46772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkrHx-00081P-75 for qemu-devel@nongnu.org; Sat, 30 Apr 2022 13:53:50 -0400 Received: by mail-pl1-x636.google.com with SMTP id u7so9578905plg.13 for ; Sat, 30 Apr 2022 10:53:48 -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=dBQmcYvQNWemNoz94qCXnnbynO5dcM+A32yDVQduyko=; b=PY+NS7nAUlQ37XRhqC2+ZBAkY9cEQfdOO6nASWdwKd4N8u9U/lUhKCfImi/E5g7BxB Qfm50o3Fo2eXGMCaKslBV+6bvne5X8vnwfzOJq6kjJOkeRXbbNdySaVT44GTJEYlYv09 HcgwAyPSFEBBjXdEU7VM+nRvWMsLtpO1ObGXNuMinH+bMrNFIPViyXyT2rSynZW7K+w1 eaGU/dugpLA0nScEtuSC5+UCN0N1o7n8erRARzAQoRb/xhxmfObs5Hvf6LWEf6zRT9Fg czMDOwTBZCueV3bthwUdh7s9OzJJPo8a6nlZuFVmULSG4ODPHT+7AOnTJgbKa2w27kZo 1gMg== 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=dBQmcYvQNWemNoz94qCXnnbynO5dcM+A32yDVQduyko=; b=M2zEh5e1/2c50uVUB1LtVDVqekUOmLBR1Aq8z57gVLy+3FuzTlCocvYx6IZPBolA5x bEU2+T9BxHJUIXcJd2pJPKmju8QQBjwSraipYCb8GojPN/Gibxh6mN1QQ+SdmmvFa77d 6cX1UXCCATz8GGu3BNCFg7eKcOsSV6bnx7SZMHSf+1QwIOx4mcoAPoBNCtJRVZGzp41q g0JhUsyiQtymNOAOhrJ3aB1WhEao4GX/KU5gfWo9y4dWesO4R/t/ZXHBVRaM48g9sBOR JKi5jJAEyAevomz97qDrVP8LZKOieHO2pvbCa/v0q5jFz1oyR6SQJBXqDgNjzimALgD+ MgIw== X-Gm-Message-State: AOAM530KKmfCpQhtSo2X6yoCiYXYHmSfE8HgwvaRSIu2wHIYWWWbpbwy eyBzF0iPpIS+ZXGJEMcASDQhZoRMEPDTOw== X-Received: by 2002:a17:902:e741:b0:15e:5aad:b3d5 with SMTP id p1-20020a170902e74100b0015e5aadb3d5mr4764781plf.102.1651341227936; Sat, 30 Apr 2022 10:53:47 -0700 (PDT) Received: from stoup.. ([71.212.142.129]) by smtp.gmail.com with ESMTPSA id 5-20020a170902c20500b0015e8d4eb282sm1740910pll.204.2022.04.30.10.53.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 10:53:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 05/17] target/m68k: Remove retaddr in m68k_interrupt_all Date: Sat, 30 Apr 2022 10:53:30 -0700 Message-Id: <20220430175342.370628-6-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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The only value this variable holds is now env->pc. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/m68k/op_helper.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 0f41c2dce3..777869790b 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -287,12 +287,9 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw) { CPUState *cs = env_cpu(env); uint32_t sp; - uint32_t retaddr; uint32_t vector; uint16_t sr, oldsr; - retaddr = env->pc; - if (!is_hw) { switch (cs->exception_index) { case EXCP_RTE: @@ -385,7 +382,7 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw) sp -= 4; cpu_stl_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); - do_stack_frame(env, &sp, 7, oldsr, 0, retaddr); + do_stack_frame(env, &sp, 7, oldsr, 0, env->pc); env->mmu.fault = false; if (qemu_loglevel_mask(CPU_LOG_INT)) { qemu_log(" " @@ -395,7 +392,7 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw) break; case EXCP_ADDRESS: - do_stack_frame(env, &sp, 2, oldsr, 0, retaddr); + do_stack_frame(env, &sp, 2, oldsr, 0, env->pc); break; case EXCP_ILLEGAL: @@ -404,12 +401,12 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw) case EXCP_TRAPCC: case EXCP_TRACE: /* FIXME: addr is not only env->pc */ - do_stack_frame(env, &sp, 2, oldsr, env->pc, retaddr); + do_stack_frame(env, &sp, 2, oldsr, env->pc, env->pc); break; case EXCP_SPURIOUS ... EXCP_INT_LEVEL_7: if (is_hw && (oldsr & SR_M)) { - do_stack_frame(env, &sp, 0, oldsr, 0, retaddr); + do_stack_frame(env, &sp, 0, oldsr, 0, env->pc); oldsr = sr; env->aregs[7] = sp; cpu_m68k_set_sr(env, sr & ~SR_M); @@ -417,13 +414,13 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw) if (!m68k_feature(env, M68K_FEATURE_UNALIGNED_DATA)) { sp &= ~1; } - do_stack_frame(env, &sp, 1, oldsr, 0, retaddr); + do_stack_frame(env, &sp, 1, oldsr, 0, env->pc); break; } /* fall through */ default: - do_stack_frame(env, &sp, 0, oldsr, 0, retaddr); + do_stack_frame(env, &sp, 0, oldsr, 0, env->pc); break; }