From patchwork Mon Jan 14 01:11:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 155399 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3119828jaa; Sun, 13 Jan 2019 17:22:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN4zMc/lk+6x5Bf2gk8y/o8d3ckcWiLud6oq8TYPnYiRhc3HS0bwPqoNX3tqg2luscmICZgp X-Received: by 2002:a1c:cc19:: with SMTP id h25mr9752780wmb.80.1547428969561; Sun, 13 Jan 2019 17:22:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547428969; cv=none; d=google.com; s=arc-20160816; b=U6MlLtVy0VlTph3TB+idaERWmKBl93JLZ9E63494rl2dW6JbqE3ZHcEdBQatUoDteq h7z3rtq2k3EsB2q2zrgRdsfQ3mB6u1ZIJ91q4SFdYoni0vOzb43IraE1T35KcVuFIVAT a+TojzMaTwgV4pQgi3h7vAp+IhbSoZe4FVZG/s37GcT0t9BGp6pAyz5cHl8T5e/7Hj1K SIFbmbsa71+P2tggrrrWW3y4UvqcJv80ZwhN5NlSRK2bkHyZY5mhTEiKLZBbaIY426mV CNQDUiJMBZWAzzkJ2+VgAOIF9u5rhXXVQWIyCfASqmubJ2FcYFYjSIi4uHMfFTfAA1Wb EIuQ== 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=X08leWf/xNJZ1dHLJE3vkUkRS4X1tK3TxBJrpZ1VA/U=; b=CePF5bluFOHyk8S0sDEPzFzA3KkidCYTbo9DA5Iovs2zC2lzjthocu/FHrqNsKTFu9 9snaWuQLMdRkzodWlOfdbUOfuUeTm5Lf4yxKZpVca6i2PE5EV8XsQJE2saS/SzHaLP4x PIATk1BfaznXgjMXDCqNW9TxZaHIeBREKCGcOL4wIsGdpDLS/WwVvqCishKvVgYTRuuQ 4eg84VFOClkHNMkawNuq48I3NaSsu8dfRq+2vKAAMTBanENBLSVKMnUFZS4JV6VTFlD9 NK2fvGXbpBS7b3Zi+yvy6Ku/0dyTCKqVKJr14EoPqb9trM82+CmdYczRGlZUGMXFaGWF reVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=F0BObSRX; 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 w203si18017968wma.43.2019.01.13.17.22.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 13 Jan 2019 17:22:49 -0800 (PST) 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=F0BObSRX; 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 ([127.0.0.1]:56794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giqxj-0004hy-4m for patch@linaro.org; Sun, 13 Jan 2019 20:22:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giqnQ-0005p8-JB for qemu-devel@nongnu.org; Sun, 13 Jan 2019 20:12:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giqnP-00012K-Na for qemu-devel@nongnu.org; Sun, 13 Jan 2019 20:12:08 -0500 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:42151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1giqnP-00011v-Ia for qemu-devel@nongnu.org; Sun, 13 Jan 2019 20:12:07 -0500 Received: by mail-pf1-x444.google.com with SMTP id 64so9532245pfr.9 for ; Sun, 13 Jan 2019 17:12:07 -0800 (PST) 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=X08leWf/xNJZ1dHLJE3vkUkRS4X1tK3TxBJrpZ1VA/U=; b=F0BObSRXmP7jI7eDtpku8ieI/fHZUk4vCfE79owe3NzNNroeFtTePOCbhUaUR4oM5h bL3zwL8KQT3PBqPI9yPRLKMsSSkRjdOrEQKwz9k1+WLJQ4G5fRUMAV/TqnePZBueEptI XsQk6pHZsys/I2AffzHrGey7oWS5q0igPFWuk= 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=X08leWf/xNJZ1dHLJE3vkUkRS4X1tK3TxBJrpZ1VA/U=; b=mkl7Xtek63RYrGS5/ilPtTcJz5Fgv9Js1pYyDb5o8sdmTuxGxs81As9oCKaUO703gE Aah3EfAfTQguaVS1kOVT/aZKeZfId8WzS0q5OpYBCRfws/Le7ygGvQMnvpe5TiYFLCRv vkjHX9dKXOqkoS43zEU/BmNMwiWztnswfk7waZjWvx6a1yt7ERevovwkCoTEYJLo0HDF jQQvmy/NsxhSoXVbTnns/PMCHDI7y4Yrxyc7tYeS2Hbmxpuj3tu+aLm4+8BpWvKADZa+ /OQKPsb1mzKemd2d+LfMj7NYoXaYWmrCqrL78cHedwv5851UFpZr8Dzb6ZhKNouDnJgH MD5Q== X-Gm-Message-State: AJcUukciZASBXs4qub7L+uH7MWFc+H/iAQOnliDjZZ3UHqUDoqNMFkxC bqgu8qkg0FRvPTEHz+Hy3kCVpibkxz/YHQ== X-Received: by 2002:a62:ca05:: with SMTP id n5mr23390909pfg.154.1547428326344; Sun, 13 Jan 2019 17:12:06 -0800 (PST) Received: from cloudburst.twiddle.net ([2001:8000:1064:7600:4085:6ae6:1bde:1c45]) by smtp.gmail.com with ESMTPSA id 5sm159602229pfz.149.2019.01.13.17.12.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 Jan 2019 17:12:05 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 14 Jan 2019 12:11:16 +1100 Message-Id: <20190114011122.5995-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190114011122.5995-1-richard.henderson@linaro.org> References: <20190114011122.5995-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::444 Subject: [Qemu-devel] [PATCH 11/17] target/arm: Implement the STGP instruction X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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-a64.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) -- 2.17.2 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 60865945e4..911d6f06b3 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2696,7 +2696,7 @@ static void disas_ld_lit(DisasContext *s, uint32_t insn) * +-----+-------+---+---+-------+---+-------+-------+------+------+ * * opc: LDP/STP/LDNP/STNP 00 -> 32 bit, 10 -> 64 bit - * LDPSW 01 + * LDPSW/STGP 01 * LDP/STP/LDNP/STNP (SIMD) 00 -> 32 bit, 01 -> 64 bit, 10 -> 128 bit * V: 0 -> GPR, 1 -> Vector * idx: 00 -> signed offset with non-temporal hint, 01 -> post-index, @@ -2721,6 +2721,7 @@ static void disas_ldst_pair(DisasContext *s, uint32_t insn) bool is_signed = false; bool postindex = false; bool wback = false; + bool set_tag = false; TCGv_i64 clean_addr, dirty_addr; @@ -2733,6 +2734,14 @@ static void disas_ldst_pair(DisasContext *s, uint32_t insn) if (is_vector) { size = 2 + opc; + } else if (opc == 1 && !is_load) { + /* STGP */ + if (!dc_isar_feature(aa64_mte_insn_reg, s) || index == 0) { + unallocated_encoding(s); + return; + } + size = 3; + set_tag = true; } else { size = 2 + extract32(opc, 1, 1); is_signed = extract32(opc, 0, 1); @@ -2783,7 +2792,12 @@ static void disas_ldst_pair(DisasContext *s, uint32_t insn) if (!postindex) { tcg_gen_addi_i64(dirty_addr, dirty_addr, offset); } - clean_addr = clean_data_tbi(s, dirty_addr, rn == 31); + if (set_tag) { + clean_addr = new_tmp_a64(s); + gen_helper_stg(clean_addr, cpu_env, dirty_addr); + } else { + clean_addr = clean_data_tbi(s, dirty_addr, rn == 31); + } if (is_vector) { if (is_load) {