From patchwork Tue Jun 23 19:36:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 191499 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp2275334ile; Tue, 23 Jun 2020 12:41:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEdgRwMejAX4ZbgQQmtUvvd0uhB4l0IBsUOlWXhz6ejyNmPwy+7hwV3rqhXb4iXrE3Un2y X-Received: by 2002:a25:348c:: with SMTP id b134mr39334194yba.105.1592941295294; Tue, 23 Jun 2020 12:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592941295; cv=none; d=google.com; s=arc-20160816; b=Wui00hHgZwsYnxh9488yLcVquAKx8HewmEZ8BYfshAA8sVsnolFhtFAy0FbB2XPHBY XNB0MNDZ+47Kl0vxSImaIJAWRh0pqhE+IffBNhOxsc4RCdQotNY2AOGCMqAc5AJc9Wki yt9uLc4O8jRZgjIQ0RNQRTrLAr1FpSbXgZn8z1VkUtFLMS9YyUDpgqmTnTIz3RiQqIh6 +Xr5KQLtuceHde91SoTYv/Sni8KY1Oi7/c5HYTXVdyF7B5WQUN7hRsNhs6Esl1X7caWC aFzvhoLqt3Hat3RMFHUT/sN9czNh6BQJLc5ZiMkghIKW+BjKdGeZpnYsJv+OOZdvVikc Q3rA== 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=ztdDJx0ExFHe8U9Rsp15LQewSOcXI1YJBCF+u1ybiMg=; b=CH9uF62C7iNUw+VV6Ezi6qgchNmHwncSNCwuw45LsSV94s3e/SFQ3ShIJa67q5Ev5Y mSiPSioFHzzbFi6fK+/yLqJQVGCrdpXWGi3b9uFIXz6zzzO9R8ro8WDM8HedOvgedtbo ajB8AlvUHGtzrzBxPkjc0VqUnxXZthxiBOV/QFmQf9I6ig9W5EY32Mgx5/QpDui9K0Zv cDzd0oFdcBHKW/BSktHtnj+TrSqdVDB19rZbIQuzVsgdjXxMop6eO6tG9E+ZfyQIzneG 6wbFnyTpPfckE3N5QvCR2yOpAN8CEPmcNO+Q1nr6BpynGggD2WWwkT2b43kocVWPzQKP J7qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="dD+6/qZH"; 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 m21si18449687ybf.470.2020.06.23.12.41.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jun 2020 12:41:35 -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=fail header.i=@linaro.org header.s=google header.b="dD+6/qZH"; 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]:35102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnonW-0003Hs-NI for patch@linaro.org; Tue, 23 Jun 2020 15:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnojI-0003ME-Od for qemu-devel@nongnu.org; Tue, 23 Jun 2020 15:37:12 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:40191) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jnojG-0005XX-F8 for qemu-devel@nongnu.org; Tue, 23 Jun 2020 15:37:12 -0400 Received: by mail-pf1-x441.google.com with SMTP id s23so10556179pfh.7 for ; Tue, 23 Jun 2020 12:37:10 -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=ztdDJx0ExFHe8U9Rsp15LQewSOcXI1YJBCF+u1ybiMg=; b=dD+6/qZHp/Je6fa++veUSdrBukySRuCBizJAX1jUzbZ7UUw/VehNs2LIniG+Mjk1fO fBZonBaCjTI0osePmb1DbhP1LFsGgestwr1uGZBwy/kB2EOh+otUsDcGqYgPQFI4/N7y r6HihAUI/GHcxqHGpkw7qJcUSrTHui1jw45nZJEGrnroH4nN5Ja71ZNmQvMGhLIDCl+e qmUoUCTuHMhgv6/CK38rmV3s/Vapfw8UX2LiceJgsPqzzpEwysiP8gKZYEKWVCgdzTOo v9FXMavXdn7gFUL8Iwo9DA4otJx622kTCpNB4k+CaOQhjN4ySujiowILgRFC9zfGjm+E xMlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ztdDJx0ExFHe8U9Rsp15LQewSOcXI1YJBCF+u1ybiMg=; b=qtmgcFbbtk0vVgHIlKm7wZ02ij01F+AMt7TjdsmrSC6WeisNnTV3HoY8A+a9a6py4r yZWBTNC8tsBUKCFCvfr+a3xF+E9dmQa3a/9JcHYrRa1FGnbzez/SBL0L42jZpuEuJoE8 BJ6acKtXHTi1kpxlB7UwAXK6yqnfzS1lxxNBnYuD1QOLhNVUkBnOpsBlnnXO3iQIMcpq Uaq6kdHKZeRDU+lDiJS/yOGryP9DuDJZbdzE40996x6mnaYanb2i4ueI3YO6XowM5o/l yDpbYm3hriWT1jBS/IGHWAdP3P2jzvyVULvVYBpdNStMJ3kyjeJez7vWy1qFmT+zixXS JXQA== X-Gm-Message-State: AOAM530GPoSYcaRVCV3hglEOuX9SGnhl2cquN4jysj05gLpizOatRw/h 4YTd6g00QNqGlV7F+fl55I7XvIhObgk= X-Received: by 2002:a63:5d04:: with SMTP id r4mr18789452pgb.15.1592941028697; Tue, 23 Jun 2020 12:37:08 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id p12sm17927642pfq.69.2020.06.23.12.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 12:37:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v8 06/45] target/arm: Add DISAS_UPDATE_NOCHAIN Date: Tue, 23 Jun 2020 12:36:19 -0700 Message-Id: <20200623193658.623279-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200623193658.623279-1-richard.henderson@linaro.org> References: <20200623193658.623279-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x441.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=_AUTOLEARN 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: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, david.spickett@linaro.org, steplong@quicinc.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Add an option that writes back the PC, like DISAS_UPDATE_EXIT, but does not exit back to the main loop. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate.h | 2 ++ target/arm/translate-a64.c | 3 +++ target/arm/translate.c | 4 ++++ 3 files changed, 9 insertions(+) -- 2.25.1 diff --git a/target/arm/translate.h b/target/arm/translate.h index 6c01f47983..c6f9376000 100644 --- a/target/arm/translate.h +++ b/target/arm/translate.h @@ -173,6 +173,8 @@ static inline void disas_set_insn_syndrome(DisasContext *s, uint32_t syn) * return from cpu_tb_exec. */ #define DISAS_EXIT DISAS_TARGET_9 +/* CPU state was modified dynamically; no need to exit, but do not chain. */ +#define DISAS_UPDATE_NOCHAIN DISAS_TARGET_10 #ifdef TARGET_AARCH64 void a64_translate_init(void); diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 63029bbc59..b4bf4cce18 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -14310,6 +14310,9 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) case DISAS_EXIT: tcg_gen_exit_tb(NULL, 0); break; + case DISAS_UPDATE_NOCHAIN: + gen_a64_set_pc_im(dc->base.pc_next); + /* fall through */ case DISAS_JUMP: tcg_gen_lookup_and_goto_ptr(); break; diff --git a/target/arm/translate.c b/target/arm/translate.c index 45ea788370..00f94371a4 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9926,6 +9926,7 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) case DISAS_NEXT: case DISAS_TOO_MANY: case DISAS_UPDATE_EXIT: + case DISAS_UPDATE_NOCHAIN: gen_set_pc_im(dc, dc->base.pc_next); /* fall through */ default: @@ -9949,6 +9950,9 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) case DISAS_TOO_MANY: gen_goto_tb(dc, 1, dc->base.pc_next); break; + case DISAS_UPDATE_NOCHAIN: + gen_set_pc_im(dc, dc->base.pc_next); + /* fall through */ case DISAS_JUMP: gen_goto_ptr(); break;