From patchwork Thu Mar 28 23:04:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 161344 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1329406jan; Thu, 28 Mar 2019 16:27:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDfjW4NWiBBMsd+0ZPbPJDCJSl3bH/Y7/1ivKCD6VTHeC4YIDiLNYThCW7bg86TUHa1mP+ X-Received: by 2002:a24:4e82:: with SMTP id r124mr2353425ita.34.1553815667231; Thu, 28 Mar 2019 16:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553815667; cv=none; d=google.com; s=arc-20160816; b=VxNyGRRMQIcgChJvFCn5WG80/h44ZOdd3JA5+yBgqxgFJaGZBXIb6WJkjapP33izqa /CRhyYbp74imvqF4EcZNp6lhghym8wDkV2qKmBGQzTMky14ktcJgX3CBtUYwleheZ99c uWog949nnWbSv8DxYXVO4r0wwgKZJ9YovIhVesxV49/LypEyIAV850tTRx+6KY60e0j/ 18mtv5jDq3g4H01cpGs9FjdvFJIo6AOSyTktmuf54VCVuX9RtXf5al6zl9GFYEvSff5h cyYG/sDbp11kIv9g+rO9unl7rLaxMTy/IKoKNExIbLvgPee/xmzjYeVqKyHFftOoxL7f 5gtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=dDakszDmSUCuJ4r4/Y0FdfGOX4G6OmUB7PuqceQttcA=; b=h5SHJi6N3a8dwvgq+bhJbx64iZrXR01XVJJ4qkXx4JvVO7nEi4guV9kJ9H12W235rE 4A73PJaYg0hen8OEYGwrZgb4O5/mpAA5HK0AecVUq2kHaXHbFKuE/C6VzYfkSD9jaJKw O4QSqN2KZeKUThKombFLSPfRyYbqQm03q2LYRJjqNzCopziGA5aw0dKzY7bsHnla/fsa B/FFn+x77FTZBTmalOb+umY0qUXU5rtkWFL6j70yTH5IAkk/L7F/Ufld6vYk0TQXS303 ERD6dEvsHjEO9ks2Dn0J1EdOjgx8/ocDCyZ4W/vy7a2nQnNA+GDUlyBaSJxLkzAUHrZV oXrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=w46u8ASQ; 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 u13si221168ita.1.2019.03.28.16.27.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Mar 2019 16:27:47 -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=w46u8ASQ; 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]:43264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9eR0-00087R-GV for patch@linaro.org; Thu, 28 Mar 2019 19:27:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9eKk-0001dn-58 for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:21:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9e5D-0003JO-Cr for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:05:16 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:34175) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9e5C-0003Fp-1c for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:05:14 -0400 Received: by mail-pf1-x444.google.com with SMTP id b3so92028pfd.1 for ; Thu, 28 Mar 2019 16:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=dDakszDmSUCuJ4r4/Y0FdfGOX4G6OmUB7PuqceQttcA=; b=w46u8ASQNGNEXrkzGrmWK84Pa2gIPIcwIAEkXve2L3Cu2nUJJt68bPp+OwqvnDmBFD HnDa4J83qh7kVNSukczTyZdhgnHfJeZmWdeyBPlE+97Cact8TtfyHA2jG+sUrrgVQjPF xj70TgLJwRIntpL53XeAP4ItavBVqFHmzhQzVre3KfUbc3/Do2RfLkWAd2VhCWIt5P6u 5DvQaNo6Vw6zpCcP4ArGZqHSMry9oUQW+U+zJnKUyXnEC1ogmjr5fp6kixLH95KJnAGq SChjcE0rW99GqqzpgL3rQwLh45v5tMTVFGZ4KlPKlGlD6x6C8mR1VKJ5Zx/E6JEtysSh uNmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=dDakszDmSUCuJ4r4/Y0FdfGOX4G6OmUB7PuqceQttcA=; b=mORiizn5vHoamivjR0Mv9IIIUNXeRy+YgC9P00pNjcqf+u9pjPYGYrR/m5/OMBFVuU 2R11a8lk82zVC2fpeBr+NuOw2P4LBbZBDKR8RCjcKs1PqdqseEKIud8EOc6RKY6Qg5yJ aUhRJv0qh3hXbcLZYhhvkGj2Hv3Ti6klHTARe9QunNtN5sJP7AI35B+8TL0CiwY0vAIO 9OMcThXUxaRSzt//DdDZ049Tu9pIqm21iD5ra6JhVkthLzSvJ8NUHt66Pdu/d60yD4He LdZV8BJbfYvIvI2LWF/gkOkD5qd+wmZpOUERmZXs3BrvCElnIDZ6D+I7yQ7b8KPQGOuz 26Vg== X-Gm-Message-State: APjAAAVod8oYJBw61BXMEXFLtND+S1OzTzeyXhY5p2HhD7E9LOf7J5J3 TDKkdl+rUrEPDUhY2xdlwTtya7lxiD0= X-Received: by 2002:a62:4610:: with SMTP id t16mr44930627pfa.217.1553814305363; Thu, 28 Mar 2019 16:05:05 -0700 (PDT) Received: from cloudburst.ASUS (cpe-66-75-72-255.hawaii.res.rr.com. [66.75.72.255]) by smtp.gmail.com with ESMTPSA id f1sm280911pgl.35.2019.03.28.16.05.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 16:05:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 28 Mar 2019 13:04:03 -1000 Message-Id: <20190328230404.12909-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190328230404.12909-1-richard.henderson@linaro.org> References: <20190328230404.12909-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 for-4.1 v2 35/36] tcg/aarch64: Use LDP to load tlb mask+table 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index ac765137ae..979efbcfe4 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc.c @@ -1463,14 +1463,11 @@ static void tcg_out_tlb_read(TCGContext *s, TCGReg addr_reg, TCGMemOp opc, tcg_insn_unit **label_ptr, int mem_index, bool is_read) { - int fast_ofs = TLB_MASK_TABLE_OFS(mem_index); - int mask_ofs = fast_ofs + offsetof(CPUTLBDescFast, mask); - int table_ofs = fast_ofs + offsetof(CPUTLBDescFast, table); unsigned a_bits = get_alignment_bits(opc); unsigned s_bits = opc & MO_SIZE; unsigned a_mask = (1u << a_bits) - 1; unsigned s_mask = (1u << s_bits) - 1; - TCGReg mask_base = TCG_AREG0, table_base = TCG_AREG0, x3; + TCGReg x3; TCGType mask_type; uint64_t compare_mask; @@ -1478,8 +1475,8 @@ static void tcg_out_tlb_read(TCGContext *s, TCGReg addr_reg, TCGMemOp opc, ? TCG_TYPE_I64 : TCG_TYPE_I32); /* Load tlb_mask[mmu_idx] and tlb_table[mmu_idx]. */ - tcg_out_ld(s, mask_type, TCG_REG_X0, mask_base, mask_ofs); - tcg_out_ld(s, TCG_TYPE_PTR, TCG_REG_X1, table_base, table_ofs); + tcg_out_insn(s, 3314, LDP, TCG_REG_X0, TCG_REG_X1, TCG_AREG0, + TLB_MASK_TABLE_OFS(mem_index), 1, 0); /* Extract the TLB index from the address into X0. */ tcg_out_insn(s, 3502S, AND_LSR, mask_type == TCG_TYPE_I64,