From patchwork Mon Aug 19 21:37:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 171702 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3556497ily; Mon, 19 Aug 2019 15:11:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxe22SAvXdBC8FkWBAVehap8tbBY6uVbtvssn/dhpYzgg1lQSJlLglp/9lcL4kZrVs6Rxl+ X-Received: by 2002:aa7:c611:: with SMTP id h17mr27225653edq.75.1566252710494; Mon, 19 Aug 2019 15:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566252710; cv=none; d=google.com; s=arc-20160816; b=C3lPjwu06zhv6S/QNQx71d7YEqb7viAkY2r4wpn3N4MPO/3a+gBwpoyndAtF1hC1C2 b/PiZZXNRqVcHKISIWsjYxhStHgWtg30eLZcnOtq4QAcsDFlg/ZwZg2fyhnWmiel3aqz pQyQt7qJxRcLkdStz6HfTdqyx2oqo4CEWs7Gk842b3ERNlOyR8/OPWlso+yyEBATEoHw io+Y5707oa1I1vbLMTblH6WxQCqfU+rMMc04Cb4ScOcIFJHYrp+CnKETvIlATqnbKUPz R4jH0oLOa+enod23+sx+AdFC8ajL3RIOplThuRDldmRgpMq7lxT5V+qYVju+g7r69tAN dViw== 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=nUlERtxnsk9pzgBS89kY7GryxKus7N1Qg8iHW/AeABc=; b=fWuldhx25vrNPe2Qi3kfMChXIHS/jRZ5bvMoNsUqu4CzYUV94jOvB/Vv34z6ZepX5h sHvUaWdqaCCtxQxmc3teTuFExJewvh+eR3AOyxBhztUMYVl+Ic7xCGQ8ZRS5/qG00RbP Ljbovl3bUhM/4+ITGz2dVzAItMvnMkf1Z+3v0bk/yDDirWR2dM1b53HoQ1kR/mBQ7kFO yF9/+tDj4hPpoGcpP3BwsPEDcpSLy8MTXG4A9oWADJ/Z7p5bpqZzcwMZW/94gSjHHYbg ULvNJTVPmkh3HDSzJkrE4kRKD+oC53Im+aZyv6AIxf3CgvxnwRK3bRavCrUd0aTxxYCN cDFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Flk5TmVR; 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 h57si8950632edb.89.2019.08.19.15.11.50 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2019 15:11:50 -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=Flk5TmVR; 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]:59608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzpsT-0003lo-19 for patch@linaro.org; Mon, 19 Aug 2019 18:11:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59384) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzpMS-0002Jb-4L for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:38:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzpMR-0006TS-1c for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:38:43 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:34696) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzpMQ-0006T0-T5 for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:38:42 -0400 Received: by mail-pg1-x541.google.com with SMTP id n9so1938493pgc.1 for ; Mon, 19 Aug 2019 14:38:42 -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=nUlERtxnsk9pzgBS89kY7GryxKus7N1Qg8iHW/AeABc=; b=Flk5TmVR1JR2yQH7xN27Vi9JZjxy+LJgxgCSEYXWQVAj19fwhgst81Tfv2YFVnKcvo xVe5/aFgDprkbAp4dJuGCGSaefy62x9K5rN2ZQXL8Ydb4SO39zwlgPcoauM9AJHPOoAw QLB9nDlu2vmfofN12U+LT8RDbxP5ZV+SSJqNeeUomH6/O+Coq3sZSgbkIEz66IDgdqYE e6Mqlt/p7YSm/ZyId8VYxYcbuv56ewVEZxMmZIwpY2xKjd2BerbBLwAu+WSTCqf26td8 Q4PvBqnixtWTXiTrX8ZjagG1dIrj8wI7MDOk+vfUYOTC7dYAahdN8bC+1nhBoBcKNu1R c9og== 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=nUlERtxnsk9pzgBS89kY7GryxKus7N1Qg8iHW/AeABc=; b=jRhZNekurO0x2MxDDNMchpqsxhP3yM2zcXBMxVYm5HY2pE0NLMJvEn8Jobn3+My8qe IMUFuvsQTMe8f3Jp5Pl247yXgXDGq0aWxfqoYaQCoowJdurDW4vwA9dP2NS22MsENbhp X57S8kAhUBSqRvGuIGD3PAYoXfveOZCNK/MCKg4XSUGKmWDSHkq9FeLqAr8mhWusWNvu tPEelZR7toDK7I380AxSZNcOLkRn50OpgG4i2Kyi560nZtsdaPxrgLNJkAfRDWoKUNPu yLv+o86eIFcK7ycNVRPVKfppcY2pE05FcYDGzDnLzmRr4S0lYiU73ccqo2jPStvY/H4k 97iA== X-Gm-Message-State: APjAAAUUSXBzaie4sv8uQuovIOAjPsF/xI7qx1ZQU/o+iJVlhqgGk5v1 25/9oWHdHDY7AJlk69yLv4uF4pa38y8= X-Received: by 2002:aa7:80d7:: with SMTP id a23mr15956894pfn.208.1566250721714; Mon, 19 Aug 2019 14:38:41 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id d2sm13446951pjs.21.2019.08.19.14.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 14:38:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 19 Aug 2019 14:37:23 -0700 Message-Id: <20190819213755.26175-37-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190819213755.26175-1-richard.henderson@linaro.org> References: <20190819213755.26175-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::541 Subject: [Qemu-devel] [PATCH v2 36/68] 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" 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 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/arm/translate.c b/target/arm/translate.c index 928205d993..46e88d1d17 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -10124,6 +10124,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. */ @@ -10209,15 +10221,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