From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 647833853808 for ; Fri, 30 Sep 2022 15:32:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 647833853808 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664551927; h=from:from:reply-to: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=lw7at0FkHz1x8hJdM5Xgm7BREkQ15ijT2YV79Pt+Alo=; b=E42gEZ+1xLG9NTrMS4dCtX0t/YlAPVnnauXIFhZmUotzZe1kAcbbgCEd0IcEWvK3sgtRLD 0qlns67uY1Xwgr4wMWwxcP31f2DVanVbqEj3rcRggdgYgvt3RvFGkpAfckLSCUCeF4BcBD 2i5yo0k30dRVk1q4P07NlY6goMGxGyc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-267-LOxXCCK7OAu8F0bNzq-oxg-1; Fri, 30 Sep 2022 11:31:58 -0400 X-MC-Unique: LOxXCCK7OAu8F0bNzq-oxg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 77FCF1C06EDB; Fri, 30 Sep 2022 15:31:58 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.194]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED26B477F6A; Fri, 30 Sep 2022 15:31:57 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 28UFVces002692 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 30 Sep 2022 17:31:44 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 28UFVR0C002689; Fri, 30 Sep 2022 17:31:27 +0200 Date: Fri, 30 Sep 2022 17:31:26 +0200 From: Jakub Jelinek To: Segher Boessenkool Cc: richard.sandiford@arm.com, gcc-patches@gcc.gnu.org, "Joseph S. Myers" , Richard Earnshaw Subject: Re: [PATCH] i386, rs6000, ia64, s390: Fix C++ ICEs with _Float64x or _Float128 [PR107080] Message-ID: Reply-To: Jakub Jelinek References: <20220930150759.GH25951@gate.crashing.org> MIME-Version: 1.0 In-Reply-To: <20220930150759.GH25951@gate.crashing.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Sep 30, 2022 at 10:07:59AM -0500, Segher Boessenkool wrote: > Hi! > > On Thu, Sep 29, 2022 at 12:01:43PM +0200, Jakub Jelinek via Gcc-patches wrote: > > --- gcc/config/i386/i386.cc.jj 2022-09-29 09:13:25.713718513 +0200 > > +++ gcc/config/i386/i386.cc 2022-09-29 11:29:20.828358152 +0200 > > @@ -22725,6 +22725,9 @@ ix86_mangle_type (const_tree type) > > && TREE_CODE (type) != INTEGER_TYPE && TREE_CODE (type) != REAL_TYPE) > > return NULL; > > > > + if (type == float128_type_node || type == float64x_type_node) > > + return NULL; > > Is float128_type_node always IEEE QP, never double-double? I couldn't > find this documented anywhere. If this is not true, this part of the > patch is incorrect. It is always IEEE quad, if there is no IEEE quad support, it is NULL. The C++ wording is: "If the implementation supports an extended floating-point type whose properties are specified by the ISO/IEC/IEEE 60559 floating-point interchange format binary128, then the typedef-name std::float128_t is defined in the header and names such a type, the macro __STDCPP_FLOAT128_T__ is defined, and the floating-point literal suffixes f128 and F128 are supported." and C: Types designated: _FloatN where N is 16, 32, 64, or ≥128 and a multiple of 32; and, types designated _DecimalN where N ≥ 32 and a multiple of 32, are collectively called the interchange floating types. Each interchange floating type has the IEC 60559 interchange format corresponding to its width (N) and radix (2 for _FloatN, 10 for _DecimalN). Each interchange floating type is not compatible with any other type." So, _Float128 and std::float128_t which we use float128_type_node for must be IEEE binary128, nothing else. Internally, it is implemented by using targetm.floatn_mode hook to query which mode if any is the IEEE one with corresponding width. Jakub