From patchwork Sun Oct 22 00:46:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 116619 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3188147qgn; Sat, 21 Oct 2017 17:52:04 -0700 (PDT) X-Received: by 10.237.52.198 with SMTP id x64mr14093917qtd.326.1508633524940; Sat, 21 Oct 2017 17:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508633524; cv=none; d=google.com; s=arc-20160816; b=kBMTcjtJBxwHFLSpHQqEBhk6bvTa4U4cdPqrUCONqS1lQIInHyk/+BKcMr65iGZRWT SXkJ6+XA89GiRzTRF91fGs0a0ubzAhb59M+gbPabUUOfe7y6Pfhh3Y0H4Be9wvtmJw12 mYkTZemrev+kGjQNMVDUcrR/dkfehnhssHqqthZRCYmH9Of7aILDTuLoTdkVgluLO35Z j8bwRiBKX5U8s9B3XbomZ2+5endEc0czO+4pIofcT7uN7Kq4iOgMGfOtY0aKMtN0JlxC To7RhZZiwkUiSiM2mIeboLzjbh5dei6yTwcrAuUnrGHhF2srtCk3ilp5eDAjYHvLBpph 9ICQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=qD7w2+caXAbTiodra7apFT8LXQDHNlMyP4XJlt2Yk5g=; b=cvoxUiJyHY94ZX2MTLRzgdVf15XjdGv3ExcXxEY5NgF8XCRxGsy3Lg6oJGbjWonfBu c9dLbV3SZSJMvUISOffdPsOMsNttWGN7L7ssxX+iwcILtYuW8cZvkQa/txXtENVNns/c u+kLAmYTmwQ+uCX4SvbGEivuz6ZyvnFYG3T6dl5l9+DIBCbC1SdUzPKnGAvmwYTd/C1i NiKS31HlylL1lSVBVfxZGM2SciZMga2XBS6Lq4bGgy9nJf/FK+AZYA/nNQsAPL8C9fpr dod3eu5NXHVoPueaCpmKMoaLrsgLTLoElzV3fx7rxC8ihRtfoEu8886kHb6QoFKmcr9L 7/TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kEVbHoQn; 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 i89si3408527qtd.221.2017.10.21.17.52.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 21 Oct 2017 17:52:04 -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=kEVbHoQn; 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]:59642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e64Uk-00061B-SG for patch@linaro.org; Sat, 21 Oct 2017 20:52:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e64PR-0002CY-5I for qemu-devel@nongnu.org; Sat, 21 Oct 2017 20:46:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e64PQ-0008GC-6Z for qemu-devel@nongnu.org; Sat, 21 Oct 2017 20:46:33 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:54106) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e64PQ-0008FF-0P for qemu-devel@nongnu.org; Sat, 21 Oct 2017 20:46:32 -0400 Received: by mail-pf0-x242.google.com with SMTP id t188so14596378pfd.10 for ; Sat, 21 Oct 2017 17:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=qD7w2+caXAbTiodra7apFT8LXQDHNlMyP4XJlt2Yk5g=; b=kEVbHoQnixnOXifntjw+gVl/2aR8DGcq446ZBMh2LNBEg8oTQwBCuMgs0MKWqbtvU6 kOmweV/6Npv3yxI6b+KiwppGKh9yY3pn/TIGP9AUBgPXN315xYFb6J6blY9hJRTJeWsD hBF1BLjFsMX1UvhjSztyEM7QXXVjvc6vRmIUM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=qD7w2+caXAbTiodra7apFT8LXQDHNlMyP4XJlt2Yk5g=; b=jpZSNBs4fnR7WuyJKnM8eGSC88gSksX/sNYFytxLIc2RAtXndVjjU+Cmza6xM1AZU+ ANs+gxXjaqnN54xnyURM3sH4XVd40TajWIz2wlqQdzl//7LQ8qlJ7zPi0mio6dyVZYaH kXh9jZi5HiP/MtX3uK8HB27RAp6zr6s7rGUscTeMJkXmP4FAli7Zwbulm5razLR/sftN +bePE6VC8MyLAYH+VRp+/SHt99qW9FPtB4ugjbc5bTjqARIpJyAnh2KGqCTyxcfxh+xW Eb8ATSUF1tsm/RBW8OvMq5zuDxmw8vSnPfab263wyaBMQcYQFOvwFtedfRAXkjQbmsHM t8cg== X-Gm-Message-State: AMCzsaX+9y1BMp2+KqXzy/JYzb69uAJY4vgk4opWc8MuRpQbxuEdXyhL xX4LaxO4epsGYuMjl7Fw4cxSFwUVSAA= X-Google-Smtp-Source: ABhQp+T1emoEy/xaoEt/wHCbbKgqPGqHrsxigHe6244Cfy3OA77nJ9U3/9FALW/lGcWyYZ1yDmyg2A== X-Received: by 10.101.78.201 with SMTP id w9mr8045937pgq.402.1508633190685; Sat, 21 Oct 2017 17:46:30 -0700 (PDT) Received: from cloudburst.twiddle.net (174-21-9-158.tukw.qwest.net. [174.21.9.158]) by smtp.gmail.com with ESMTPSA id j12sm5766728pgs.35.2017.10.21.17.46.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Oct 2017 17:46:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 21 Oct 2017 17:46:14 -0700 Message-Id: <20171022004621.28372-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171022004621.28372-1-richard.henderson@linaro.org> References: <20171022004621.28372-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:c00::242 Subject: [Qemu-devel] [PATCH v7 04/11] target/arm: Don't set INSN_ARM_BE32 for CONFIG_USER_ONLY 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This matches translator behaviour in arm_lduw_code. Fixes: https://bugs.launchpad.net/qemu/+bug/1724485 Signed-off-by: Richard Henderson --- target/arm/cpu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.13.6 diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 82dad0b721..a92d86faa0 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -477,6 +477,7 @@ static void arm_disas_set_info(CPUState *cpu, disassemble_info *info) { ARMCPU *ac = ARM_CPU(cpu); CPUARMState *env = &ac->env; + bool sctlr_b; if (is_a64(env)) { /* We might not be compiled with the A64 disassembler @@ -491,7 +492,9 @@ static void arm_disas_set_info(CPUState *cpu, disassemble_info *info) } else { info->print_insn = print_insn_arm; } - if (bswap_code(arm_sctlr_b(env))) { + + sctlr_b = arm_sctlr_b(env); + if (bswap_code(sctlr_b)) { #ifdef TARGET_WORDS_BIGENDIAN info->endian = BFD_ENDIAN_LITTLE; #else @@ -499,9 +502,11 @@ static void arm_disas_set_info(CPUState *cpu, disassemble_info *info) #endif } info->flags &= ~INSN_ARM_BE32; - if (arm_sctlr_b(env)) { +#ifndef CONFIG_USER_ONLY + if (sctlr_b) { info->flags |= INSN_ARM_BE32; } +#endif } uint64_t arm_cpu_mp_affinity(int idx, uint8_t clustersz)