From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id D1A1738418B4 for ; Fri, 10 Jun 2022 17:46:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D1A1738418B4 Received: by mail-pj1-x102a.google.com with SMTP id 3-20020a17090a174300b001e426a02ac5so2967266pjm.2 for ; Fri, 10 Jun 2022 10:46:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y1NptbxLE+7sOmplbv9VKgABdg3krf5x8wrphIeXvI0=; b=x1mcdvzAdY1L27vP5eEBIBxZhuc5E/3sRbnJeQPjcGiM/nKzhvKGqyfVXIvOrzVGdG gJRK+j7wabd+L/gWFYEFPvZ87JOQSLQQ5sHM+2R0pXM+q6bGwTToetmdh8I4tZBTgdwr ToPTf74XzZHOun7NzLtKqvxqr6uVCZUIBCsaD5K5e0gmyIyfy8MEEJcjvMxaGjMLO9lw gV+xidryaPkWqvbqYsinLWodQbvQjykZRn3us/5DADk/NpuRUkkLZLrAaFRtE9yeN8u2 RixkowQzrfRMNMAj2YGlbtxHMKrWg2pHxQyoVvhFMD+vsyWnRjpuatzv3txHPiYkb58l sVwA== X-Gm-Message-State: AOAM533HDtn2jLYSs/ohGUNFmhRwlcBvuExswTU5uNHOH3p+ou4AmC7n 1HoXfqQRhqA+5IKQUUx/IFiE2zuRAPNbt14bJAQ= X-Google-Smtp-Source: ABdhPJxiFBTvQG5mpqfAXzsL+5sMKljfp067W/i4JNv86D/PnFkVVLDMK3t5bhOjk0Pn551FRblp3RmrrAFMWwg6lDI= X-Received: by 2002:a17:902:9349:b0:158:a6f7:e280 with SMTP id g9-20020a170902934900b00158a6f7e280mr45308268plp.155.1654883179702; Fri, 10 Jun 2022 10:46:19 -0700 (PDT) MIME-Version: 1.0 References: <20220610074704.7673-1-hongtao.liu@intel.com> <87ilp8uad1.fsf@oldenburg.str.redhat.com> In-Reply-To: From: "H.J. Lu" Date: Fri, 10 Jun 2022 10:45:42 -0700 Message-ID: Subject: Re: [PATCH] Add optional __Bfloat16 support To: Florian Weimer Cc: liuhongt via Libc-alpha , x86-64-abi , liuhongt , LLVM Dev , GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3019.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2022 17:46:22 -0000 On Fri, Jun 10, 2022 at 7:44 AM H.J. Lu wrote: > > On Fri, Jun 10, 2022 at 2:38 AM Florian Weimer wrote: > > > > * liuhongt via Libc-alpha: > > > > > +\subsubsection{Special Types} > > > + > > > +The \code{__Bfloat16} type uses a 8-bit exponent and 7-bit mantissa. > > > +It is used for \code{BF16} related intrinsics, it cannot be > > Please mention that this is an alternate encoding format for 16-bit floating > point. It has the same size and alignment as _Float16. It also follows the same rules as _Float16 for parameter passing and function return. > > > +used with standard C operators. > > > > I think it's not necessary to specify whether the type supports certain > > C operators (surely assignment will work?). If they are added later, > > the ABI won't need changing. > > > > If _Bfloat16 becomes a fundamental type, the ABI should be changed to > move it together with other scalar types. > > -- > H.J. -- H.J.