From patchwork Tue Jul 11 17:59:33 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: 107410 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp6653obm; Tue, 11 Jul 2017 11:02:15 -0700 (PDT) X-Received: by 10.237.57.163 with SMTP id m32mr1474106qte.117.1499796135713; Tue, 11 Jul 2017 11:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499796135; cv=none; d=google.com; s=arc-20160816; b=qQCkFYvbL6S5M2HOGZcU5w4w6QaMaetpWIfKv0MMfO0CR9G1KLtXOsOoq3WLGCO0oM l9AIHEhQ7JiQodHmc9P9sLSXMh/rPHKxAJ4ye2OuYYsdy+b+n3UIeGochszd/VdVeQLP 0RFovBw3qHc/ReSBO65LZ6cmJtrF0SC+4oD1tYGDp72FwoCJPE2CWnjTqZhPtKngqcIq NL0TFSL23QIpzkAWi9BV8gEV8z35gaQxgdEgT4l78DxvJOCqmBHMBnZJne9Tg+5yj0bF BpqvAnGn+TGs2bx9kK7Dm63BTIo0yxlRarul393hJ83t0YfFYOU3gysdF7Izn6R8wTbT +5qA== 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=G070t7uh0AJrDAD+L2kA0qHq7MBUSy+7/GBErfEWzblxLDfoAPOM82uHkXW44V6EoV Fo4gX+D3AZBBEjmXojgxCIsLbvY4NqywYkaf4slwwAgO/hsScmalF+eeMYsghWU2u5CK dl+TJVLkUK/efdkmihC+RavBgDifDVbTrSulKzZWEsrlSlA4y+/SyYFFjVR6WM059LLP Aowm7mUAQIvreAWsW4+Ris0iWwsdpGM9GWm+IuhMW+Hq830ijQ1rPvImkjakRCejRYqR B6UbEwBoq/jWfevCdxc1DPWCFboGaVFXCqek2/TQEcawGD7vcYlB9nl1k7DqzWlx/w9J chBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=duON555l; 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 a143si496565qkb.250.2017.07.11.11.02.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 11 Jul 2017 11:02:15 -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=duON555l; 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]:48114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUzUD-0003LA-6f for patch@linaro.org; Tue, 11 Jul 2017 14:02:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUzRo-0001i1-Jp for qemu-devel@nongnu.org; Tue, 11 Jul 2017 13:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUzRn-0003nm-MP for qemu-devel@nongnu.org; Tue, 11 Jul 2017 13:59:44 -0400 Received: from mail-wr0-x22c.google.com ([2a00:1450:400c:c0c::22c]:36439) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUzRn-0003mH-FT for qemu-devel@nongnu.org; Tue, 11 Jul 2017 13:59:43 -0400 Received: by mail-wr0-x22c.google.com with SMTP id c11so9458923wrc.3 for ; Tue, 11 Jul 2017 10:59:43 -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=duON555lQw2Jr+e0Vufg0kZofNEIrKCzn2xT+6LuNq93tcnpRUMu+a0VBmHUOtj27P /vnSpYIU9KNt9HQfFNx0k25Irt2CPpDM/UDNAj9z/+2JeiHisujqMK9LljkL1KNInZhv La1Wmqdpl66pr3hwUTIJXnBstvsBUCvSxbOx8= 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=XGUoYLzcyg1bDcxXnQj4YFrvlYzQxbK6rxCZA6GGIGN7mghLYPEiRkJnKZik8oj8Ky AqBoXDRKSFdbtvB7tj9jLNk72Npy1xI2nCjoE9DyZIGVXM0+4pDlf29T2+R4pCGYKEGj AnDNLYJlm+kLpF2LZ6pan4nfGUeFgvmB5jfxU7QWaT7cZ4FrEB9HxtVcY62Ub7XqHaKL b9YsWlbs1bI94ew9+nI1j3bDD/tSSQpPOVk1OnKYVRAUh6OqL4bgvdPuSE75Bv6qBJU0 bYiJx/VBlEaYSecks0ak/EGz3Sb5/BOgtTDlh0dtKi7IjizEm0Agy6Tw9MSCbTMe2Dzq kt3Q== X-Gm-Message-State: AIVw112RhSEsoh3uHcufC8KYwZJXW1m6Ywpt4RpDQ2ESbh5Z+JBBm9UH AyxGXpVCPKQ8Y/7p X-Received: by 10.223.141.138 with SMTP id o10mr671050wrb.69.1499795982274; Tue, 11 Jul 2017 10:59:42 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 123sm15826333wmp.1.2017.07.11.10.59.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 10:59:39 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 169543E07BC; Tue, 11 Jul 2017 18:59:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, cota@braap.org Date: Tue, 11 Jul 2017 18:59:33 +0100 Message-Id: <20170711175937.23140-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170711175937.23140-1-alex.bennee@linaro.org> References: <20170711175937.23140-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:c0c::22c Subject: [Qemu-devel] [PATCH v3 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: "open list:ARM" , =?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 Reviewed-by: Emilio G. Cota 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);