From patchwork Wed Oct 25 12:30:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117120 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp1694910edm; Wed, 25 Oct 2017 05:35:56 -0700 (PDT) X-Google-Smtp-Source: ABhQp+R/lumRmbN5Sk7vMsNOdh7hHO8AXOgETi1aULzoLbwnneuLWJNfqzqDI+ijnL/YLPIuo+QB X-Received: by 10.37.22.65 with SMTP id 62mr401835ybw.410.1508934956222; Wed, 25 Oct 2017 05:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508934956; cv=none; d=google.com; s=arc-20160816; b=KGK3Odj9g/VR0MegDtStNVJLnmcgnIYz+pvEmaQ9TCx9IDXsV+XUqopiLKGy/GBKaR dK8khSDoQPNBwtd4FpQakwMOY7LDL4MDOCv+CgGVerotEuI4AXxgXTn+zyzTbWAKqf1W umWJLPG39lr3yxNGoaHzS1Wzh4uqkMzqCK9NIPdZaNB3QmepTfWEwTDjGxwIOEmxGmvN n3uUKtuvUtoxdAlYbjNx5yAMKnMWXega0976uILf7ttt7IsnUwvO6bzHzVC4CEGg3QoP YDiN0dCkKtH5tqzbwxsGuk7h9d6kQNvJciO97hifnX0zDNuevt5+KFygE2PRWhZYqh9d 7bUQ== 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=qD7w2+caXAbTiodra7apFT8LXQDHNlMyP4XJlt2Yk5g=; b=aHm24bewnGz8MQWJs8d9Rz72BlCidMVJBIC+HmizqFIj/J4RKigksDEIBY4PHBu13c xdpvndwZEiPUKFg2fB/SVHwlRCekTluZaTg53B4PIzqeDOD/Tohmhr+Cd/SwgArm1ib4 PbWjXdRTg+4+lEv759GEVxLpLnUOaohEyHIptwontzr1lEOOpMLBNOvI0nGGbBHNVJXC Q6gCa1/h2/7GB5NqhEZ0++vzeYDL76tmyv4ReMBldv9R2adIBQH6bu1NFM9/Ga5DUvtU 7x3pd7K1c/tnNkTwulqn+QpjZ7Y75exyXQyanNUOPfjMhIgJHyXcdZaHwVbBOzyUox4H O7OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NSZFFfZl; 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 16si405690ybf.42.2017.10.25.05.35.56 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 25 Oct 2017 05:35:56 -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=NSZFFfZl; 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]:48100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7KuZ-0002OO-Gk for patch@linaro.org; Wed, 25 Oct 2017 08:35:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7Kpz-0007Vm-9M for qemu-devel@nongnu.org; Wed, 25 Oct 2017 08:31:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7Kpy-00081K-5e for qemu-devel@nongnu.org; Wed, 25 Oct 2017 08:31:11 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:43868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7Kpx-00080x-VK for qemu-devel@nongnu.org; Wed, 25 Oct 2017 08:31:10 -0400 Received: by mail-wr0-x243.google.com with SMTP id w105so14534876wrc.0 for ; Wed, 25 Oct 2017 05:31:09 -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=qD7w2+caXAbTiodra7apFT8LXQDHNlMyP4XJlt2Yk5g=; b=NSZFFfZl/7dBZWvg2HQMLTlFz7KBRd/svZNLhVaGGqz9VHN8zI6BbdnrkEoXHMomLy NUSlyMdtpgzZ+JGoVPJtSqshndBBfqqv3HO8H/41jRL+7RGZ7Cg4ZELqXPGYA6MaaACq 9CpdiUU/6D79l10SRVvE8l4y14UolR7N5E2JE= 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=qD7w2+caXAbTiodra7apFT8LXQDHNlMyP4XJlt2Yk5g=; b=fX6D+fnysCtqhTvrugn6HTC0/nf/TWLe5Q+iqbr+42Qvlwa6iIKuLoqbAaAcc7rhA5 a9I5u+9MqDg+RYG2ZG8P5dGRSEssF5h/QF5FX4c6DOP9PU7zDVEYT1TM7GcacM/ZLw8k RbqwVZk+owvDAvB/VPge3aKFVWrk3rngsNMG0yuPHCOAumgIBXo2t9BLW4gNt+MRhWft DA85iMY8VlciMmm7xd/lPjMN9bFFcgLh086LRztuQb4KxD5hNZdh6nN4SHmFsAjBzNzb yUzBfwlBweRoZPgBUkvJ5xBz3jwk477ZPnHRFudpRWyrfosGmGW/d9AerTbjsyQHpKwd f7iQ== X-Gm-Message-State: AMCzsaXAh9mCWapdTggiE2imI8jt8fOnLw1HUxNKQZbxZRPcOreY+/VP ZD8qXEFKgJNqhoyubYJTDLA0l53OGkM= X-Received: by 10.223.143.54 with SMTP id p51mr2004890wrb.138.1508934668774; Wed, 25 Oct 2017 05:31:08 -0700 (PDT) Received: from cloudburst.twiddle.net ([62.168.35.105]) by smtp.gmail.com with ESMTPSA id 61sm2263446wrg.58.2017.10.25.05.31.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 05:31:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 14:30:49 +0200 Message-Id: <20171025123056.3165-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171025123056.3165-1-richard.henderson@linaro.org> References: <20171025123056.3165-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PULL 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: , Cc: peter.maydell@linaro.org 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)