From patchwork Mon Dec 14 22:13:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 343580 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3391813jai; Mon, 14 Dec 2020 14:14:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5nPRROn6XNyEGtYrEUKTQf7erwQKFi0GwDO3pMRNhW0vLlc43tHuuoCQRuneB4XeN9/jH X-Received: by 2002:a25:d845:: with SMTP id p66mr39443562ybg.69.1607984053605; Mon, 14 Dec 2020 14:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607984053; cv=none; d=google.com; s=arc-20160816; b=MF/pEK+h7MGSLr17eOKXOZexNrnrQscQVS73b4owu/Utk86DhWa1Mwd/f8z3H4TWac iKL0VLe23f9BUuxJBssbSzsUriBsdNw2/yfCtqJzlGO39tJjnwbhVb1gY86midNv1le7 RMdVz6aROVKdQ/7dcu6Ca52d7hs4aOrSXrm2A9rg7fFvvj9gYw1uttn4345c8gvOKjAk TXwqwldOq5VT5V03wOoOOQ1/XL5DeDvnNzv+FElHRuN/vHzzB2Vy5Yg8cfX1vs9qO+W5 u4tlgBrnK+97Nbk5ghKaXz8o0V6SSCqLI9zNdcDZ8KXsc2C4cidXXi5esNhYZehuC6MZ 6w+Q== 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:message-id:date:subject:to:from:dkim-signature; bh=Mo3jZv6+qLcS9/RPyw+XlvoWGWRTMmEVplexje7I4pc=; b=UTiYZmYR+sW67qAJoanc8GKVLozEl/d2kcSFZiGJii7Au5IOn66oQoRTUX/kEeJShW 1iZtABnQcVeO4ogIRh1BQ3lz+2aMearputZN+Hjj30I7Wd0dY5O51DsGaXzz2uWs/muQ 3URDUJIOOEmaqu/57ObwjjVIMYop17bpysUHz23i4CJ3Qh89eLa0TfLXyfuRkJwiuDic U2iKFSWiEYzuZVI7FNRn/VPrHjkCYZv87RrNW+NoT1uhfhebtMzciT5MgzA/OVXjZb2i doAI2Mb14i++wAi0XBlyBC1D/a9TpDk2+CJTtswAeZ53fyC6oubxEMZMAhfEYBs8WnGB 7HHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gQD1rWvE; 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 e141si18777787ybb.120.2020.12.14.14.14.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Dec 2020 14:14:13 -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=pass header.i=@linaro.org header.s=google header.b=gQD1rWvE; 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]:36288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kow6f-0008UB-3t for patch@linaro.org; Mon, 14 Dec 2020 17:14:13 -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-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 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+patch=linaro.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