From patchwork Wed Jun 3 01:12:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187406 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp70865ilo; Tue, 2 Jun 2020 18:15:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzeyJHVa4dSAH9x9Y8iN3K1/Oo2wGi7oCvJ7TG4FD0/eoyTRJGTCKOKNP0v/AcBG2uYlbg X-Received: by 2002:a25:c054:: with SMTP id c81mr31221047ybf.76.1591146943843; Tue, 02 Jun 2020 18:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591146943; cv=none; d=google.com; s=arc-20160816; b=VOStIS6QzUDl+NNAHrS4JC78jAF5kIO4n8o6O3Ckw9+F8yL7Sg1cCGOaMYOeOoCmol Ofc4fFXbriaih0yIMuehOiHDrM3mEeEKJIdDbOWxXjMrYpmcDu/YOf3CAp/8RHOK7TXU Ny9NreM/GItWf29k0KmruVljWnQeVCl3O+HapHLXUKJJ/vNq/QGok9hCMkOg21tx59qu rSBCC/A8K+tR0T099LRbNEdaCZfv6Cox2JvgXOTp7ZHd1a3HbCN/7slJ4rg/d1EhU6Ji Ic/gHpJcpQtaiMiT3Sgut2Om21P7Pg1lc7oDxkZK8j4MlJIkvVyycCCKjmeyRXfgyDeQ wYpw== 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=2dMQqpeyi0XKIpauyWT1oQVejUj1nmYGROEX25a4OR4=; b=yuIY1RRmIlTOwfqou5WUMcU8Ad3Bmsm6KAPjMDsx2CUKA8NfGIIigUgOZRQcBgg9Oj 1VkfHBIWd98AgLwpGg3bmJ6oc8M4b+IIIARmD1dl9bGcEInrOqR1pEQiXKK/89oPoJsJ i4ps91ivsGyJT2Ud3ccYNzZGG7Mm+Cnwi4ZxlsXYUjJk6bJv4v4h3oZAFk+fXjQSzZLK x/+Wd+mIosp1lT28tpK8SIxaAcZe4pdPZXIw/f64KOhx4kAEap6RhPjeV2FDWfV7pOur zouIpzZPYS3ocbbMuylKR7Y9Vnthjjio1GfSNSrIw+0xbtXRLu1ngdNxAuveOv9PWIKn FJRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=P7yUf7QQ; 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 d31si295844yba.474.2020.06.02.18.15.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 18:15:43 -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=P7yUf7QQ; 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]:55022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgI0N-0007ok-5V for patch@linaro.org; Tue, 02 Jun 2020 21:15:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgHyC-0003UP-PH for qemu-devel@nongnu.org; Tue, 02 Jun 2020 21:13:28 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:36969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgHyC-0003X4-1W for qemu-devel@nongnu.org; Tue, 02 Jun 2020 21:13:28 -0400 Received: by mail-pl1-x643.google.com with SMTP id y18so201724plr.4 for ; Tue, 02 Jun 2020 18:13:27 -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=2dMQqpeyi0XKIpauyWT1oQVejUj1nmYGROEX25a4OR4=; b=P7yUf7QQBE5+/vpm46q5Q4PrJEeyCCeg0Ufbn7DdA+si9Qoxr68iS2PL0j0ei/ftZC iY/l9i84a4oJOxaSHwQIaQjot8cFBR2Z/zZXRKtbJ6+D8bNKKoaD91JYfzisB74MNwAR 2ZAvKiYG4SF0H2WaMVyg0MC3EsgN8eR395IsckgidIoPo4jke2cWeDTDtbnQyYwMCRSp IPv4dbhVsORCd8x1SovWN7d5IHLQSHzOMTCQQh59Z8Mm1T6UkIECXhPFlNh+BI9/X1zi y6V1+t6id2EfsWXZ86bArKfdfVctHF9p3zFJT/GxzxQ99KQKIy1iJX4t2f1eHgKJD0EP L+BQ== 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=2dMQqpeyi0XKIpauyWT1oQVejUj1nmYGROEX25a4OR4=; b=CqAVvHnVbykRX00kQV/fsHGVXj9X0C+2Qv1OBUu62dGoKxc9Agef0bdn1ar8kn5p+z 70PWcUB3K7hNYUStDFGnhPE10aC+29DaocBwGnplUsxjq9LKwhpImWao2L3t+DLYbfRw RYEqunemEHvbC5ghehLaYleDpzONemhv3PgIsiMZDROqvLQGuo5xgjkLnbYJoxliGOmO 5Y7SsW4r6CJ3H5To/uHbjha3zHu1khd8o92WDPxC/MSF4MV2/E7RdFgO2RCf0Vb6eiOu jsEhA3Qb2C3Tl8GZKJJGrxmO8jg9C0hIvmB/Z4dVV5i2HpgBZpm39rCVcVP7T5bFMBSi yOKA== X-Gm-Message-State: AOAM532npcO6BjR5nA5Nu9YavYpNtqgJxlelYSnVbJJUatPyu7bmDvrR AsnODjElQHWe2fWlAlKh+YPGjnPM54s= X-Received: by 2002:a17:902:9f90:: with SMTP id g16mr20197123plq.146.1591146806315; Tue, 02 Jun 2020 18:13:26 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id 3sm290067pfe.85.2020.06.02.18.13.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 18:13:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v7 06/42] target/arm: Add DISAS_UPDATE_NOCHAIN Date: Tue, 2 Jun 2020 18:12:41 -0700 Message-Id: <20200603011317.473934-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200603011317.473934-1-richard.henderson@linaro.org> References: <20200603011317.473934-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x643.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_PASS=-0.001, URIBL_BLOCKED=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, 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. 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 Reviewed-by: Peter Maydell diff --git a/target/arm/translate.h b/target/arm/translate.h index 68a55251c3..81e47677c7 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 430f1867ab..d4d2f69d87 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -14340,6 +14340,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 00a6fe6752..460be11f31 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -11085,6 +11085,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: @@ -11108,6 +11109,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;