From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by sourceware.org (Postfix) with ESMTPS id 0A7F03856099 for ; Mon, 13 Jun 2022 06:29:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A7F03856099 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-3137316bb69so40746377b3.10 for ; Sun, 12 Jun 2022 23:29:22 -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=axJSC4yHYBMDhSF58R3temZUT/D+pLUNZINl7+g2AX4=; b=pEFffssrdzBKV+SLkwKX11QwiSkePiYG6hq9vjtRiYy7lRl04OQp9YCOzmf3xO5oRb Vh4NVafED6+GAfcm5JkcHJkByEeKHnDhMn6sjVHfnFHfORpmjB0p9tkYfHuz6e12nQte 1mlmLdxAprZZe/OVA29T1wW/4JEa4SQApvqq0Ynma0vM/DI7wbLaJYgOIdoltguXpLR9 3APgTGJXB0cvmC5NQWNC8Qr/3WaBcVz05UYUf/lA5IGwrrLJPmg4C1FDUJi5lTwq1v8x gXgToxt8EkAfrMw5d6/K+q1i2gTk6ra8PNTDb7QxiKff7D+5GLug0ivWhL5SZlblFm/U 5NwA== X-Gm-Message-State: AOAM531CDMwJPlPCt9E4g8JnXuSJMolYq1ygBbOaTvwKWUi1NF9Slwe1 BCmIZ3wp6iD1HlEjMNeugAs6hoM1jR8IKpO4c+8= X-Google-Smtp-Source: ABdhPJy/C2jJSHyLUIM+SBBgJTfNk7mH4tKmdguXwRElc1LoxEXEvSlBuihfqsSAd5y1d6rzDDDZrKiEJBlbdRjrnsA= X-Received: by 2002:a0d:dbd7:0:b0:30f:a269:6da5 with SMTP id d206-20020a0ddbd7000000b0030fa2696da5mr62334080ywe.344.1655101761401; Sun, 12 Jun 2022 23:29:21 -0700 (PDT) MIME-Version: 1.0 References: <20220610074704.7673-1-hongtao.liu@intel.com> <87ilp8uad1.fsf@oldenburg.str.redhat.com> In-Reply-To: From: Hongtao Liu Date: Mon, 13 Jun 2022 14:29:10 +0800 Message-ID: Subject: Re: [PATCH] Add optional __Bfloat16 support To: "H.J. Lu" Cc: Florian Weimer , liuhongt via Libc-alpha , x86-64-abi , liuhongt , LLVM Dev , GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 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: Mon, 13 Jun 2022 06:29:23 -0000 On Sat, Jun 11, 2022 at 1:46 AM H.J. Lu wrote: > > 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. How about +\subsubsection{Special Types} + +The \code{__Bfloat16} type has an alternate encoding format for 16-bit +floating point with 8-bit exponent and 7-bit mantissa. It has the same size, +alignment, parameter passing and return rules as _Float16. +It is used for \code{BF16} related intrinsics, it cannot be used with standard +C operators. + > > > > > +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. > > -- > You received this message because you are subscribed to the Google Groups "X86-64 System V Application Binary Interface" group. > To unsubscribe from this group and stop receiving emails from it, send an email to x86-64-abi+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/x86-64-abi/CAMe9rOrvrZRbksjQ%2BY8caC%3DYo%3D%3DoFY5%2BmuOGf9UZRh6L7pUQjw%40mail.gmail.com. -- BR, Hongtao