From patchwork Thu Jun 2 11:58:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 578103 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp486451max; Thu, 2 Jun 2022 05:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMSNI8R9VIeUuURNF+9b5IElOMPBt9cfNg3Adk8nWLhm5BaF8Du2S21e5VHpLMzT4Of8QH X-Received: by 2002:ad4:4433:0:b0:464:4626:7a85 with SMTP id e19-20020ad44433000000b0046446267a85mr3161951qvt.52.1654172447921; Thu, 02 Jun 2022 05:20:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654172447; cv=none; d=google.com; s=arc-20160816; b=suDVsYeEmVwtqDSz6HrkYCKghzbOY+ADpxNgoX5wLqONBEYjR6Etpx6ceYBe53+ukG j5mJ5lFOeEBzr0ZzMEzbkGpw4QLm7yPaifUkVKwlyIJxvNSv5736RBpgWf3c1R5/V66k 6U6VMu4Z+ciNXfZso2tzqrFP48bSJfME0N6HKz7ikThOYtcMplyApcdrCrL+Rld8UQ5C euzGx/W8DvFxLowaRwBRTxRvM9Qc9zx3DLxKoza5BAPiYKfxt8V+0ZpqX7q23YvyUmGe lTUCpHfFOSE/eznzCxIM+6f5i0qK98qSVDymbMy7BPcoa4AaIKVxbVstLFrRR0pdo+Wj cCxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from; bh=wZ8BpI5uSvvctoNoaOogRvabeitk0qodUfcCQuMtwtU=; b=X0i/fMQ6DFBJDiRis8hKwfVGxR6hdMc3qOskdA7qlLkb7JL9tMoRGRm5XTEJXQSjcb 6lwfNDY+of08l7Xd3e3yGbSPe4AShI79zNqrbMYmZti0B/UKgVHIazlpKO2Wy+gJOFCB txaKlFiXgPdRDogLmTD2dpofJAN6l3fiNwfRc+NZ3yWpdHFkUkmf6F9MfpM+UoS/uhzp eYCPtj5LTGT1UYR4JsWmbMh6tc+XjD18PD4z9sl6kW9DJQz9CiPI5gFUizV2AqSQIelZ LY25zTppi3Qcyc9XaWBgSQ5HWYX/lBXmoma4X/jNrBLvCUZkv6lD0ZmNF2D5to63PV2X +nbQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j10-20020a05621419ca00b004622c7893d1si1834342qvc.486.2022.06.02.05.20.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jun 2022 05:20:47 -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; 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" Received: from localhost ([::1]:50500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwjok-0007X1-BS for patch@linaro.org; Thu, 02 Jun 2022 08:20:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwjTU-0000bM-Bb for qemu-devel@nongnu.org; Thu, 02 Jun 2022 07:58:48 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:56375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwjTS-0001E8-6w for qemu-devel@nongnu.org; Thu, 02 Jun 2022 07:58:48 -0400 Received: from quad ([82.142.8.70]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MKsf5-1oDZuB1zDx-00LIFh; Thu, 02 Jun 2022 13:58:42 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Cc: Laurent Vivier , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PULL 07/19] target/m68k: Remove retaddr in m68k_interrupt_all Date: Thu, 2 Jun 2022 13:58:25 +0200 Message-Id: <20220602115837.2013918-8-laurent@vivier.eu> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220602115837.2013918-1-laurent@vivier.eu> References: <20220602115837.2013918-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:q1sjSe+GkGOoLn5SpR62FDp5/1rKAfDn74SyKr5evD+4lhcX5Pd xZfGAhnr42NLWnRGHF5WU+h30xWpsv5gxUuuh4WdfxyfsI6TRvAo76OMwce1Je3hBRjOExO XeLmofY4vyhoiLhHjth7vDKj5pyFRn+5Jx8bILjhicPkNM4Ey2kmJFlk/cIWS7GLUtvyF5S NqZu65HZSlLN08pCOuuuQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:evpqtX4b1Nc=:lrr91Yw8qWAJhByZVrs175 O9n77bFe49d4Q0Ykbl69Hu7XW8tKQYMcTsBJUKZ5RhwJ+uY6kUvPQAy7hdxx1tmRthajZDSLN 8uOiIEVpzJHiawGJcBt5CzxswKIzJ1Azqsw+mMYlpQcDF2B4G0eB8jIaBfcZAQMNbX8F65cjl HwOC8XjN24jFY04SduJl6dRdGy3HDK97YytgQwhOA4xLu2C0LUGzzJPuOTkZBBJezR+NaVUy7 W8z+4cEMZI0IYhdtOlKYgW8nakGSmj7zm1hlrsPAvX12d2p9aZsea5vuN8myRfeCtD2udIi8n LLccoeFCtCq1hEuiGzXYJpGx0OPu3VnNz/lnLLGuPMJJb2QzEu6Q6Gz96GYkkOfqla4hojte6 xgfQmGZcKRYnyI4iLS837/p2yhdJD4I6KamNxj+r3fq25RHysvTmBGuZ0ZV5iTQkuHk4VHEiN +FeYui67uBuNYitO/+yi41CtSzASi2OOohh3aGTmxbcpo4wJV1NB9cTg1PZp95jqcPHzgbZxt /mCNdG2DskFIAQ/EtLRgH2dShv5aEjmWaHfuOjRN3m1JcqiWH22e7ph2p245lmsGH86R7Xr5e ZpKktggtvOOGV2QceZ9Tmwrz9YydSpCCNv5aHJInp6onGH1WZYSxjZkvglkDRnaHCoiCzPkB4 hqlYHjKEKj5uEbk1vlU52da68z2ISamK/wxIAH/w7ZLE1onE9HqCNpaOZIxSja06y55m/Ql7r Np2OdIOZRTqZaI3w7FZ1LFBW6wKxwmLOpgDgXg== Received-SPF: none client-ip=217.72.192.73; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson The only value this variable holds is now env->pc. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id: <20220602013401.303699-6-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- 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 0f41c2dce3cc..777869790b66 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; }