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: 11131361 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 162C517EF for ; Wed, 4 Sep 2019 20:02:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E106321883 for ; Wed, 4 Sep 2019 20:02:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lhH1jllA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E106321883 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5bUM-0004Wt-IN for patchwork-qemu-devel@patchwork.kernel.org; Wed, 04 Sep 2019 16:02:46 -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-Google-Smtp-Source: APXvYqxrsZ49x6BzE9sgsqrwno3c3QisYpUfEkX9/E98A9rZkv4R5iqd138Vg+5vRs/t5AziCnCa+Q== 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+patchwork-qemu-devel=patchwork.kernel.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(-) 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