From patchwork Thu Jul 13 14:19:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 107684 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2277746qge; Thu, 13 Jul 2017 07:22:02 -0700 (PDT) X-Received: by 10.55.187.134 with SMTP id l128mr5370971qkf.90.1499955722793; Thu, 13 Jul 2017 07:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499955722; cv=none; d=google.com; s=arc-20160816; b=uDZYKM+v/u1mPSYUHBJV3zr1VsnQSvvBJ2IOZ4S2njnTdH8PFJt3MwaWf/AlcDlwT9 ndg4wNw6nhSUCRoSDYkZ2UaI7bt3EMimgETldNYzFnW9rMC/bN51FN2u5GBCg2KExBtv HqgMdTnPl4WSoebd6SIEJC7U7hjoYA2eejUUhSNxag/aB/4EOEPiX6Wd9jtcVybVqnb8 8QLsDxtxfdg1aGe2qgEqZ2rTxyByF8wwlVaISKr97osdNhrRIw5pa/TYBBNsac+13Irv imQbwGJOwgxvNk6kkB056x3hZDLTwdnH/U1h9BUtt0yHmH0KWH/OXS9FQbf4Z4fAbeZo Mk9g== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=hwboCQert8ciWJKWXYfHpHHfqDKw/zqK0ghn6J7Czrw=; b=tGYRuxwc79Vygt0DAQmNiWHnD9pdhuF2Y5de83uexXy/VQHGiq4i3jDBOyyM17umB2 6L1Q4SZKK4OblxiWkt5RSyHuKEwd3aVduJ7Yayc5K7Mf/uX17qLjb+VG0bSm9k2fekRL 04Rfxfb+4pvVIi+R4VEBg6lMj7uvu8VikEWubro2Ot10piofioXJXSKpNoI7MuiKmDDg k6yqFnvHs5yvEMqq2x23p8+7+uapbDmU/62M0YsYo9TXP1o9ihWqXsNRASIRKAwdh2W7 14QaXE9PkzhQNqWBCgxA1az2jBk1wpbQEc7mvIk0AWEf/1FHLl+wdURzFXAhYvGLA/w8 EbcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=dqRkXoKn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.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. [208.118.235.17]) by mx.google.com with ESMTPS id q64si5105543qkf.304.2017.07.13.07.22.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 13 Jul 2017 07:22:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.b=dqRkXoKn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.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]:60341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVf0C-00060c-7C for patch@linaro.org; Thu, 13 Jul 2017 10:22:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVexu-0003wU-LS for qemu-devel@nongnu.org; Thu, 13 Jul 2017 10:19:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVexp-0006Fy-Tk for qemu-devel@nongnu.org; Thu, 13 Jul 2017 10:19:38 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:34003) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVexp-0006EM-Lg for qemu-devel@nongnu.org; Thu, 13 Jul 2017 10:19:33 -0400 Received: by mail-wm0-x229.google.com with SMTP id 70so4084298wmo.1 for ; Thu, 13 Jul 2017 07:19:33 -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=hwboCQert8ciWJKWXYfHpHHfqDKw/zqK0ghn6J7Czrw=; b=dqRkXoKnVfF8MgA7erPRXwGV+4ssOiKxQJlaUSEdYXngibb+8nzu/cRTkAr44c+X6I J+xy5Ab4OFoCaIpI7FhUufp7lQXMimP0X0labcfKNyuDA1dldMc3Y63aJe90p8inogEu Q9yBLnpLgyMXzrRdIxPmBlS4wx09xUMdLX2ok= 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=hwboCQert8ciWJKWXYfHpHHfqDKw/zqK0ghn6J7Czrw=; b=qkDm7S+MlJPTWlaSsvIEujQ/GJDAZPpoCFYi4PtFsqabLCM596Di6pE51Gstd3oUHQ Ljfto98VT4nFcqk1GODHSBo47glQYUZ2UvBYoIeUVmI7oqIROnhieqmgwCQxk/rlJUuv HUEfwWbKSLX461Qdk5IsStIM0BbIWG/jhVu4qS3HIkIcfhitxUeXaQ9NCHi6sc5TsxFq /s/O8PVmEnvukh6l/a4jtJTloZH4/suh1EEXyD7oydqCyNuRSIRqCwe+ZdIliOk+igYI 5RuXvf5KTmTaPqXZaOLYM/hzrSMRm33aMlELCYhfywMfqgQaVt+IELLeFf3IeUEhGi4X 8Vvg== X-Gm-Message-State: AIVw112pO5o0vUPEmBGe4Q5JNrf7eeodF8+uc8oZJhw8z8xYUgI8fvhT dHtp6F11lTlBnihhjkS0Vg== X-Received: by 10.28.63.66 with SMTP id m63mr2262803wma.118.1499955572587; Thu, 13 Jul 2017 07:19:32 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m123sm7174973wmb.3.2017.07.13.07.19.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 07:19:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 0B1513E0731; Thu, 13 Jul 2017 15:19:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 13 Jul 2017 15:19:24 +0100 Message-Id: <20170713141928.25419-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170713141928.25419-1-alex.bennee@linaro.org> References: <20170713141928.25419-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::229 Subject: [Qemu-devel] [PATCH v4 2/6] target/arm/translate: make DISAS_UPDATE match declared semantics 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: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" DISAS_UPDATE should be used when the wider CPU state other than just the PC has been updated and we should therefor exit the TCG runtime and return to the main execution loop rather assuming DISAS_JUMP would do that. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- target/arm/translate-a64.c | 14 +++++++------- target/arm/translate.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) -- 2.13.0 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index e55547d95d..66139b6046 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -11364,16 +11364,9 @@ void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb) case DISAS_NEXT: gen_goto_tb(dc, 1, dc->pc); break; - default: - case DISAS_UPDATE: - gen_a64_set_pc_im(dc->pc); - /* fall through */ case DISAS_JUMP: tcg_gen_lookup_and_goto_ptr(cpu_pc); break; - case DISAS_EXIT: - tcg_gen_exit_tb(0); - break; case DISAS_TB_JUMP: case DISAS_EXC: case DISAS_SWI: @@ -11397,6 +11390,13 @@ void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb) */ tcg_gen_exit_tb(0); break; + case DISAS_UPDATE: + gen_a64_set_pc_im(dc->pc); + /* fall through */ + case DISAS_EXIT: + default: + tcg_gen_exit_tb(0); + break; } } diff --git a/target/arm/translate.c b/target/arm/translate.c index 0862f9e4aa..5f2cea8641 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -12095,12 +12095,12 @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb) case DISAS_NEXT: gen_goto_tb(dc, 1, dc->pc); break; - case DISAS_UPDATE: - gen_set_pc_im(dc, dc->pc); - /* fall through */ case DISAS_JUMP: gen_goto_ptr(); break; + case DISAS_UPDATE: + gen_set_pc_im(dc, dc->pc); + /* fall through */ default: /* indicate that the hash table must be used to find the next TB */ tcg_gen_exit_tb(0);