From patchwork Tue Jul 11 17:59:35 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: 107413 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp10542obm; Tue, 11 Jul 2017 11:04:55 -0700 (PDT) X-Received: by 10.200.53.78 with SMTP id z14mr1513317qtb.184.1499796295304; Tue, 11 Jul 2017 11:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499796295; cv=none; d=google.com; s=arc-20160816; b=TcBO+WVNMAocoQeyX88w4zPMnl/0ppcfmUbhJ/LU3TUzRvma9kTP90IK00seuG7FXF u5GSanh5dlOlCAxz7BQboP53b8ubD/FQMhJIypHIkibJ21VMAJ0crrbkNi2+A5EmttPP RkXaumVclnDR4g1cqch7x8zMHT4PIb9772MESUblgfXlNQJGWzYCrp4Xr5IKkptvDbXg K6VRQ+PE2jGNPMiLasDG//JIQe1V5ClXCjEf8/jdStG6bvCYOmScsLzJ9COo6cCny4Tk AfZMDC5fK55BVzIkSZGYZYgPuqVvLahQaMicsm6Tn70I88vDlrE8pIybWAEPh5lzwsx2 RnjQ== 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=hfILuYeoW/2VUcoI1OEJJp+m/FkdK0C8eGA81xN2QhU=; b=Sm8neGn3l58H7/UuxgAAZoIVU2AsKFW8h1qLHEk9aLe8PMTen3sCDUXcnPV6JAKdqA gye7bM7L99gEhXw3+TZanXtaZzZpZWhXnjcd5+pzSlaXpvSvmH/mpt6+4KatiIk0rOLz qmXpoL9V3PLkFalHU+iKWYNx5PKHqipAhvKZSO0NMw5DnOFaRcQNqzPTTJCnh4sVo+es fJEa5AxSj31gXIkEDAYmbOVgHY9Wu8NbH5K2F1I1gZFsZR1eSer6Dua2O+yWxvQwaAcQ FsEyYJpD91FUMczAkuvApLDHu/nIsIKkjJkXwFdMfA36ctRuEsy87jo1TW4C/acKMq6A lg1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=dt4niN6e; 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 s55si538839qtb.326.2017.07.11.11.04.54 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 11 Jul 2017 11:04:55 -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=dt4niN6e; 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]:48122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUzWm-0005CZ-Mv for patch@linaro.org; Tue, 11 Jul 2017 14:04:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUzSr-0002Ud-Nh for qemu-devel@nongnu.org; Tue, 11 Jul 2017 14:00:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUzSo-0005F1-Fp for qemu-devel@nongnu.org; Tue, 11 Jul 2017 14:00:49 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:34697) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUzSo-0005E6-43 for qemu-devel@nongnu.org; Tue, 11 Jul 2017 14:00:46 -0400 Received: by mail-wr0-f180.google.com with SMTP id 77so9557709wrb.1 for ; Tue, 11 Jul 2017 11:00:45 -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=hfILuYeoW/2VUcoI1OEJJp+m/FkdK0C8eGA81xN2QhU=; b=dt4niN6eL/AXsiZg9cDKeypk4NuMb/STgBHn5RsunR6jAX59O2wqjqbddi0e4mOaTr 8t1wgmrcuM0N6vMfiyBjZEb0cHnT4w9dEyBCCB1CEncKiZ23P9dqE5058Yy+vYND9RSC PRwy5iYpvRUfl6iSxoNMxStKPiapv4F6Jliik= 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=hfILuYeoW/2VUcoI1OEJJp+m/FkdK0C8eGA81xN2QhU=; b=nLlIV6DyPXe2pG/3wwi/Z3/xFSRKXWB7aUEPEDMjn5e0nDTRGWqTToTYxRpsiZWdHl Ue1ukYXFv0Q8wwX7p1fZRg+MF7f7Y5/NLuAI7ic4b4UVIdNldr/yANeUOACG3Bg8ssKn kA9IUnrkpcZg3uihoJRC+InoJ3aGqMGW0LdWJZAPzjJL+BaLyXuns6439oTPL8ST31nr KiRHGn2kQs2YcaYTKaHidDi156NboTGu80H08VFgNc5aez7rDpMoAQVo2bCGIiBSxxgC iEtsBnBqMhKJ8F0WA6OqC8XuX5eZcQVofOFO5Fhiir/8Y16iE5eJ+ABDykyN9DmeTTg6 UKxw== X-Gm-Message-State: AIVw111GfV7hjbp6tSJaJsUD/b9gEctkrcCeAUl1uEBH6clpkO86hRMg Ik3MdVY4NHv7a5kj X-Received: by 10.28.227.67 with SMTP id a64mr3613836wmh.116.1499795984956; Tue, 11 Jul 2017 10:59:44 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l8sm3153464wmd.15.2017.07.11.10.59.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 10:59:40 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 389B73E0C22; 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:35 +0100 Message-Id: <20170711175937.23140-5-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: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.128.180 Subject: [Qemu-devel] [PATCH v3 4/6] target/arm/translate: ensure gen_goto_tb sets exit flags 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" As the gen_goto_tb function can do both static and dynamic jumps it should also set the is_jmp field. This matches the behaviour of the a64 code. Signed-off-by: Alex Bennée --- target/arm/translate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.13.0 Reviewed-by: Richard Henderson diff --git a/target/arm/translate.c b/target/arm/translate.c index 5f2cea8641..82341ee709 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -4158,15 +4158,20 @@ static void gen_goto_ptr(void) tcg_temp_free(addr); } +/* This will end the TB but doesn't guarantee we'll return to + * cpu_loop_exec. Any live exit_requests will be processed as we + * enter the next TB. */ static void gen_goto_tb(DisasContext *s, int n, target_ulong dest) { if (use_goto_tb(s, dest)) { tcg_gen_goto_tb(n); gen_set_pc_im(s, dest); tcg_gen_exit_tb((uintptr_t)s->tb + n); + s->is_jmp = DISAS_TB_JUMP; } else { gen_set_pc_im(s, dest); gen_goto_ptr(); + s->is_jmp = DISAS_JUMP; } } @@ -4179,7 +4184,6 @@ static inline void gen_jmp (DisasContext *s, uint32_t dest) gen_bx_im(s, dest); } else { gen_goto_tb(s, 0, dest); - s->is_jmp = DISAS_TB_JUMP; } }