From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 7AE20385702D for ; Fri, 2 Jul 2021 07:45:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7AE20385702D Received: by mail-ed1-x52a.google.com with SMTP id s15so11940430edt.13 for ; Fri, 02 Jul 2021 00:45:58 -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=m2ayl3UqKAEso/mkkNg95+Yi9GUXUWvmsgHtFV/9VwY=; b=sbgaFlOP1pllB+DEQM1KmfPaNalwvhHJum3nY4blUXCTk6EuWT62V6GjYkkE94JjTy lqFvpwwwG8a35Np2UrHZo7OivOmtLM8q9JixDiNYYopnc5zT6Qm/H1FhdQvk5wQjjwS8 Ks8+10teB/PtsXkraDV72N1qbu/iO9yFzZeHJMIjeH+XBej3F+TRTBD/R24ttr/PDAYV VmsLKYyktzzXrt4NePUYTNgQ3Qjlzcb84RfGwA8BIscycGSrGHWWTz6G1ZSpw8NzhBnM Bb9iwhN30LAWzVrvFtP4ovkXMsiuLYTyQ6QRnLr9N7YJ3NY4eRJBKH8TaGWVwIRR0vfZ uzYA== X-Gm-Message-State: AOAM530l4vs2aiYUkx646yatRdeYSG32FM8cdE+aXCYCuv1a/aP9qlPb K9B3XuQ9zkFZMF6aUGgPw3VWTN4qzriE3r3ivQA= X-Google-Smtp-Source: ABdhPJwW+mqv2NQYDpUi0ogFQWbpn/PC+VkQSu/fiAJrY1Nkz9TSZ9zH8IhnDViND38mlJykaOtk6CnNcCX4JvGbX+8= X-Received: by 2002:a05:6402:42c9:: with SMTP id i9mr5044324edc.61.1625211957485; Fri, 02 Jul 2021 00:45:57 -0700 (PDT) MIME-Version: 1.0 References: <20210701210537.51272-1-hjl.tools@gmail.com> In-Reply-To: From: Richard Biener Date: Fri, 2 Jul 2021 09:45:46 +0200 Message-ID: Subject: Re: [llvm-dev] [PATCH] Add optional _Float16 support To: Jacob Lifshay Cc: "H.J. Lu" , llvm-dev , GNU C Library , GCC Patches , IA32 System V Application Binary Interface , Joseph Myers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.2 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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 02 Jul 2021 07:46:01 -0000 On Fri, Jul 2, 2021 at 1:34 AM Jacob Lifshay via Gcc-patches wrote: > > 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. It looks like that requires SSE2, with SSE only inserts/extracts to/from MMX regs are supported. But of course GPR half-word loads and GPR->XMM moves of full size would work. > https://gcc.godbolt.org/z/ncznr9TM1 > > Jacob