From patchwork Sat May 12 05:02:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135638 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1760094lji; Fri, 11 May 2018 22:13:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrWH/K0+dy1e7XyA2m0+3xyMW/G7e3m1wsi1rSIomZee9wCs9tuh2qkcNDjoZQc0eRvTUZt X-Received: by 2002:a37:a78a:: with SMTP id q132-v6mr736778qke.154.1526102031433; Fri, 11 May 2018 22:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526102031; cv=none; d=google.com; s=arc-20160816; b=BlA3FG7ciww4Eq7iVoNKRNw8cZ3tSGN5NcMgcxCf4uZCZ2qsbNcx8sIqcV8nmxGKvW lDFHXtf+45BbxsCAlpKZ/+NTgcbqJs1CWls3mlDyfMbuvUxuRkssGzc7cnYz/OyT+ogC D/I1R88fzindzeiqS3U26mpboT8hTRLwx7eupgFeP9K9RsV202RBB+VW5kOlIZPtbll7 iCBR2Yx34lDvm9u8hsBYbb5GnZfPt1BVznk0Tp1Whrjzm7O6NKyjB+UT37N8LjoEQmHh ggcUuMipl0ybtDI0Du4HNAT0454LS5CW5xULH10hwDkxYOSzHhPJwqeqe7jZCKIbIHjL Qu2A== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=UQ+zNfjQyVUBm2RnKmWYmwQxmXk3WBw2GUbAKJ4QHf8=; b=lmAI636NQvZCbUmCvKhXVXM1d3f33lG9X237GHdoqJ3I+ImtHri86bOpDtQvYS3tgb ScPUqv/sCrtoWakmtz2uPrd3JlChtrUjvM66TXVrtFvN0C/oKphPT/DWkat0Dpm6AfYY VnLErCsVdEJEcXcuQCzu6673QtGFcrhM8IMINGoVHtJkJLgpuI9ele+qt9rUllvD1xXR i7EEdPoHUmOw/iysWpCPbgTyD9NWPpVJVJzFpoUAZUOEAEk9efdx1iOoc/yloF5hUyk8 UhPiku4ExVHRDDPS4HrTOY6ePkcqcMRdJS8rutkGKDmK4PULV1K0rVXa27drMzHhsQZv GfGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RqXUlZOx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d26-v6si4386279qtn.268.2018.05.11.22.13.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 May 2018 22:13:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RqXUlZOx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:45717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHMqs-0005dT-RI for patch@linaro.org; Sat, 12 May 2018 01:13:50 -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) 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-Received: by 2002:a62:59d1:: with SMTP id k78-v6mr1704730pfj.54.1526101378386; Fri, 11 May 2018 22:02:58 -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) 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.17.0 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) /* 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 dynamically */ +#define DISAS_EXIT DISAS_TARGET_1 /* cpu state was modified dynamically */ #if defined(CONFIG_USER_ONLY) #define IS_USER(s) 1 @@ -1446,11 +1446,11 @@ static void gen_jmpcc(DisasContext *s, int cond, TCGLabel *l1) } /* 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 = DISAS_UPDATE; + s->is_jmp = DISAS_EXIT; } #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); } DISAS_INSN(move_from_usp) @@ -4680,7 +4680,7 @@ DISAS_INSN(cf_movec) reg = DREG(ext, 12); } gen_helper_cf_movec_to(cpu_env, tcg_const_i32(ext & 0xfff), reg); - gen_lookup_tb(s); + gen_exit_tb(s); } 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); } 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); } DISAS_INSN(to_mask) @@ -6144,9 +6144,9 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *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: