From patchwork Mon Jul 13 14:10:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 235405 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2878449ilg; Mon, 13 Jul 2020 07:14:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTtOMJUCNmqvR0It1NTkKcAOQfvspt449Kq1k+mdjAWZZCLPnYjuoqolVfWBxEvKikyG7j X-Received: by 2002:a25:c442:: with SMTP id u63mr388765ybf.92.1594649690510; Mon, 13 Jul 2020 07:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594649690; cv=none; d=google.com; s=arc-20160816; b=ZYaehkfmIqTY+ObcC4WEXInp0qjUpj3wS0i8SgY1UnmyqReUhUzaPnC/RbkKt5gF8V WaBi1S/Rj4cAGhlZijKeKUm4RyueWLIHkkyC9Q8iU9wuftttJx2QXwIxKBz0CRZc4Lql zC4LgLXHannM8es8H2trL4P0ZcyCef3V4rNkO7JEbZRxZfv2Fogx6Dvbn9R+W5VnUijj AfT+P7h8Mw5k6Blyfu8tTjX72wffRYDrdWSQZvTVDVBT/DesYDNe7S/JgEiL2j3F/C6a HPRelc02sXprRsEhSLAG3LciiuYvxsrjIcaMesQOo/atMPbdQsgsAOd/KTesJrAVgFuX 4K8A== 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:to:from :dkim-signature; bh=XA7EtZ0Jb+HkGsgLo2baaKD+l0umSsxaqLrlSb4bGaw=; b=OKao0A07rA5QzvGLV1L/ykeUEbUGxYmUMxTWBbFBLrXHjoeTNDdDgNVYthvfUi58vD 2mSapTeAN/TwhmHr2Ab0xqjL5z1+s1W5K/mNo8lioBGoAnfmX8C3Q2wOurjadYKTMdIu /3ZzxuiroE424tLl1x8FZD2GzUbWONsA3MjAe7BGeXzPMSjMb6FJuYYNuu6ZHpD13GFq 9kCIugR53/wnv270CfS5FD83e9bnyoIt0jNSx3EeglF+C8bsT1Hi0SaMHCiDgPHQjIi+ +lijBiIkKBMrq2IWQ95Ul++VA1RxGn8J7GQgN7lcOwUa6ciOc5EXkQ96iebo66j5wDFx QP1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wo6TEw2z; 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 n140si14920611yba.205.2020.07.13.07.14.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Jul 2020 07:14:50 -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=wo6TEw2z; 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]:34662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juzEH-00035J-Sv for patch@linaro.org; Mon, 13 Jul 2020 10:14:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1juzB4-0005Z8-Sn for qemu-devel@nongnu.org; Mon, 13 Jul 2020 10:11:31 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:38396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1juzB2-0006f4-EK for qemu-devel@nongnu.org; Mon, 13 Jul 2020 10:11:30 -0400 Received: by mail-wm1-x32d.google.com with SMTP id f18so13314488wml.3 for ; Mon, 13 Jul 2020 07:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=XA7EtZ0Jb+HkGsgLo2baaKD+l0umSsxaqLrlSb4bGaw=; b=wo6TEw2zsJzv0qwyJjyck04dx/CEfRVOcu6q2WbEUNQaWi36DKpDvad1BicRchd8SB 5ewbi7yscmM6cjsj/285AGLORJf0oKtNSA7vrPyOrm/P5SsDqx5yjfKoPtaSub0P0bTb y+Dh8SMn0xAYtgBNWiXObh1JuRsBpGpyHjNDsoYfJ+cLfIQCenfZ6j9ecBxHq7wq+CYG Z13q7a5F3LFhoxmfTx3UKMb4ZN2jH1VJ9v2JQXF2e59+9Tmjbixnyqr/0sD8Uie46SR3 SAVQRHT5pzEdCJ6EddiG26yTEN11e8tNZUWsUVbFI2PEu7mHBoIv8TndxGji7XsuRs3B 8S4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XA7EtZ0Jb+HkGsgLo2baaKD+l0umSsxaqLrlSb4bGaw=; b=HymhnwIp8h/rjXXzq94n23RzOzX0BBOU8dd52WnCSF5ofTMdXBGbIGfrxm2CiDFAfj jC01LjgDc0s6RiDyyJAZgltkfk3nLb0t1wxuKUX0b4uAWKTy+GF7xJRyfoCVvDozLwIv KDj+s/R3l/FN2098deGk+QaKYGwGI99lyB/4T7fIWoK7DYMkhun7y7st1uDC453j5UxB R7cFc8e6zm4VilTf6iEQ1eozwJILHaVrzWircITNnknewoLbnKb8YR6t22Hb5iin4UdQ 04L5yCaBVzCdAou8InRZJY/jOJbXXE8GxHjcaWjbVcQAz+IeRpJchCdMWZx/o8wVk1PN qt3w== X-Gm-Message-State: AOAM532RLpCTK0texpBc+0JhJry+FVh+V9WqUOfj/toPTSRX2k414tMI VRfYG3y1mIA+qReNDhUYYEDsGPilU8H7gA== X-Received: by 2002:a1c:6246:: with SMTP id w67mr178584wmb.42.1594649486743; Mon, 13 Jul 2020 07:11:26 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c136sm24031297wmd.10.2020.07.13.07.11.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 07:11:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/25] target/nios2: in line the semantics of DISAS_UPDATE with other targets Date: Mon, 13 Jul 2020 15:10:57 +0100 Message-Id: <20200713141104.5139-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200713141104.5139-1-peter.maydell@linaro.org> References: <20200713141104.5139-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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: Wentong Wu In line the semantics of DISAS_UPDATE on nios2 target with other targets which is to explicitly write the PC back into the cpu state before doing a tcg_gen_exit_tb(). Signed-off-by: Wentong Wu Message-id: 20200710233433.19729-2-wentong.wu@intel.com Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/nios2/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 00b591cc298..c2a134f932d 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -865,6 +865,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns) /* Indicate where the next block should start */ switch (dc->is_jmp) { case DISAS_NEXT: + case DISAS_UPDATE: /* Save the current PC back into the CPU register */ tcg_gen_movi_tl(cpu_R[R_PC], dc->pc); tcg_gen_exit_tb(NULL, 0); @@ -872,7 +873,6 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns) default: case DISAS_JUMP: - case DISAS_UPDATE: /* The jump will already have updated the PC register */ tcg_gen_exit_tb(NULL, 0); break;