From patchwork Fri Jul 26 17:50:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 169879 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp356872ilk; Fri, 26 Jul 2019 10:54:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGO09gUtsk0a/n9UwKoAnzyWLH0v6+nP6ooaletqFmcKRfdW0brObMWYPJkVCgKsoC34tN X-Received: by 2002:a17:907:374:: with SMTP id rs20mr53045114ejb.36.1564163670667; Fri, 26 Jul 2019 10:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564163670; cv=none; d=google.com; s=arc-20160816; b=DfJXiNPmv1kAvske0illrqltWooOjFlwa95RbLBxV3QgGv+Q4C19jNP2U0B4iATPMY hVgJSaOS/65sEu33uoUhHCNB7YxJtxfXvNl/aZ6zBXA/8DHaEd1/77otbfDnKKQBfLBE YN3yWpOjc3IIGlEN9L3Z6Zl8B+FjEo+Y7kmhkupbT6pwoJmpcrtH2kvEH1ZkHc9+Akyv vytsvcJiYhJjn4V4YZPtZnHoURuITxQu23mBdfo3o9r42T+bZDQkvAhDrBQKsAZmZA6i EHONc9PtElOcs3sVStIvp9qDl+VNxxyJpPRqjQB1xbkladWuB/xftCRAodS/bJDf7RO3 V8sA== 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; bh=CWeGp5OQUiIGgb4lAKmE1/GSBVlKuVNMscwa0w65aPo=; b=cFSAAsSa8TiehHR+h12lH8PSBRQsQixz1pCZPp6DIEeuiMb+qfc2c9JQjeB4cCw6tz 46sIbzU91NeYe26vjbn+dCQ4JqqTZr/utpZ5vLKeEb+BZ1HkPibQLXdafaCknIXrWwxI UaWlu3TWUpE4vkAIu1pEw6vmgHRZLnyHd2i/bsQIqlXDc5mL5gqoY0UOhQ1xtkxrDldU pHnyDaoDLMdJLQHzGgdGwqq05DvZeQxZVqTFAGAS14rUszqX259rDwW6w5uDCzT1GgS7 7nyKPmsYqeaAEvSKoVOnXDlp1fYtyDUhlX3+UZofwHOnhkhnQeE45fog6QVxk+ZYWvPZ sCZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xTfBpe1r; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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. [209.51.188.17]) by mx.google.com with ESMTPS id k42si12438586eda.162.2019.07.26.10.54.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jul 2019 10:54:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xTfBpe1r; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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]:42330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4QG-0000io-A8 for patch@linaro.org; Fri, 26 Jul 2019 13:54:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58481) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4NH-0004ef-UJ for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr4NG-0000SC-LP for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:23 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:34268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr4NG-0000Ie-EK for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:22 -0400 Received: by mail-pf1-x434.google.com with SMTP id b13so24857640pfo.1 for ; Fri, 26 Jul 2019 10:51: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=CWeGp5OQUiIGgb4lAKmE1/GSBVlKuVNMscwa0w65aPo=; b=xTfBpe1rZ6GuS2QfdzU8bs9Re1n0GUAJM1+XQA1ASnIsbzridR8mOS00jnSQAHk9mo DuD/zuGaytI5sUDsuMxjZODVhnUnBWh2p1uNBMWfCk+PWctmmLmQwqiZHXL1o5lwzhP4 Cre6HEt86GyL7IjgR4mV02t4nIRKOM9ZZbOEdSuNwXZRpSQFYThyOL7MBQpDj07GReGq ZWWNr9phIylsPRitJvVShLev9Bz+1K1pzlKaQ57EFYAQOMGIRowrl+7bs1IwrNtk7PiB cxJ12yg+4VmtZx1acuPL87KJ0O7k48YWTfNy3HB16IwyGw3RataNFNezXKMFF2xQhSRP CgNA== 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=CWeGp5OQUiIGgb4lAKmE1/GSBVlKuVNMscwa0w65aPo=; b=AL1+70L9gsv8jXWV0Iw5NgSTT/zvIxEwny3u9SX7Oh/1eCHKOSQcSawolHd5nmih6J VAdUoZUAWU2c8rhVQQy2Twy0Tpaupej6GMrBFYvwoMqqMdYSY+OngTfIw2f1vjNe9lch 42WTJFaxffEC8MqdBwZdhNaNtT/8D5/BKP/QU0UxBcgWsb23lzBb5v//1HbPYZztZ9Vp cU0XC8lKP+9rq+CBMHi7YamOmf8W7HfjT+CAwf3G8F1kaGFDuvZg5fPsMgOIqe85Pp9+ cFNlmUd2qeNi//oO59COQjceOmhVlmjJ7yC6/OSzZz//aOrqFdlIGbtKSTgSTPA3+g0p n/NA== X-Gm-Message-State: APjAAAVN4e7vojwCGHGqNFRpQo0X0JKkVpM2Wcaj6qwi9vxwQBWGCeP+ wRkanI5icYYx0RWgoOB13yxPFdM3FtI= X-Received: by 2002:a62:1c5:: with SMTP id 188mr22560468pfb.26.1564163475850; Fri, 26 Jul 2019 10:51:15 -0700 (PDT) Received: from localhost.localdomain (97-126-117-207.tukw.qwest.net. [97.126.117.207]) by smtp.gmail.com with ESMTPSA id o24sm104287919pfp.135.2019.07.26.10.51.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 10:51:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 10:50:00 -0700 Message-Id: <20190726175032.6769-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190726175032.6769-1-richard.henderson@linaro.org> References: <20190726175032.6769-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::434 Subject: [Qemu-devel] [PATCH 35/67] target/arm: Convert SETEND X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate.c | 22 +++++++++++++--------- target/arm/a32-uncond.decode | 4 ++++ 2 files changed, 17 insertions(+), 9 deletions(-) -- 2.17.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index 8dbe189df7..1d07caa62a 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -10135,6 +10135,18 @@ static bool trans_SB(DisasContext *s, arg_SB *a) return true; } +static bool trans_SETEND(DisasContext *s, arg_SETEND *a) +{ + if (!ENABLE_ARCH_6) { + return false; + } + if (a->E != (s->be_data == MO_BE)) { + gen_helper_setend(cpu_env); + s->base.is_jmp = DISAS_UPDATE; + } + return true; +} + /* * Legacy decoder. */ @@ -10220,15 +10232,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) return; /* v7MP: Unallocated memory hint: must NOP */ } - if ((insn & 0x0ffffdff) == 0x01010000) { - ARCH(6); - /* setend */ - if (((insn >> 9) & 1) != !!(s->be_data == MO_BE)) { - gen_helper_setend(cpu_env); - s->base.is_jmp = DISAS_UPDATE; - } - return; - } else if ((insn & 0x0e000f00) == 0x0c000100) { + if ((insn & 0x0e000f00) == 0x0c000100) { if (arm_dc_feature(s, ARM_FEATURE_IWMMXT)) { /* iWMMXt register transfer. */ if (extract32(s->c15_cpar, 1, 1)) { diff --git a/target/arm/a32-uncond.decode b/target/arm/a32-uncond.decode index eb1c55b330..d5ed48f0fd 100644 --- a/target/arm/a32-uncond.decode +++ b/target/arm/a32-uncond.decode @@ -24,6 +24,7 @@ &empty !extern &i !extern imm +&setend E # Branch with Link and Exchange @@ -50,3 +51,6 @@ DSB 1111 0101 0111 1111 1111 0000 0100 ---- DMB 1111 0101 0111 1111 1111 0000 0101 ---- ISB 1111 0101 0111 1111 1111 0000 0110 ---- SB 1111 0101 0111 1111 1111 0000 0111 0000 + +# Set Endianness +SETEND 1111 0001 0000 0001 0000 00 E:1 0 0000 0000 &setend