From nobody Sat Nov 1 07:20:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152610199297641.91215486480348; Fri, 11 May 2018 22:13:12 -0700 (PDT) Received: from localhost ([::1]:45717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHMqG-0005dT-5C for importer@patchew.org; Sat, 12 May 2018 01:13:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHMgO-00041A-UP for qemu-devel@nongnu.org; Sat, 12 May 2018 01:03:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHMgN-0008Ly-WC for qemu-devel@nongnu.org; Sat, 12 May 2018 01:03:00 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:40795) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHMgN-0008Lo-Q3 for qemu-devel@nongnu.org; Sat, 12 May 2018 01:02:59 -0400 Received: by mail-pg0-x241.google.com with SMTP id l2-v6so3252015pgc.7 for ; Fri, 11 May 2018 22:02:59 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id x124-v6sm8999945pfx.72.2018.05.11.22.02.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 May 2018 22:02:57 -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; bh=UQ+zNfjQyVUBm2RnKmWYmwQxmXk3WBw2GUbAKJ4QHf8=; b=RqXUlZOxJSCV0057I0ly8V7eaa2CRlvZx51934qSkps9XjxhsNgx1LL2iZxjKkRbIe i3Eo31ph48yXpOXmJ7DyNnsG1urIUo4CWJkgWBtXXDypn4nHsIpAAvcddm+LF+fhno0q YxpT3yx2vemvHqdUP5bbZ3pCkI71vY5N28naw= 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; bh=UQ+zNfjQyVUBm2RnKmWYmwQxmXk3WBw2GUbAKJ4QHf8=; b=iqP5M17CZ6EUfAc1YjTWkBdarzUMP+nvlKUvM35u/GsH6Q3w6KsupFsxeoIPxLWasA uxgtZcph4Xym/s33HqbjMbvOnrAizk4VxnmifGGMw4BYeCX5+q9DG4oQ5lOVzq41s34k SXNTgoPKVBWu9+J0a4xdUaxtHqVNTMekY+Nm4nCWOcs2Q927NvMkKE61iabVv+86vmpY Y5WsJiuhwR/HjNugW3Ev7iYoYkhoCDvf86W5ull4O82/ZRr/JzfNQuC8O1LTyDoLM/uO k3AsrPgboH3h6jTV3kDYylsAWGwdEx5arOxb298rlsZx42PI45c54B1HvzA1CRrVGj3P aGJQ== X-Gm-Message-State: ALKqPwef2+mzBMcpf9tBmpRwO2Il8ioXxSO8DD2C2JO61ue3cT3HiMqk Q1qYL73XKZCzMWV1FfQrEq8XIUps/HE= X-Google-Smtp-Source: AB8JxZrsMPb1hXvu/4HZ9R/o3jn3UfgW55IGoSH9P1iKfC2gXCKLSVjwwLy0aOM54v1gFy/DP4fgvA== X-Received: by 2002:a62:59d1:: with SMTP id k78-v6mr1704730pfj.54.1526101378386; Fri, 11 May 2018 22:02:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 11 May 2018 22:02:46 -0700 Message-Id: <20180512050250.12774-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512050250.12774-1-richard.henderson@linaro.org> References: <20180512050250.12774-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::241 Subject: [Qemu-devel] [PATCH 5/9] target/m68k: Rename DISAS_UPDATE and gen_lookup_tb X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The name gen_lookup_tb is at odds with tcg_gen_lookup_and_goto_tb. For these cases, we do indeed want to exit back to the main loop. Similarly, DISAS_UPDATE performs no actual update, whereas DISAS_EXIT does what it says. Signed-off-by: Richard Henderson --- target/m68k/translate.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 80712ed0af..ff1a8d58f4 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -198,7 +198,7 @@ static void do_writebacks(DisasContext *s) =20 /* is_jmp field values */ #define DISAS_JUMP DISAS_TARGET_0 /* only pc was modified dynamically= */ -#define DISAS_UPDATE DISAS_TARGET_1 /* cpu state was modified dynamical= ly */ +#define DISAS_EXIT DISAS_TARGET_1 /* cpu state was modified dynamical= ly */ =20 #if defined(CONFIG_USER_ONLY) #define IS_USER(s) 1 @@ -1446,11 +1446,11 @@ static void gen_jmpcc(DisasContext *s, int cond, TC= GLabel *l1) } =20 /* Force a TB lookup after an instruction that changes the CPU state. */ -static void gen_lookup_tb(DisasContext *s) +static void gen_exit_tb(DisasContext *s) { update_cc_op(s); tcg_gen_movi_i32(QREG_PC, s->pc); - s->is_jmp =3D DISAS_UPDATE; + s->is_jmp =3D DISAS_EXIT; } =20 #define SRC_EA(env, result, opsize, op_sign, addrp) do { \ @@ -4604,7 +4604,7 @@ DISAS_INSN(move_to_sr) return; } gen_move_to_sr(env, s, insn, false); - gen_lookup_tb(s); + gen_exit_tb(s); } =20 DISAS_INSN(move_from_usp) @@ -4680,7 +4680,7 @@ DISAS_INSN(cf_movec) reg =3D DREG(ext, 12); } gen_helper_cf_movec_to(cpu_env, tcg_const_i32(ext & 0xfff), reg); - gen_lookup_tb(s); + gen_exit_tb(s); } =20 DISAS_INSN(m68k_movec) @@ -4705,7 +4705,7 @@ DISAS_INSN(m68k_movec) } else { gen_helper_m68k_movec_from(reg, cpu_env, tcg_const_i32(ext & 0xfff= )); } - gen_lookup_tb(s); + gen_exit_tb(s); } =20 DISAS_INSN(intouch) @@ -5749,7 +5749,7 @@ DISAS_INSN(to_macsr) TCGv val; SRC_EA(env, val, OS_LONG, 0, NULL); gen_helper_set_macsr(cpu_env, val); - gen_lookup_tb(s); + gen_exit_tb(s); } =20 DISAS_INSN(to_mask) @@ -6144,9 +6144,9 @@ void gen_intermediate_code(CPUState *cs, TranslationB= lock *tb) tcg_gen_lookup_and_goto_ptr(); break; default: - case DISAS_UPDATE: - update_cc_op(dc); - /* indicate that the hash table must be used to find the next = TB */ + case DISAS_EXIT: + /* We updated CC_OP and PC in gen_exit_tb, but also modified + other state that may require returning to the main loop. */ tcg_gen_exit_tb(0); break; case DISAS_NORETURN: --=20 2.17.0