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=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HK_RANDOM_REPLYTO, 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 1E09A1F8C6 for ; Tue, 24 Aug 2021 05:57:05 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 447B93858420 for ; Tue, 24 Aug 2021 05:57:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 447B93858420 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629784623; bh=IjOsUyzbdvPFwyDbL6lcqqBcdWSDErOeh7kolWnrSBI=; 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=iF9Mzy6ELDygSZRxZj+GMtERk7viXBwQVEFf4d7dR9pbVFnQV1vNKyvxqxyDjeH2j jZnLQ5F+zBoMMmemmC36uP/6g5S0vn2HpqW+Ll55WimSWZyxcaOAQ5cmB+Rmscnxym kOJCLMlZJad6mj5Cq+3XZ7T8hIaYWGEMfQomeSFQ= Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id A06873858C3B for ; Tue, 24 Aug 2021 05:55:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A06873858C3B Received: by mail-ed1-x530.google.com with SMTP id q3so29835165edt.5 for ; Mon, 23 Aug 2021 22:55:38 -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=+XBH053cDe98Iy7PhiujBeDmKPNYWkvO02D6LMM90FU=; b=fQ1+dz9R7cOTTrfQohUXEHr36QVQ+PP54Qb8mBM7VFdDGuesKBX920NRxoVmvBKovV 7UPm/2BWoLJfpeWYq1VraPdEWNGkL19jduahK07teRnjs/4rylgMU2hxxeDD0YQeomTv HbejJ6r4ls39Vwe4viN9FLIJT/IaF1BrDaWct6tLx//Ds0T6b9LM4XhBfQ50BiiF99Gi 4KtAIJVHyWJfcpOjpkKiaBo3FP7110hR+lIJw4I9CogZjF8TlK03Fq2L6s4stD5hTQ69 biReV3PSYQjS5mb96lhwiLgKLGm9oI8gISwCDD0Gp2369+DRNZnBqLTdjZxqUXtpdmnC kruQ== X-Gm-Message-State: AOAM530Px8Dwwrb3daKXmCKkCXZ5hn1GLLD4TJQu/p8ISzyILPP6mNu0 W2WlQLCWakaVU+C0WaJAVk2Uc6p+CqmIlttpI58= X-Google-Smtp-Source: ABdhPJy3LJe8hzrGtiSMXleIf8jYeq0Mth88PPJA/fURuO/8WcF48j3PcbiOKHjU2r68k+UGuNxCmIMMtr4ntrbo1T4= X-Received: by 2002:a05:6402:1775:: with SMTP id da21mr1540220edb.49.1629784537742; Mon, 23 Aug 2021 22:55:37 -0700 (PDT) MIME-Version: 1.0 References: <20210701210537.51272-1-hjl.tools@gmail.com> In-Reply-To: Date: Tue, 24 Aug 2021 01:55:26 -0400 Message-ID: Subject: Re: [llvm-dev] [PATCH] Add optional _Float16 support To: ia32-abi@googlegroups.com 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: John McCall via Libc-alpha Reply-To: John McCall Cc: "Wang, Pengfei" , LLVM Dev , GNU C Library , GCC Patches Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Thu, Jul 29, 2021 at 9:40 AM H.J. Lu wrote: > On Tue, Jul 13, 2021 at 9:24 AM H.J. Lu wrote: > > > > On Tue, Jul 13, 2021 at 8:41 AM Joseph Myers > wrote: > > > > > > On Tue, 13 Jul 2021, H.J. Lu wrote: > > > > > > > On Mon, Jul 12, 2021 at 8:59 PM Wang, Pengfei < > pengfei.wang@intel.com> wrote: > > > > > > > > > > > Return _Float16 and _Complex _Float16 values in %xmm0/%xmm1 > registers. > > > > > > > > > > Can you please explain the behavior here? Is there difference > between _Float16 and _Complex _Float16 when return? I.e., > > > > > 1, In which case will _Float16 values return in both %xmm0 and > %xmm1? > > > > > 2, For a single _Float16 value, are both real part and imaginary > part returned in %xmm0? Or returned in %xmm0 and %xmm1 respectively? > > > > > > > > Here is the v2 patch to add the missing _Float16 bits. The PDF > file is at > > > > > > > > https://gitlab.com/x86-psABIs/i386-ABI/-/wikis/Intel386-psABI > > > > > > This PDF shows _Complex _Float16 as having a size of 2 bytes (should be > > > 4-byte size, 2-byte alignment). > > > > > > It also seems to change double from 4-byte to 8-byte alignment, which > is > > > wrong. And it's inconsistent about whether it covers the long double = > > > double (Android) case - it shows that case for _Complex long double but > > > not for long double itself. > > > > Here is the v3 patch with the fixes. I also updated the PDF file. > > Here is the final patch I checked in. _Complex _Float16 is changed to > return > in XMM0 register. The new PDF file is at > > https://gitlab.com/x86-psABIs/i386-ABI/-/wikis/Intel386-psABI This should be explicit that the real part is returned in bits 0..15 and the imaginary part is returned in bits 16..31, or however we conventionally designate subcomponents of a vector. John.