From nobody Mon Feb 9 12:10:36 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623064249; cv=none; d=zohomail.com; s=zohoarc; b=kRYESXjUCITabFNcu4uUtR4LbZuLoa9MO/Qc0E9fycGetIkfr6EBsg0xI6fKMY7LaENAgkUXvgEZWfPISdcah0Z7mNI14StPlr7KDhJuGE2vyKzr2I84GIUoe28XEkcgF6VLcLfoLGOkcvB1fS+DiKHSjhFFozEOZ8bYQdyTdFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623064249; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9tddF0J8Rfm4efgQEDn+k/6KS0S23rDMpPXDo3BXofA=; b=j4W3+EUNevY6saG5Rwlc8XXQ5ApJAQfZ76euJiyxEjg8CZlRNfOM50k+uk690CeMOI2aXhpxOKkQKljcjY758h/XlGOvij5b+RqKoc+83psdGj9xg0uh5g8OICgFvldBnOOjVQmwRUKtx9rdlo9z3rXWkWq8a5eSPxnyNoWZ/lg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623064249421127.93306398932259; Mon, 7 Jun 2021 04:10:49 -0700 (PDT) Received: from localhost ([::1]:42220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqD9c-0005Qw-DC for importer@patchew.org; Mon, 07 Jun 2021 07:10:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqD3m-0002cV-2t for qemu-devel@nongnu.org; Mon, 07 Jun 2021 07:04:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqD3j-0004vd-Q8 for qemu-devel@nongnu.org; Mon, 07 Jun 2021 07:04:45 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-170-FwHtU9okN9SuoKoYbXm9sg-1; Mon, 07 Jun 2021 07:04:41 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF661180FD89; Mon, 7 Jun 2021 11:04:40 +0000 (UTC) Received: from t480s.redhat.com (ovpn-114-176.ams2.redhat.com [10.36.114.176]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF2D560C17; Mon, 7 Jun 2021 11:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623063883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9tddF0J8Rfm4efgQEDn+k/6KS0S23rDMpPXDo3BXofA=; b=Z5ls6x4DauWrEYT+zF2wQKW62ESE8gkBz68gVLnlBrcm/deOoFZVvBMZm3PYgIhyRv1Q5q lyIWA1jFbVyGPJw/UNnYkeOw77U2LZ0SzjKUQ8+nNht8IT9/q4URjHtYC7CCQTrwVX1yyE oMhuDRtNLUzMNxAf8aeZR2xL4fbxG1E= X-MC-Unique: FwHtU9okN9SuoKoYbXm9sg-1 From: David Hildenbrand To: qemu-devel@nongnu.org Subject: [PATCH v3 10/26] s390x/tcg: Simplify wfc64() handling Date: Mon, 7 Jun 2021 13:03:22 +0200 Message-Id: <20210607110338.31058-11-david@redhat.com> In-Reply-To: <20210607110338.31058-1-david@redhat.com> References: <20210607110338.31058-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=david@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Thomas Huth , David Hildenbrand , Cornelia Huck , Richard Henderson , Laurent Vivier , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" ... and prepare for 32/128 bit support. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/vec_fpu_helper.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/target/s390x/vec_fpu_helper.c b/target/s390x/vec_fpu_helper.c index 7ca9c892f7..4af59ea66c 100644 --- a/target/s390x/vec_fpu_helper.c +++ b/target/s390x/vec_fpu_helper.c @@ -201,8 +201,8 @@ static int wfc64(const S390Vector *v1, const S390Vector= *v2, CPUS390XState *env, bool signal, uintptr_t retaddr) { /* only the zero-indexed elements are compared */ - const float64 a =3D s390_vec_read_element64(v1, 0); - const float64 b =3D s390_vec_read_element64(v2, 0); + const float64 a =3D s390_vec_read_float64(v1, 0); + const float64 b =3D s390_vec_read_float64(v2, 0); uint8_t vxc, vec_exc =3D 0; int cmp; =20 @@ -217,17 +217,18 @@ static int wfc64(const S390Vector *v1, const S390Vect= or *v2, return float_comp_to_cc(env, cmp); } =20 -void HELPER(gvec_wfc64)(const void *v1, const void *v2, CPUS390XState *env, - uint32_t desc) -{ - env->cc_op =3D wfc64(v1, v2, env, false, GETPC()); +#define DEF_GVEC_WFC_B(NAME, SIGNAL, BITS) = \ +void HELPER(gvec_##NAME##BITS)(const void *v1, const void *v2, = \ + CPUS390XState *env, uint32_t desc) = \ +{ = \ + env->cc_op =3D wfc##BITS(v1, v2, env, SIGNAL, GETPC()); = \ } =20 -void HELPER(gvec_wfk64)(const void *v1, const void *v2, CPUS390XState *env, - uint32_t desc) -{ - env->cc_op =3D wfc64(v1, v2, env, true, GETPC()); -} +#define DEF_GVEC_WFC(NAME, SIGNAL) = \ + DEF_GVEC_WFC_B(NAME, SIGNAL, 64) + +DEF_GVEC_WFC(wfc, false) +DEF_GVEC_WFC(wfk, true) =20 typedef bool (*vfc64_fn)(float64 a, float64 b, float_status *status); static int vfc64(S390Vector *v1, const S390Vector *v2, const S390Vector *v= 3, --=20 2.31.1