From patchwork Mon Aug 19 21:37:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 171705 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3558835ily; Mon, 19 Aug 2019 15:14:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqyb1siUu+M5xfs5UEiWE1/6ngK//vvJmIyc7UdqVQhX8EfVT3/oQHdFI+os9OGk0ulOxI X-Received: by 2002:a37:61c3:: with SMTP id v186mr21829781qkb.158.1566252884770; Mon, 19 Aug 2019 15:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566252884; cv=none; d=google.com; s=arc-20160816; b=Zy90Z/B+ACp8I6XVYXPZhkVe1rdZeJDjHYOUgli7ofWyRgvGO/AwLl/JV1rUJA+vaT rmsnjOFLYvjnzm3T5or/6gn6mqGxSGBpwmh+t0qjB/SxLaWSLOCmuuBWYdgOnWdvBG92 MiyyQkUjbsooQQ3h+dvBttzP8OMFvaFlvhDjLHIvp+jEG8JNRnn8JDQe7m1jWEdZOrXi XXefxojjlZkvzfTFlEpnEsu2p6ghFpHDOg2GGK1mYgag+IFx8kguxFEkJKWPWjk1JvoO 0z4qfv18XCJWJI4pRKzMrwKHVspsxtEtiNshV8fnuaTNtywDZhP6f/BvSOznW2lFpjpc rHWQ== 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=JhmaAGzRoow6PV3mD1aboEwUvmsUrSNHW6vrm01q9UA=; b=jWeT+YL1ahUmkNbDDqk7KT0Ol7EyODB+qJHCkVQuyIIlmNPcCjrWTXRhTDNd7jfkg7 dSlyMR2tbMplOHpM1/YiB1sHH5dskVL2D5VOosDM6d+kjwkWzCHhDOhxfvJLau7+GVD5 CHvMA6WgqAZwdAlWfE0KXdGzrbRAuZ3A3Ju5cnOnUIXG0HvAFdzq1yeYPWiDDtIyHOkF Zn3XO70ixt5GRg9aTKMN0p7sE9dF11bRk8iNcHwxvONYAFJe5U4Ue8lAyiCRI/EB6bGb MxlzmHUiTk3yrAoO02RI/odxY4x9vFekHF4If29Y1uMW+yv6/4r6u0REd7R4ccvYSy0Z iaDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eNhhBEL5; 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 d54si4857519qtc.174.2019.08.19.15.14.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2019 15:14:44 -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=eNhhBEL5; 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]:59676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzpvH-0007GC-RV for patch@linaro.org; Mon, 19 Aug 2019 18:14:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59418) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzpMU-0002Lf-BW for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:38:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzpMS-0006UL-Bs for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:38:45 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:37305) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzpMS-0006Tr-5p for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:38:44 -0400 Received: by mail-pf1-x442.google.com with SMTP id 129so1946965pfa.4 for ; Mon, 19 Aug 2019 14:38:44 -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=JhmaAGzRoow6PV3mD1aboEwUvmsUrSNHW6vrm01q9UA=; b=eNhhBEL5W3OtD0P4jcvd636YxZSbqIkbtSAji8NqXmO/jUYNdcN9uGXP1MRb9ERTzK fV0r8EKdmtiqAxgt8/yiM3hALXwu3wzHOrv7Uo0Mzw4rEdCXzmVKz5p6X1XxX26LJ7By 3ACWkDpuqkQ3QElmHwAEJedX7ULxqbuAnqN40E7HjVXLsbC+JlIDyBYoApz7DmRgSnN/ wAAMONm3ToZG7Wme9VvyGZ78D7+GNvQe4ALsZB3KQlj10VfFJ6ua4p57fI8S/JC9S1Ay hA/xuwmQC3J7tH4jV5A/6QIs4uOtM+p9sSNGe+xW4kk3M5GDNQnv69xA3VY3ZUo/r22V m7sA== 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=JhmaAGzRoow6PV3mD1aboEwUvmsUrSNHW6vrm01q9UA=; b=lTWKWAcqk4EpJ7r3X0yWNCwNn4pCwLxdv3r3mjQ8JNl40eqSvEsneKzaHZlotM9Xci 8ooFL4PpMUPLUtPfXyUxj9glnMHVQOvJmNGcaebKXYWryJMPfCz15dF6xZJO+Pl9KgRJ ImejeSHuISL5j20Hp+lnm9ULl0g1/eBYf3OnqplyJwEwqIKfwc/PGwLJcoHBOb6ILHZr v7xspCL4/Cy/x5VSIPcz6/aXiLb7Q7qk6wZI/Iv91mfCljqCJ1I9tXTVjjUcNvjcTZah Kg51q6IzJM8lduEMrvoOldORqakdAwDUpDgsrQCuQwHVNyp0HGjiznrsZTodV8xXTi+r qi9Q== X-Gm-Message-State: APjAAAUH31Nj0VHrYhEJkg5IYf0qMq3F7KSwUi95F/d+oKjRNZBFURfF qw6uLqp+s7cRTpGTiFLPf2mwmUXpWa4= X-Received: by 2002:aa7:9516:: with SMTP id b22mr26306293pfp.106.1566250722846; Mon, 19 Aug 2019 14:38:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 14:38:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 19 Aug 2019 14:37:24 -0700 Message-Id: <20190819213755.26175-38-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::442 Subject: [Qemu-devel] [PATCH v2 37/68] target/arm: Convert PLI, PLD, PLDW 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 | 37 +++++++++++++++++++----------------- target/arm/a32-uncond.decode | 10 ++++++++++ 2 files changed, 30 insertions(+), 17 deletions(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/arm/translate.c b/target/arm/translate.c index 46e88d1d17..a30a9bb4e0 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -10136,6 +10136,26 @@ static bool trans_SETEND(DisasContext *s, arg_SETEND *a) return true; } +/* + * Preload instructions + * All are nops, contingent on the appropriate arch level. + */ + +static bool trans_PLD(DisasContext *s, arg_PLD *a) +{ + return ENABLE_ARCH_5TE; +} + +static bool trans_PLDW(DisasContext *s, arg_PLD *a) +{ + return arm_dc_feature(s, ARM_FEATURE_V7MP); +} + +static bool trans_PLI(DisasContext *s, arg_PLD *a) +{ + return ENABLE_ARCH_7; +} + /* * Legacy decoder. */ @@ -10196,23 +10216,6 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) } return; } - if (((insn & 0x0f30f000) == 0x0510f000) || - ((insn & 0x0f30f010) == 0x0710f000)) { - if ((insn & (1 << 22)) == 0) { - /* PLDW; v7MP */ - if (!arm_dc_feature(s, ARM_FEATURE_V7MP)) { - goto illegal_op; - } - } - /* Otherwise PLD; v5TE+ */ - ARCH(5TE); - return; - } - if (((insn & 0x0f70f000) == 0x0450f000) || - ((insn & 0x0f70f010) == 0x0650f000)) { - ARCH(7); - return; /* PLI; V7 */ - } if (((insn & 0x0f700000) == 0x04100000) || ((insn & 0x0f700010) == 0x06100000)) { if (!arm_dc_feature(s, ARM_FEATURE_V7MP)) { diff --git a/target/arm/a32-uncond.decode b/target/arm/a32-uncond.decode index d5ed48f0fd..aed381cb8e 100644 --- a/target/arm/a32-uncond.decode +++ b/target/arm/a32-uncond.decode @@ -54,3 +54,13 @@ SB 1111 0101 0111 1111 1111 0000 0111 0000 # Set Endianness SETEND 1111 0001 0000 0001 0000 00 E:1 0 0000 0000 &setend + +# Preload instructions + +PLD 1111 0101 -101 ---- 1111 ---- ---- ---- # (imm, lit) 5te +PLDW 1111 0101 -001 ---- 1111 ---- ---- ---- # (imm, lit) 7mp +PLI 1111 0100 -101 ---- 1111 ---- ---- ---- # (imm, lit) 7 + +PLD 1111 0111 -101 ---- 1111 ----- -- 0 ---- # (register) 5te +PLDW 1111 0111 -001 ---- 1111 ----- -- 0 ---- # (register) 7mp +PLI 1111 0110 -101 ---- 1111 ----- -- 0 ---- # (register) 7