From patchwork Fri Oct 30 02:26:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 319988 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1016024ilc; Thu, 29 Oct 2020 19:32:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxL+rwFmibHgb+TmZB3Jylke8kzkhZZEHClPtcWbCizdTgdZAuVAccS6YFTDXVUk4YmXgJ0 X-Received: by 2002:a05:6902:52d:: with SMTP id y13mr559339ybs.364.1604025156222; Thu, 29 Oct 2020 19:32:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604025156; cv=none; d=google.com; s=arc-20160816; b=Ieyv8bHgfaNfvpGdRc3GVPY6KzkpV9V/JfV5XrA1woaczPB4XJSjZ0/jTpP5e95Go7 8cKl+dWub8/Nxk7D5LxjF14NlmR6CLYxEm0R8FvWTzZ9TMxsh/RXgFOdmcjFdFRW8lwO Zc6Hiwhdh5dvHi+k8akkPfUeACDm9blNZqcvCWzSjK7yBGnVMWTeNleVNnzCICt4bEou kO0XA/qJFtlaTqVuW5Ni42olttj7OzlmAMqRGgtqRQvOy5HApEuJ1MpiLCWl9K4AfW6f A7TY3Wo3kd9Uu679eKt2EgVfb91CmuLBMHToTsYQKiBCox5I8Au7dE367rPEFleVDaiF D5IQ== 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=5ctNmX935/85OBzb+3yZO19vwGcb5IjbGDXkuOiA+8s=; b=vjr3FnnZQjdr7XBWMJfn+X4OQbmrOLceN5CdxmU6g9hVPnHkUPdGwL5yUyQdTtXopJ 4l448P6HDySLxs/828x2+mfL+qLWUwV10S7BwfJ+SK3cXhwlCwJJqEijcVZIZnJlOgbq v/U3ZW6QUuA3y5RucnX/uodtBdhSNMCBtdCs1yIqyWBuR2QiAdC5ZGs2SjZ8bm8oTiFF Duiyykx9HeKd2C/RFI0WQ8AGVrR31PpwH8NEfiXhXug8FNAKjratdgIrmi3jAXygINei UowMCXUIgQcso6i4GlkNLRFXylEOMHNQF9IK3BTp+cuBygzbPHdAEtvmxBDzUSrziP5n NIuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fA6Cp8KT; 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=pass (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 t60si6279393ybi.18.2020.10.29.19.32.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Oct 2020 19:32:36 -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=pass header.i=@linaro.org header.s=google header.b=fA6Cp8KT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYKDT-0004lz-Na for patch@linaro.org; Thu, 29 Oct 2020 22:32:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYK7k-0005HC-5m for qemu-devel@nongnu.org; Thu, 29 Oct 2020 22:26:40 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:40753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYK7i-0005vr-IA for qemu-devel@nongnu.org; Thu, 29 Oct 2020 22:26:39 -0400 Received: by mail-pl1-x643.google.com with SMTP id j5so2243464plk.7 for ; Thu, 29 Oct 2020 19:26:34 -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=5ctNmX935/85OBzb+3yZO19vwGcb5IjbGDXkuOiA+8s=; b=fA6Cp8KTlfM9f4jjDGWhBRINgApSSCd4hcIlys/IMuxBB97mnHCitWV6TQQhSj28ZI uFB4BrKaUSI1jF+FPwZCgEtlG5+CQGlIY9oRn5WhWtREuxtXUMHfcTFrKJ0ua/EgbDO3 g1MPh2JBCxim9BpwaKXPElyCPiKsSLWJGKv+8KfEuuLFO3w0ocW4STXhGvFxXFU8nug8 5fGE+385YXidNxMujonxZDbmtDBEBwaJQapCYsVYuiOQPTttnV4XXoz+Y0Ig5Sxcf3FH VEz36k9jc1p5vya1wz/G85aBZz+lHzGnQITwSK4fDiSh7PCcmt/DC1Hml5YF31QA6bz0 c5Dg== 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=5ctNmX935/85OBzb+3yZO19vwGcb5IjbGDXkuOiA+8s=; b=DnVjBViWwlgIUCTxdJhmrClevT4DlO00qaGf/Rg+06v/GTQqkGpHCcnXItZ+rX6jgO By+VBqqNBL3ZGjF9/EQCaKGshTQSjMNoC8qN8G3/+YOm/8aVkgtkw3lHo7d85eeJdFzy SA7UomXArOl8nmYPVhElgdcidfbpsqV0546YViApJo2YtJuBnSnJqTduec9CbyAwx+C2 Km9hcmOKxjuZ5YfMOJuwP38QEDsitB9p8bidvnoXJ8snFjFV4Pa24lNLsFIdrM/VIyXN d1JfQHhJxIKzphqR9BlM0Rug7PqYO1M1SWZRxINsRetwZ6c6UP0apUx9zxyt8RGEHTLv 7gBw== X-Gm-Message-State: AOAM531HDuDtASTJ0J6/KRcRWbaoUtDjiIWLgq5zDmUPhGD70VtkYgMG BRIM7HLkrzMqp+/xiOLkZmCVJTps9hbDZg== X-Received: by 2002:a17:902:7d89:b029:d5:cfb6:e44 with SMTP id a9-20020a1709027d89b02900d5cfb60e44mr7136707plm.28.1604024793684; Thu, 29 Oct 2020 19:26:33 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id b7sm4446517pfr.171.2020.10.29.19.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 19:26:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 10/11] target/arm: Simplify do_long_3d and do_2scalar_long Date: Thu, 29 Oct 2020 19:26:17 -0700 Message-Id: <20201030022618.785675-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030022618.785675-1-richard.henderson@linaro.org> References: <20201030022618.785675-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x643.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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In both cases, we can sink the write-back and perform the accumulate into the normal destination temps. Signed-off-by: Richard Henderson --- target/arm/translate-neon.c.inc | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) -- 2.25.1 diff --git a/target/arm/translate-neon.c.inc b/target/arm/translate-neon.c.inc index c2d67160f9..1c16c56e7e 100644 --- a/target/arm/translate-neon.c.inc +++ b/target/arm/translate-neon.c.inc @@ -2037,17 +2037,14 @@ static bool do_long_3d(DisasContext *s, arg_3diff *a, if (accfn) { tmp = tcg_temp_new_i64(); read_neon_element64(tmp, a->vd, 0, MO_64); - accfn(tmp, tmp, rd0); - write_neon_element64(tmp, a->vd, 0, MO_64); + accfn(rd0, tmp, rd0); read_neon_element64(tmp, a->vd, 1, MO_64); - accfn(tmp, tmp, rd1); - write_neon_element64(tmp, a->vd, 1, MO_64); + accfn(rd1, tmp, rd1); tcg_temp_free_i64(tmp); - } else { - write_neon_element64(rd0, a->vd, 0, MO_64); - write_neon_element64(rd1, a->vd, 1, MO_64); } + write_neon_element64(rd0, a->vd, 0, MO_64); + write_neon_element64(rd1, a->vd, 1, MO_64); tcg_temp_free_i64(rd0); tcg_temp_free_i64(rd1); @@ -2670,16 +2667,14 @@ static bool do_2scalar_long(DisasContext *s, arg_2scalar *a, if (accfn) { TCGv_i64 t64 = tcg_temp_new_i64(); read_neon_element64(t64, a->vd, 0, MO_64); - accfn(t64, t64, rn0_64); - write_neon_element64(t64, a->vd, 0, MO_64); + accfn(rn0_64, t64, rn0_64); read_neon_element64(t64, a->vd, 1, MO_64); - accfn(t64, t64, rn1_64); - write_neon_element64(t64, a->vd, 1, MO_64); + accfn(rn1_64, t64, rn1_64); tcg_temp_free_i64(t64); - } else { - write_neon_element64(rn0_64, a->vd, 0, MO_64); - write_neon_element64(rn1_64, a->vd, 1, MO_64); } + + write_neon_element64(rn0_64, a->vd, 0, MO_64); + write_neon_element64(rn1_64, a->vd, 1, MO_64); tcg_temp_free_i64(rn0_64); tcg_temp_free_i64(rn1_64); return true;