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=-10.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 29869C11F65 for ; Wed, 30 Jun 2021 10:50:48 +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 AD90061C98 for ; Wed, 30 Jun 2021 10:50:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD90061C98 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=de.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyXnq-0002LO-Ou for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 06:50:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyXmi-0001LR-GM; Wed, 30 Jun 2021 06:49:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyXmg-0004K6-Pi; Wed, 30 Jun 2021 06:49:36 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UAYRSs195388; Wed, 30 Jun 2021 06:49:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=62Yj9PpfBDPPTJDAbxOSqWBUPo9em9HrG/+0gm3l/8A=; b=ntphFH9Gw9qVF3MnbYylt/YXsasN+BSkXEHUYnbvWhnH6NSMhTbeyHoYrSJAn4QliB8h L/8FSZ9a4B7dS+LHtgAYYW+nqKdjKJht044GvggIUZJyymqfTONaXaIgymrkCRutQvFI yiAk6NPwvR5sC126470FO4gXx+te6AnDI/C4aUykKjRE0oeDII9LLLTwTdqYHPzZp+uW YZvds3aNwGEy5N/SYUY+c6PB+29+AlK3wVIhC2137KccKID5Ts9LzISgZKtBMZhdav7a ctjddxTtK83+71uhFDrasxjRnZFpWoy3tgaQuB16YX9OpmTZRDPNeYQwvOchtAh/zhIm vQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gfa0v8j6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 06:49:32 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15UAZ0jK004038; Wed, 30 Jun 2021 06:49:32 -0400 Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gfa0v8h8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 06:49:31 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15UAkevD024887; Wed, 30 Jun 2021 10:49:29 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04fra.de.ibm.com with ESMTP id 39duv8gwby-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 10:49:29 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15UAnRAQ29950356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 10:49:27 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2EE544205C; Wed, 30 Jun 2021 10:49:27 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 25D8742059; Wed, 30 Jun 2021 10:49:27 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.145.93.31]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 30 Jun 2021 10:49:27 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id A83F0D80308; Wed, 30 Jun 2021 12:49:26 +0200 (CEST) Date: Wed, 30 Jun 2021 12:49:26 +0200 From: Ulrich Weigand To: Richard Henderson Subject: Re: [PATCH v2] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL Message-ID: <20210630104926.GB29019@oc3748833570.ibm.com> References: <20210628163520.GA15209@oc3748833570.ibm.com> <0ec4b69c-02cb-0b1c-e980-9b462ab3a615@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0ec4b69c-02cb-0b1c-e980-9b462ab3a615@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 0PrxZgAeb-EX2k0LvBCluIK3kfBY7fs8 X-Proofpoint-GUID: AM4P-GBNrGiCRVc1TxijlzYNHpZpWM8M X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-30_02:2021-06-29, 2021-06-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 clxscore=1015 bulkscore=0 spamscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300069 Received-SPF: pass client-ip=148.163.156.1; envelope-from=uweigand@de.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, 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: thuth@redhat.com, david@redhat.com, cohuck@redhat.com, qemu-devel@nongnu.org, Ulrich Weigand , qemu-s390x@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, Jun 28, 2021 at 11:45:27AM -0700, Richard Henderson wrote: > On 6/28/21 9:35 AM, Ulrich Weigand wrote: > >@@ -506,6 +534,7 @@ uint64_t HELPER(cgeb)(CPUS390XState *env, uint64_t v2, uint32_t m34) > > { > > int old_mode = s390_swap_bfp_rounding_mode(env, round_from_m34(m34)); > > int64_t ret = float32_to_int64(v2, &env->fpu_status); > >+ env->cc_op = set_cc_conv_f32(v2, &env->fpu_status); > > s390_restore_bfp_rounding_mode(env, old_mode); > > handle_exceptions(env, xxc_from_m34(m34), GETPC()); > > Don't you need to wait until after handle_exceptions, and the > handling of suppressing exceptions, to write back to cc_op? Good point. I'll post an updated v3 with this change. > I'm thinking that should be able to remove TCGv_i32 cc_op in the > translator and manually write back to the slot instead. We already > do a good job of caching the value within DisasContext -- I imagine > that the final code wouldn't even change too much. I see. If this works out, I'll update my patch accordingly -- please let me know. Thanks, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com