From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52002 invoked by alias); 16 Mar 2017 21:22:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 51977 invoked by uid 89); 16 Mar 2017 21:22:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:738 X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8A73765CE2 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8A73765CE2 Subject: Re: Improving math function wrappers To: Wilco Dijkstra , Szabolcs Nagy , Joseph Myers , "libc-alpha@sourceware.org" References: Cc: nd From: Florian Weimer Message-ID: <3623011d-1a3a-c499-6b42-1d5506c6a71a@redhat.com> Date: Thu, 16 Mar 2017 21:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-03/txt/msg00339.txt.bz2 On 03/16/2017 02:52 PM, Wilco Dijkstra wrote: > While the wrappers may be bypassed when building with -Ofast, this uses C header > magic (ie. it doesn't work in languages other than C and C++). Given other languages > don't even have the concept of errno, C99 doesn't require it, and no application ever > reads errno, it is inefficient to force the use of the wrappers in almost all cases. What's the expensive part? Computing what errno value to set, or obtaining the location of errno? We have recently removed the PID cache from the TCB. We could store the errno value there, instead of going through __errno_location. (Code outside glibc would still use __errno_location, of course.) Florian