From patchwork Wed Sep 4 19:30:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 172995 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp380106ilq; Wed, 4 Sep 2019 13:04:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/27RMN0OWRSsYDshQfCNzvtzvkrN4OYhthNCuf6PMLIcb24wqlX8lZAtrEGqxH4APuvDz X-Received: by 2002:a17:906:529a:: with SMTP id c26mr3445099ejm.232.1567627467861; Wed, 04 Sep 2019 13:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567627467; cv=none; d=google.com; s=arc-20160816; b=1E6yTYvND6+28LB9TfvQkA6uobjdIoyCk0U4btIfSQhDKhNDuk++gy4zZyOdZZSBtB AsmEILG38eoxMkhIx/ZyCCix/CunUcsnAP9tyia60VBNCXiLYjoopp+qiqbXkEvjpsTi aEz44Cdk7RPgstQ+BSqdV9LD5z6i/iVf9bdviOlVMmnqMvF0eK/fL/oiiCcJ4No23GFu EqxxPMqQSd8YSX+QfsAzOYo2/kBe9gVuFUHihVqV1U3R7jD7lU1yM51V5BDwBpchscDt ruuZNrQrHkOCuSDW8S9CDZl7FNBe8f/eQcHY6Qk4dSBpSQ5wQFMwUAKkFqoIB3FGPCCj TH8Q== 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; bh=uBQvYz8IHxhp6JSRYx+eAJLbYd/WxV5+vKoQFHwhKKE=; b=Qx996zEPg+9qXaIwK5h0NdpHwKKuXg1e9mh6DiNyI3QDr8nAjq8RCwcEAI9TN88BKH t3hT03hd6sPmU4667dQDDbmKW8BM9Y9epNrmScQut+NtCu6GJD7tzCcJvyPlUprvCgmF 0pNJ+Dmyw/TBbcKD2MeYuMC0jfJHCfZWgnT8GqfDiMfyfeyiQhsa0ed5JgVctKLeS3Zn hcpWiTzUQ8HYVGH2rqQs9cKY1hefjUCQx8mFicJqUo6j2NtTnk2r5AXowZFDFIDHO1iC yn8/6Is6K3JeWj6O6fPiY+rywV7MX7S1zJrYnjKdUhsaNPPAEK2Aa1rfZWhZxBs9Cnzm N9SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nP0gy5CA; 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 b47si6946364edc.45.2019.09.04.13.04.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Sep 2019 13:04:27 -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=nP0gy5CA; 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]:38242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5bVy-0004hI-6c for patch@linaro.org; Wed, 04 Sep 2019 16:04:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40664) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5b0T-00057Q-LS for qemu-devel@nongnu.org; Wed, 04 Sep 2019 15:31:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5b0R-0002ke-CA for qemu-devel@nongnu.org; Wed, 04 Sep 2019 15:31:53 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:34378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5b0Q-0002j0-W2 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 15:31:51 -0400 Received: by mail-pf1-x442.google.com with SMTP id r12so1751751pfh.1 for ; Wed, 04 Sep 2019 12:31:50 -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=uBQvYz8IHxhp6JSRYx+eAJLbYd/WxV5+vKoQFHwhKKE=; b=nP0gy5CA8F+hMVqR1RfqRCtQOYZtv4ByApFNWYu5Y7QSKSC84dP0ezc6vrzChPerie Qtvl0whj6iiKAoO2qPoOOv/F0M/kX5kHKwDKSw3Yrr5HZGXs006i5s1UsZh2oKdHNrTq sYNJcGaRKkWlY4NR7xiVn5Y9W2HvQFBzdr5Nbf+GTa+wory0Ud6cTdKFpISgDG2WYM1y FTXYewj4ikPmdcS1fc2OnwM5z/UMC1KA10K2RcNQhbIpDTntUoCgS0aUbm2MwbCSuojY yguEVQBlmL4KnPkpcG1yZ1c0CRI/TsRDBt19uulMMZLC6klP1nCaFEDl5Al88k8oS7Df YeNQ== 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=uBQvYz8IHxhp6JSRYx+eAJLbYd/WxV5+vKoQFHwhKKE=; b=uU/v+0g939z3eJdObCw6cBR5oH5GprYz/rOQjFQQnHcU5B0iMdrKTZ3Xbr7SrgjZ6P C0VjRKDidXmRLWV2ZQ6kVG0DjP3ewzM8J7pNNwZrfwWFnqaSN6tiIoCPM7ZsnCnW+wug yDM6eW+NOHPbS2D+jnyoM01vqdEZxNm1CemiZKUnsxI3y6zuw1J0riBFc6IIFjOjVdbB RFFbAg5uNMQpKy6Yl/BGTpoB3C9KrDAsO79GGMLQujcZsQcdJeLo8+cW5OT+Uboe7+Da jxFKWKezZH35B5k6OgFHZOyJgWepJsm/cp15e2k0CCDWpHM5YcNBBRezM1+cBJJKjCzB i1gQ== X-Gm-Message-State: APjAAAXpAnwbq1qbOrvsMEfB6uYiWGDxb1u75/FOjDsdfSs+Q7r2aPLN WScbdhtnVLW2yubSwxDLSPFbUug+EDc= X-Received: by 2002:a17:90a:a40e:: with SMTP id y14mr6414114pjp.83.1567625509182; Wed, 04 Sep 2019 12:31:49 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id f6sm18999174pga.50.2019.09.04.12.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 12:31:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 12:30:27 -0700 Message-Id: <20190904193059.26202-38-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190904193059.26202-1-richard.henderson@linaro.org> References: <20190904193059.26202-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::442 Subject: [Qemu-devel] [PATCH v4 37/69] 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Philippe Mathieu-Daudé 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 664ea281f8..a599da96e1 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -10240,6 +10240,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. */ @@ -10325,15 +10337,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 de611e8aff..32253b4f9a 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