From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5A6F21F8C6 for ; Thu, 1 Jul 2021 23:33:45 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8056339724B3 for ; Thu, 1 Jul 2021 23:33:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8056339724B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625182423; bh=7cUSMo0IIACWY5TetQIRs287Pv+ldxjYLPUEEPl1m74=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=rc+joI0ZPyyINt2WvTqtkfYSRHaM0iZA/wIIIG96PGABXSIJOqFPJZKib195Ezm11 tq0/taLgYlfehMfdoegOFK3EbE8bgtw1csAU50/oMEfXUPCIpRqDrtKhj/M82xBIRM WMh7/9dPnPvorsZbfyuFCha581ErDRLv+qXCbbGo= Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 206833857C6D for ; Thu, 1 Jul 2021 23:33:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 206833857C6D Received: by mail-wr1-x434.google.com with SMTP id u6so10232324wrs.5 for ; Thu, 01 Jul 2021 16:33:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uWyjdH4+/iMzQztyLrVO1DBkFB03fnAA+cSw8kkqVLc=; b=Stb0jnUwtBJ4A4lDY+jelGucmGK0GAwSLQcAjeXbayia4e6Fmid7mR63f5/Sl0do5c MSH0u80EYRlvkwJphKmTP912UsbKNTPh9aYyVl3c+H/3Nlet84wPkg4S3+csrBdhOowg rxKcuKf2IkL53kymxD6M7RQs8uJkKCYig2+e2EosvA+0qZm0FdpeKxsR1WKXAvkDi17a O3KTsdKgNvzD57mxO/8qjK0pfnBDGPEmi9RWYd7h5V4LQXA2o1OC28GGnV6EW0ydWZfT l2kXCh9WeusmGz+5euCNwYn8icbGTmkUToFu4s3AM5cs5WeNLzyF02Bm8QyNpEJOql7k jWHw== X-Gm-Message-State: AOAM530bUPaAeEG7nOF34DcW4X3Lqm+WgeIF+bKDEODEQvO5IMvIKq2Z J9Nq3BM9bd7XBP9POWQYhhS8dh17d6OpnXEoRgM= X-Google-Smtp-Source: ABdhPJyxgnkQW4U2opK6483wZBZ+zqLJMxkG5l7YUZXJLgwtZqoOhLK/Fyetwq7ftkuhWgrHFuxn2Zxo+mJQP3MAU/g= X-Received: by 2002:a5d:6c64:: with SMTP id r4mr2338113wrz.316.1625182400282; Thu, 01 Jul 2021 16:33:20 -0700 (PDT) MIME-Version: 1.0 References: <20210701210537.51272-1-hjl.tools@gmail.com> In-Reply-To: Date: Thu, 1 Jul 2021 16:33:07 -0700 Message-ID: Subject: Re: [llvm-dev] [PATCH] Add optional _Float16 support To: "H.J. Lu" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jacob Lifshay via Libc-alpha Reply-To: Jacob Lifshay Cc: llvm-dev , GNU C Library , GCC Patches , IA32 System V Application Binary Interface , Joseph Myers Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Thu, Jul 1, 2021, 15:28 H.J. Lu via llvm-dev wrote: > On Thu, Jul 1, 2021 at 3:10 PM Joseph Myers > wrote: > > > > On Thu, 1 Jul 2021, H.J. Lu via Gcc-patches wrote: > > > > > 2. Return _Float16 and _Complex _Float16 values in %xmm0/%xmm1 > registers. > > > > That restricts use of _Float16 to processors with SSE. Is that what we > > want in the ABI, or should _Float16 be available with base 32-bit x86 > > architecture features only, much like _Float128 and the decimal FP types > > Yes, _Float16 requires XMM registers. > > > are? (If it is restricted to SSE, we can of course ensure relevant > libgcc > > functions are built with SSE enabled, and likewise in glibc if that gains > > _Float16 functions, though maybe with some extra complications to get > > relevant testcases to run whenever possible.) > > > > _Float16 functions in libgcc should be compiled with SSE enabled. > > BTW, _Float16 software emulation may require more than just SSE > since we need to do _Float16 load and store with XMM registers. > There is no 16bit load/store for XMM registers without AVX512FP16. > Umm, if you just need to load/store 16-bit scalars in XMM registers you can use pextrw and pinsrw which don't require AVX. f16x8 can use any of the standard full-register load/stores. https://gcc.godbolt.org/z/ncznr9TM1 Jacob