From patchwork Thu May 7 17:23:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186306 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3375559ill; Thu, 7 May 2020 10:24:15 -0700 (PDT) X-Google-Smtp-Source: APiQypKrIyuyHRjsrFdMhEqAiDngaviE1FCPcUOlhWTXH9CzUpQBzs9oPZwGIOGxWNX/7JzO4N2r X-Received: by 2002:aed:3eca:: with SMTP id o10mr14864579qtf.30.1588872255254; Thu, 07 May 2020 10:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588872255; cv=none; d=google.com; s=arc-20160816; b=IeRNuwO1cdC+3iQPGGkWWy/GoNkuuqZXtEXNEwTNECi9ZFK4YG1tZ6Ubyj3hygxsPw 7owQWQYCLxSrm0szTA7h6Rrs3bhi4ofDMgdDkLNRVv6zHdmiFomWGWcyF564WbINC7gr aehh+I52M8/8jl+FfcBm4zTL7uq0BqqFFHV9Tx5bURqtMAQKfBsgJr5cWDlu+l/dBDm5 y127fBFWgQJ2aaSf1d+B5kVzQ6UPKHiebiWL8R82fDLEAhukWwfjWz9vFdLR5zwGX1sr tOv+y/4JscCo4qkgo8v/SVAsFYXO2SVrCu7lUKhLkrI/cPgxjSlmL0WCnZnpLDZ3IqYL MU6Q== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wGcdGtbwCbGXwbtVCD3Vnuhz/HniX9vTMEGKeKgan54=; b=AdXtVL2dJQAs4BHtSgY8fLhvRDOfnyWKm4IfscnQ8gLkJPGDcbdJtsU/0ACkUGu3cT WkegqSX5l8W8Dq9uEaQwvQmQlJo2lTvo+W0KWH4UIMQ5jP7y74XBOzRhiVjYLN8GBthi PiNYAKifW0kAoNyc92makO2kolX48R0jSa9oOQQZvG5cF0CMcdNC19WGbBYoRjQ8G2qg vCxLOsbvKaJQv9o+B7w9NRwDLsVSOjhXqyjCXJ2D5GBP6svzWtVRoO8va1DQeygp/W/a 07mNI2M0BzlJb+Av1Pkjro+eShTtXyTe67CgV/JCJ3fM365dDSL515X5kJXMqWhkjLc7 FOuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lqKW8WgZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id k69si3318798qke.211.2020.05.07.10.24.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 May 2020 10:24:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lqKW8WgZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWkFq-0002YH-NO for patch@linaro.org; Thu, 07 May 2020 13:24:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWkFb-0002W3-Mj for qemu-devel@nongnu.org; Thu, 07 May 2020 13:23:59 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:40869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWkFa-0005dG-T2 for qemu-devel@nongnu.org; Thu, 07 May 2020 13:23:59 -0400 Received: by mail-pf1-x442.google.com with SMTP id x2so3318037pfx.7 for ; Thu, 07 May 2020 10:23:58 -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=wGcdGtbwCbGXwbtVCD3Vnuhz/HniX9vTMEGKeKgan54=; b=lqKW8WgZNP99aKxgo/S7/hsixeEDjm0r0MZM60QQS4RTQTNUQeMtBDzi1m0KUJ3TBT LKIab1SFijxo7aE7vEufZ6/m8Ws/XpGxTphRcwWcPcMStV/nbNSpJQ3ZlqBNBkqbjIka /390Ee5sZvEXCYkoNFrY5yMpGCVaaIET8FkHiagTqX8lU500hCuuvFQxn8PUNy38Ivg/ PIuBPalXZDOY7Ndavo1OnK0hMAGImD7kow52Bk+can4C57P9xBs8gpecHopupUCkgJ8L RpUc9SkXN1I/Yu6ELGWZ2SMED+BuHL/tBk0eH22tH9ebSml83+75fFU/bSq9L11PyYfA +yPA== 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=wGcdGtbwCbGXwbtVCD3Vnuhz/HniX9vTMEGKeKgan54=; b=uCEV80Bn76gw6Qo4oZP/5AEg8e/6nq7GfNOEL2jqXxT9ePGF66WQtOv0JXqXj8R35D RC78qnXk16J5Mdn0ZBGCKRmPQy9HYQplxeHvJ1DKYe/a2J5Zjloa3UiKNkaFrp5Mz4Jf qKRG6cQlDGJA9utget/PKPdwH02PDAOrZsf9eg4lic+WUSSF6vZspjM7AswFrGqhF5rX 3E74uOVXVhVebqDFWaS6uN63R0ftlszaCRW+2m7vQ9GrczPLgjPalOc5jd3hrxJVAH3F mlHsgmLYxNtimiYe+AY5FsTNfzQ8uNJj8+0q1kuEp9WRQVOtvczHxKf+zAKWqLhph++w gMHQ== X-Gm-Message-State: AGi0PuZXEH6YopGwl7ARtIU013C4rOFtZOiTL8LldacJRY3+kTCRbgdP TFryVs6kSSLpoTr9JZfayyGwu1eJBq0= X-Received: by 2002:a62:35c3:: with SMTP id c186mr14226637pfa.261.1588872237150; Thu, 07 May 2020 10:23:57 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id 19sm312228pjl.52.2020.05.07.10.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 10:23:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 2/4] target/arm: Use tcg_gen_gvec_mov for clear_vec_high Date: Thu, 7 May 2020 10:23:50 -0700 Message-Id: <20200507172352.15418-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507172352.15418-1-richard.henderson@linaro.org> References: <20200507172352.15418-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The 8-byte store for the end a !is_q operation can be merged with the other stores. Use a no-op vector move to trigger the expand_clr portion of tcg_gen_gvec_mov. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.20.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 62e5729904..b6feb2b9dc 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -496,14 +496,8 @@ static void clear_vec_high(DisasContext *s, bool is_q, int rd) unsigned ofs = fp_reg_offset(s, rd, MO_64); unsigned vsz = vec_full_reg_size(s); - if (!is_q) { - TCGv_i64 tcg_zero = tcg_const_i64(0); - tcg_gen_st_i64(tcg_zero, cpu_env, ofs + 8); - tcg_temp_free_i64(tcg_zero); - } - if (vsz > 16) { - tcg_gen_gvec_dup_imm(MO_64, ofs + 16, vsz - 16, vsz - 16, 0); - } + /* Nop move, with side effect of clearing the tail. */ + tcg_gen_gvec_mov(MO_64, ofs, ofs, is_q ? 16 : 8, vsz); } void write_fp_dreg(DisasContext *s, int reg, TCGv_i64 v)