From patchwork Fri Jun 26 03:31:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 191759 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp103519ilg; Thu, 25 Jun 2020 20:33:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTHZGPa1djapPcL5R0QVKQABjD34Gxo57y5FOoTWaJWMOiPaxAR8MOfUV3fSy36JIPNg/r X-Received: by 2002:a25:b3c9:: with SMTP id x9mr1756313ybf.203.1593142439564; Thu, 25 Jun 2020 20:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593142439; cv=none; d=google.com; s=arc-20160816; b=SgUumZUr62/1O1g9mMigGiVPGcrME033gV84t/dtpExsk1MLVG6valIjGHMgauhBDp B4RSqKB3quZfKWcuD5BvOAXG95/A83m8fsLPCzTwmHzI2iOiYtY6oc+1307Ut3uPoae+ 9XwAGxUQg6oS0lBxhkfTnbfifDJdQ7xfGc5LVutg8xWaNkttKr48oku+k3gifx96DGWf Owlqv9zzYomdOQRMUI9GFe03jpBdB45QYtY3CEOB+bswDG7DZhcVdBNPve6jFZkePaw+ nNN/h12zY24MmkYvUHp1C0qnNXOPyU/Tt1TsumiFuohkgg+io2PSOa5xf/6YO3Wl3vks em6w== 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=qjCCkNm/WEF6pUjIrj3rNiuTiPovNxbXAxAumNuxRgg=; b=IizivyWvRuv9LiLzJYLIubQaFggs7GzhSIJggKuhymmuDl2dZ63zd/Lo+lPK2UthkI viiPN6TZcInMQLTieDw9IbBRZTGcw1rsaoLmsdwyYami0AGru+2lHxB9lcTd96/lhy7m Q7Xs0osJSq1/d3T09h3vYSJN/KHBA+4ipsaHLmqswJ/y3G8lErXtB2GI9Im+UnRQxXEs 9EIuX6EdvyDQ2GTJMYqxgG0wpa7gvj5EQXJriROt5Ct3hnoev8m8k5o5kj0PjHuoiUPh riq/+/DJh6rDq7t/mZTE2uRQIgsf+C1xlAjl1a2Ie7eAsiOplW/BPmEAFzxUj1KIjomg UhXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sl0OPoAP; 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 v12si22268381ybm.487.2020.06.25.20.33.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jun 2020 20:33:59 -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=sl0OPoAP; 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]:60878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jof7n-0003JM-1S for patch@linaro.org; Thu, 25 Jun 2020 23:33:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jof5q-0007xB-7a for qemu-devel@nongnu.org; Thu, 25 Jun 2020 23:31:58 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:38364) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jof5o-0001lT-ES for qemu-devel@nongnu.org; Thu, 25 Jun 2020 23:31:57 -0400 Received: by mail-pj1-x1042.google.com with SMTP id d6so4363692pjs.3 for ; Thu, 25 Jun 2020 20:31:55 -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=qjCCkNm/WEF6pUjIrj3rNiuTiPovNxbXAxAumNuxRgg=; b=sl0OPoAPJZ32vi3cuqMGpLe0l1Db0N8wy2GmD3dvaF2SWhvYhBzVfmDl3Al3Of7q4V nx3iBeyV8jBaosfUhbyD/am/XYhiqYXyTUNoDHJwTZYiyQSi679GBK3tbaeYd6SD82LB +b9r9VpDHqggPa6hfwFO392CZMS6jfscKypQslKAxN4EK3ZnW8ibV8rUBB3Kw5zqMqGC N+6Z9fBbbwQc7yrQoC+8w6mN0T8IdOS0fAlN5dhKOUmGMaIUFKKU+iZI2wgisPO2qGkb 2sKrLsd39OA4zzlBC3GYqWSXs661HYML0rbj05l0AvwsEAD7ReT4K7o5Nu2/OtJvut+Q SbIQ== 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=qjCCkNm/WEF6pUjIrj3rNiuTiPovNxbXAxAumNuxRgg=; b=qvEKntHju0Q9aILb4OM0910O5t+0QwyoSQBfI96RwcWP5ZdSAXzHc6+6h3FpJSg650 VMCcSOfQJBUw375ypUDQMymb3wBQwJKJzP4/gczYOiaRPdIeYA4XvGrZICvP1j+feSU9 ATpWNPH//yLQfqn3fkNJztNZ/VltVXUqpGPVrNK/ZpkdPZ93WM1HYdg7rGF1QWLm9Muv q/u80H4bBuleMqOHexUbW/IUidQSVWErLtUswLZgmPjov+dA7cwjC4UKa0KT/+72muoL 2R2tAyGYPDad3yUd1vejQM1e555RV6StqiHeEWGU81uGzIqPhqhKFUnBGh7TapGAE5ca WafQ== X-Gm-Message-State: AOAM531d1dDS0SEZTQ50UEqUBgM9doHIQxTyH4ACxKVYXDjYjmBs3Ovn DCJM2fqntmP1W34jrXzTU6s2timwZI0= X-Received: by 2002:a17:902:121:: with SMTP id 30mr903461plb.44.1593142314544; Thu, 25 Jun 2020 20:31:54 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id y27sm1605256pgc.56.2020.06.25.20.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 20:31:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v9 06/46] target/arm: Add DISAS_UPDATE_NOCHAIN Date: Thu, 25 Jun 2020 20:31:04 -0700 Message-Id: <20200626033144.790098-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200626033144.790098-1-richard.henderson@linaro.org> References: <20200626033144.790098-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1042.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 d5edef2943..6dfe24cedc 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 e4795ae100..027be7d8c2 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -14298,6 +14298,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 146ff5ddc2..c39a929b93 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8874,6 +8874,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: @@ -8897,6 +8898,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;