From patchwork Thu Oct 19 21:21:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 116439 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp952150qgn; Thu, 19 Oct 2017 14:21:42 -0700 (PDT) X-Received: by 10.237.36.88 with SMTP id s24mr4473168qtc.229.1508448101980; Thu, 19 Oct 2017 14:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508448101; cv=none; d=google.com; s=arc-20160816; b=A3VDMaYrqKxzscA1r+eXS3sjvSLGzLR10opJv42LM2nHFRxv9ntd6o3BvivY0NFJsl Gy+k5078SuWPHqK3rd9RVXrdoqzf45gdThGAo3Qc3BXrQ4h/E5QVAJIL/6n2J+xKiBDd +itimwjvjQSkgcJIWTDiXg/d9ThcHGk0pEfRDDX2RigU1an64dBEXNtq2glhbefM6bvt xNkQAqKpHMVCXNfupJjzIfx4yDkmOUp9j0ALcYJ6tC2zHZBc6Qk0CAwy5uQP7D7MFEKB xBUiO1wxqdy1byzWR8Yq7lucZO7EoSTnFnC51BrQB2khvtUUDxHl7+vbvE4cfO9AkOUF pRDw== 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=mdIbGx7d50qzY0wkZYLStkuoS7WKJL5q13KavaEC0Fc=; b=OnGm4k5yjtvgsC3Q+72C6tdJDI2Vf3Pxya+tsSyS6ExCt0W/Zo6I/jYCuCxrmwvsIP 1EVHF5lLc4d1kO4+pB1Txy7+adiHMM6aS/CVOQzMVHTqTHFH+KbTgiw2BVMb+HwTTGIT nWAFC3o1z441587VDy55JPUsznZkppmTWavtG6v3mv0E9oQzM56Y+i14mW2pDQB1hofW BoW9CG9KJuXGNDIarm/ujgZK+68Rs+mgUOnDcRjO6VS9ZzrloTUdErmtvXzL1otaXjdV iljf0if526+OIu+sGGDsYPG+YThsAOfxTNS5vsTkoW7BbL3jufI4QwELYK4GH5qV79Qv ycOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HJD6vChU; 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 s67si4032566qkf.339.2017.10.19.14.21.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Oct 2017 14:21:41 -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=HJD6vChU; 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]:51273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5IG3-0007kU-U9 for patch@linaro.org; Thu, 19 Oct 2017 17:21:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5IFh-0007gs-HP for qemu-devel@nongnu.org; Thu, 19 Oct 2017 17:21:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5IFg-0008B9-G5 for qemu-devel@nongnu.org; Thu, 19 Oct 2017 17:21:17 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:52671) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5IFg-0008AB-8E for qemu-devel@nongnu.org; Thu, 19 Oct 2017 17:21:16 -0400 Received: by mail-pf0-x243.google.com with SMTP id e64so7813874pfk.9 for ; Thu, 19 Oct 2017 14:21:16 -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=mdIbGx7d50qzY0wkZYLStkuoS7WKJL5q13KavaEC0Fc=; b=HJD6vChUVSz9altjT9AM6Yx954xTPHDmLnpvvZzTFWUWkwEcyEHOguVYq13yzVvEEm Vdzx6IWfAOu696HMnwBaQNgw5J7zkWI1wtj7fw2u/LMCmx4qFA0Yy9ggHiAqcPI44KT/ 7gJuLjNrxXgoCT0D36U/OlQvokgUsF3J3RAoE= 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=mdIbGx7d50qzY0wkZYLStkuoS7WKJL5q13KavaEC0Fc=; b=SPEQDk/U9SFF246wIzBIfdUaHb5IASIowlSIenzrxFr5mIAogaX5cSDOxUMlPwT/tx XhML2FmOFiUwllpeD8hZLOC/U7e4ntCjfeWmSfSk2Ul+73DwjkIROcEyLZ2dOIldlyTL Q/wD0BEzByAMXTE0KLfz9a/TPSU07uGOt+v71pTVNVepa7dcvtqk2BL2zo6rDlJj3hqh FAEVXrFz2ad8PxG7I6fHaQvQQ2RGFYFFNZsWCo1cJSRRZSK5cgN9c5g0XOxxaYCITM8y dlu4QV1Mp/XBoCuOaC1+SBcfXOuLW171Vph3/EvbY9gIh2WQ4Y9MeZJ5ZtV42PrsFOHl qKtA== X-Gm-Message-State: AMCzsaXXlKFC7nSDQ/QbZS7KUi4QNpCgHNiR4TuY2EkFAUA8KvHqiS85 ZZcpQlfzIMuvemlQIY+dUSlcDfMs8lA= X-Google-Smtp-Source: ABhQp+TNB8YgzL6nlcamdN5JkEJPhLrIWWFahAltFEe+Yf5AelL8i4PHEzAqrjbQDm9GuDojy3ea5A== X-Received: by 10.159.255.66 with SMTP id u2mr2455853pls.25.1508448075086; Thu, 19 Oct 2017 14:21:15 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-165-104.tukw.qwest.net. [97.113.165.104]) by smtp.gmail.com with ESMTPSA id 2sm29839688pfn.185.2017.10.19.14.21.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2017 14:21:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 19 Oct 2017 14:21:09 -0700 Message-Id: <20171019212109.11341-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171019212109.11341-1-richard.henderson@linaro.org> References: <20171019212109.11341-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::243 Subject: [Qemu-devel] [PATCH 2/2] 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 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/arm/cpu.c b/target/arm/cpu.c index bc9d70df04..a0ed11c9a5 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -478,6 +478,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 @@ -506,7 +507,9 @@ static void arm_disas_set_info(CPUState *cpu, disassemble_info *info) info->cap_arch = CS_ARCH_ARM; info->cap_mode = cap_mode; } - 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 @@ -514,9 +517,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)