From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EA5DC4361B for ; Mon, 14 Dec 2020 22:15:04 +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 80C0222510 for ; Mon, 14 Dec 2020 22:15:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80C0222510 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kow7S-00011o-K1 for qemu-devel@archiver.kernel.org; Mon, 14 Dec 2020 17:15:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kow6T-0008SU-Fs for qemu-devel@nongnu.org; Mon, 14 Dec 2020 17:14:01 -0500 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:46130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kow6R-0004aK-L9 for qemu-devel@nongnu.org; Mon, 14 Dec 2020 17:14:00 -0500 Received: by mail-ot1-x344.google.com with SMTP id w3so17376046otp.13 for ; Mon, 14 Dec 2020 14:13:59 -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:mime-version :content-transfer-encoding; bh=Mo3jZv6+qLcS9/RPyw+XlvoWGWRTMmEVplexje7I4pc=; b=gQD1rWvEzDP8Z8kFmDQhNFgHQ5Nm4KLv3mnKPKfmkMyxiXCj1h4qpwUR1813dIoprg 6jdI65wwFq6wCTbJLSETbnD3XhjLqfzgrzjXcAtRQIUkWgyjqut67tBzzg93iOrr5V4Y pysxFsfs1EB9drCDwtf1bY/u7WRW3bx6SrcO6UvR6ZplKffV/k3daxb2yc4i6obNkfBb UJG/Sozy47dGMdw8y5dSEh6C4DKIvWVpDI9D18oVlnTbShYE16ABaU94uRi2W0D4xhrN 52Q8NG4tiGVy6+1D2yIEmFdQsqJEdRARWphvQqGkK8qiXqXW3wL5+NHpm6qzzwQy0hCA tJ8Q== 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:mime-version :content-transfer-encoding; bh=Mo3jZv6+qLcS9/RPyw+XlvoWGWRTMmEVplexje7I4pc=; b=mfBhYELZLQgwm8v6YMZ0HCEPDG+d9KxKaoNLqqt68RPnjBdJE/mTW7JzqATNLsJe+C C3YqzsjLD7EVcrm5LLzJiESlwasl0bEF3D5NtxORHBgOFHA/0Y60OOmEpUrGQ37CF5cD UnWxQdsDGO4hwZIQ0rc4IYgme2bQMfSIjMmAXKt3I9LIx5VaGfgYx7jz3CoywYOs622f ina5lsXK8fiKI6Ee4tnxDHNKwHSg3qPrV/erVnYFOYVTg8mTvAYnrw29hLZf3Yf/dzru P2wqjLMJ39ONw2rjPoFEIDKHlQGzoQxY43jzXHyvBxo0bBMKjl2w7fxchvSVOY5Fnf5A EKpw== X-Gm-Message-State: AOAM5302Lq43L5GSv9VohzW8flwORt1q+Lb0yWrL/G+2VzeMA4oKa/ga QkUhG+8Jg/vtx3gy8mwOkBkMT2TFaMaEbegp X-Google-Smtp-Source: ABdhPJxxxNAxhbMz4DiG7vNsPKovZGK8fcffLqwozegl9qd8bjN5A9LurI/Cdy/U97i1qWT730bb6Q== X-Received: by 2002:a9d:1cae:: with SMTP id l46mr5439723ota.249.1607984038200; Mon, 14 Dec 2020 14:13:58 -0800 (PST) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id b71sm2193033oii.5.2020.12.14.14.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 14:13:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 0/4] target/s390x: Improve carry computation Date: Mon, 14 Dec 2020 16:13:52 -0600 Message-Id: <20201214221356.68039-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::344; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x344.google.com 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: david@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" While testing the float128_muladd changes for s390x host, emulating under x86_64 of course, I noticed that the code we generate for strings of ALCGR and SLBGR is pretty awful. I realized that we were missing a trick: the output cc is based only on the output (result and carry) and so we don't need to save the inputs. And once we do that, we can use the output carry as a direct input to the next insn. Changes for v3: * Rebased. Changes for v2: * Add a few more comments, and enhance the patch descriptions. r~ Richard Henderson (4): target/s390x: Improve cc computation for ADD LOGICAL target/s390x: Improve ADD LOGICAL WITH CARRY target/s390x: Improve cc computation for SUBTRACT LOGICAL target/s390x: Improve SUB LOGICAL WITH BORROW target/s390x/internal.h | 11 +- target/s390x/cc_helper.c | 123 +++------------- target/s390x/helper.c | 10 +- target/s390x/translate.c | 289 ++++++++++++++++++++----------------- target/s390x/insn-data.def | 76 +++++----- 5 files changed, 216 insertions(+), 293 deletions(-) -- 2.25.1