From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id 46982385843E for ; Thu, 16 Dec 2021 21:13:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 46982385843E Received: by mail-qv1-xf30.google.com with SMTP id kd9so477157qvb.11 for ; Thu, 16 Dec 2021 13:13:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=BAUh4K5aZF6vLn6QZMIljFO/uVND9rMgDIlkwE3ZVeI=; b=ZuNZAB/G+Lf8Giog+t6HSoR7oQTzAO0Yho6X6Rxvr5I88X+3yb9RiCSe5z9ya83z3X qjoZUb/t1KfwMwZ1ICXhP4uTGp03dH6Mldc5ezh8zBo0jPktO1PuFMJf5pgav57STJPl ml8yPpr1Psp187ZrhE7ukn2FOjySpPuLCHWoFs3iTy7RDYtTf3Ft14bQpNU+SSArMWxW 3WZzS2UZ1sKUbe0ElAh5Fr6BXyAPUU3WUB1U/w4c2+MldIBGV186/Hrfshd8biZy6p23 S0V3uVrDyQOJ2JtPpytaBAOV0MIqEblsauk3rM124EHPfabcv62y6+l+w31cZyKE/pwB pCjQ== X-Gm-Message-State: AOAM530g89Ae/O6jogdZy6U87GI+AFwElfDHLMNLhlC0byEzCANxSfFa I1t2ktKcE4UfhuuCb9VsYPMOnjpNucqZTA== X-Google-Smtp-Source: ABdhPJxXdelpMJSHs6z5CTvFCXQqkWmW1zwbZb9AfYNz5MsUcLePRLqJ5TFUDl2blteABi8ye827fQ== X-Received: by 2002:a05:6214:d69:: with SMTP id 9mr13027285qvs.50.1639689215798; Thu, 16 Dec 2021 13:13:35 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:103f:96e9:fe91:2aff:a44d? ([2804:431:c7ca:103f:96e9:fe91:2aff:a44d]) by smtp.gmail.com with ESMTPSA id y20sm3627366qkj.24.2021.12.16.13.13.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Dec 2021 13:13:35 -0800 (PST) Message-ID: <8f4d1d3e-70a6-63e2-ce22-8026ef1006a8@linaro.org> Date: Thu, 16 Dec 2021 18:13:32 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v4 0/1] Add vector math function acos/acosf to libmvec Content-Language: en-US To: Joseph Myers , Sunil K Pandey Cc: andrey.kolesov@intel.com, libc-alpha@sourceware.org References: <20211216001239.3648099-1-skpgkp2@gmail.com> From: Adhemerval Zanella In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 16 Dec 2021 21:13:39 -0000 On 16/12/2021 16:18, Joseph Myers wrote: > I'd like to know more about where this assembly code came from. Is it > manually written? Generated by a compiler and then manually edited, as > suggested in previous discussions? If it was generated by a compiler but > then sufficiently edited that the assembly version is now the preferred > form for subsequent modifications, it would still be helpful to see the > original input to that compiler (e.g. as a comment in the .S files), in > order to assess the relative merits of C and assembly sources for this > code and the possibilities of adapting to other architectures - and also > to see the original compiler output so we can judge the extent of the > editing and work out what is in fact the preferred form for modifications. > Besides it I am curious why it can't be coded in C with proper builtins plus some portability wrapper, as libraries like SLEEF does. With some care we can make generic code that can ported to other vector ABIs, and add optimizations only its is really requires (as FMA for the newer math functions).