From patchwork Wed Sep 4 19:30:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 172994 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp377472ilq; Wed, 4 Sep 2019 13:02:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8rnvqhEAXzD9qg8ul24w324Dc4Ne15t9uCff4JeNeDhUS+0uSFM+3k3c+EwCXXtjv0gRL X-Received: by 2002:a50:ad5a:: with SMTP id z26mr34140edc.180.1567627337380; Wed, 04 Sep 2019 13:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567627337; cv=none; d=google.com; s=arc-20160816; b=ljQkXIxCREL8AtyFoUUexyOOjnxDoQYvcP7iecHkWCFC6sC+2QwWCw2OVtlbdrwHDj ZyHlAhl4taISNqEHcmKKg1PIUDKqrvSQRRkc8I3N+cFyW2O0xtviRFwFEd3nP96sbE3L mTHwP3kUJ9nqthF7lLm/ZYMHMCokyEuHotgszGhqbmQOK5LYUT3MmmMr8rz3vjjSoe5i JnGo6wQfuC07zFclx15ak7OD1yE6RHn8pBp8BmXLXR+n1xue9es8wDZTUrjS+0zRjdSI mbxfOmhTsvJA3dnWQ197mBI1BbcaxcCskyYvD5hwtvlcuOO6Q+X5C513r7ZyXdPancMC TBOw== 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=W/BZPRSZY6X94E8EzsWgQ6OBzD8ENERCVK/Str0XZk4=; b=cRAqZLxHvo0a/kuZQi3bQ7bsVaaBoZv89QLeAmbEL9TjEwCakuD1nZ0R2qB5vBGmpy 7a0HUPbe15xfCt+6I4SCewpStF2UxV8H6Vgzf5Q94R2subIMCUmZNKDWDXInw4qHzVwg vutxNLl2P1u8nudRl8YZmt2iP06rtH+80QjsdS6vmZtTql/d1rz3jBV7G9ZBVxUPlnV1 oUDjBO22whKPZbSqoeWSx19i0o1xvEeTeECrw6mkahpAwUSU2CVqDra5MWf1QjPkSFtU yVm8coIpTrSbZmXQBtH7xCPYe5AlfRizIp0vFAUgachMMPBJsjtke3y9vTzuDvEjN3j6 5qqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lhH1jllA; 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 g17si50011eje.56.2019.09.04.13.02.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Sep 2019 13:02:17 -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=lhH1jllA; 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]:38116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5bTq-0002bE-9i for patch@linaro.org; Wed, 04 Sep 2019 16:02:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40710) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5b0V-00059T-AZ for qemu-devel@nongnu.org; Wed, 04 Sep 2019 15:31:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5b0S-0002lS-5m for qemu-devel@nongnu.org; Wed, 04 Sep 2019 15:31:55 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:41733) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5b0R-0002k7-Qg for qemu-devel@nongnu.org; Wed, 04 Sep 2019 15:31:51 -0400 Received: by mail-pl1-x641.google.com with SMTP id m9so10055083pls.8 for ; Wed, 04 Sep 2019 12:31:51 -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=W/BZPRSZY6X94E8EzsWgQ6OBzD8ENERCVK/Str0XZk4=; b=lhH1jllAnJ0yjcLPM1tNCnoFsu2GANDxZN4ZbSlek4Q9XC4Oks0Mp1d42LGNQwJrqy fXYEqHmT0TlKips5YSojr+6ctyBLNQVFGVBV+2ABRm6qf04q9aa1wcSEzgFbBPcoiD3a dRdP99xf8GZBbKmsfFaPlaijgxp6Oj37LljTLyx+SOoqqcsJ+1mwZNPr810dIDtUCR+j R12dsyX5elfM+XojpL4G2w3VgP5U09b/Az9TaeVoB0tF8XHk0+gDuPbq1Ldo1BnFw1gG jABz9jBshYwNwXewvI4HRm/WRJ6uOZfVIX3MEgvdmrnWjL2fo2IByjBsQvA0DUlbu/DS ROUg== 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=W/BZPRSZY6X94E8EzsWgQ6OBzD8ENERCVK/Str0XZk4=; b=kp2ME6tIda6SA2Xh992Kqep0O4ppo79JFwF0s8ZYIP7TeKoYN6n8qOoy5e1Gr9K7Yu jja9aljCdn87Th6evjc5y89mBcDIum7rI6WR2TCvCX+Wc4ShwW6Of8C4ThfvGSXx5qzO fN6+wwVierDVPvbOHtTX/vUWfEfgGpz9yV7oPaO2VW6QpNAzP5jWkisZYCFXw/Dxo8I7 /XtnbSMKG7pMxsW9gqFucj+XKfDrx/akooDhbuz4/Ap49BTGrRKj3SwVpbsQLjSp4K2G cJ2zBu+EAgesA1wFfTE4IItnbRQ00T8dSJOiKasEQx+bydzOvNJ4YxHWDdLSXYqBOVXW mUKw== X-Gm-Message-State: APjAAAUE5vPZNalZ6tDXb/r1THUMzddOBquOJqeGqwNf3y8JjI5cpX9g ukXSKVR1s46Hgfbxj7Z1BVBwtU+St3I= X-Received: by 2002:a17:902:850a:: with SMTP id bj10mr2758478plb.254.1567625510315; Wed, 04 Sep 2019 12:31:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 12:31:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 12:30:28 -0700 Message-Id: <20190904193059.26202-39-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::641 Subject: [Qemu-devel] [PATCH v4 38/69] 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" Reviewed-by: Philippe Mathieu-Daudé 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 diff --git a/target/arm/translate.c b/target/arm/translate.c index a599da96e1..3f02532d12 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -10252,6 +10252,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. */ @@ -10312,23 +10332,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 32253b4f9a..ddc5edfa5e 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