From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 0860A265CA for ; Wed, 26 Jun 2024 00:29:21 +0200 (CEST) Received: (qmail 21855 invoked by uid 550); 25 Jun 2024 22:29:16 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 21803 invoked from network); 25 Jun 2024 22:29:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1719354548; x=1719959348; darn=lists.openwall.com; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JsYYXKCroXwEwq+KvKe8BtYGLPpe/4qh97W3q5GynSs=; b=wmCP189j9F7GeVKTy2Xv4MeE7N0OwbBMhMwqAPp8adGk08XCxWpvyqU6v8lh2+wNoV gtFsnqpZgxPXbibX/VhFED9cV2uhDTTE5zw9ZVOw9AL2N8dv2B7XCG67OZ6Ge/y9bz79 /F+Q/OPPAYFO1wSHCmyLdNXLa+kAEc482mu+XYuAQe0ESD4lXh+wTdK/SkF9guOBw1eo jjTdaViF33h1peO6WdJi/TGaPnRC99XPIfWIEn/RgrMPBwn4mpYRPaQ8TtjvTrnYbjRi S5MaOuyOawi9hPcwpKCKyz/FcFHtL+A2PTMYYgNEJ+XutU17MEtBWic4476gy5XtYQ6U 2d+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719354548; x=1719959348; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JsYYXKCroXwEwq+KvKe8BtYGLPpe/4qh97W3q5GynSs=; b=xRcDltWRFIbGAptzPEFZ5sDTHpL9CCiddlwTnOzMtwbdsgsLYuuH7bg7bDevQTeyFl Dou8+M1WvWAqZMONf18fmYlKcu+06WfDW/s+Sa6to2P0ElfDu3cef9rg4xg1VL54u3uu J1v4XnbMJHv+tkM5FjNL9j/DS2ePbCL5//Snh5QJdiiyniD6UMxFQD2/+/tfZIY3QTf9 ZdIaJeq3hU+d+/T013LbgJQ4PLnDEpVdutt8oxr21RQSK2+S6St5BmYLNiLESDXsRXHp 5ih6s7of0JBMdtIrZGhjhY+AXyNxJM6gS25aE6NLUR2OvUug0Izrt/6lcEorT8V4QcVs z5gg== X-Gm-Message-State: AOJu0Yw383aMnx4B608AKLUOpB4Zk/85I5tJ2wO40S1larHRID6cGV1K c3nUWkaTnh3PfVcc9GrI6ZgBxH62tq+52C3MnRIFZmDET+axX1NLOahc3sMCr4RVi2D5hi8Yzj3 o4QbJbgDMcF+NveSe6gcKYpREV1aR/RUGFRWG5DKO+Hrgsl1JsVR7atw= X-Google-Smtp-Source: AGHT+IGWBtre1iaFxyVr6g/Sz3XSiIxi9ZrgWDmXxZUJ5EFHQrVKCtMe2aI/WEr3QaCqnogjqsqrFyfDqscSVWVCCLk= X-Received: by 2002:a05:6214:3012:b0:6b5:4878:49c with SMTP id 6a1803df08f44-6b548780767mr93671586d6.21.1719354548033; Tue, 25 Jun 2024 15:29:08 -0700 (PDT) MIME-Version: 1.0 References: <31679941-f6c2-64fa-7a8d-6b6f7112c31@esi.com.au> <20240618122357.GL3766212@port70.net> <67395818-5d95-f74f-5c50-435fc157dda@esi.com.au> <20240619185837.GM3766212@port70.net> <20240623183320.GF10433@brightrain.aerifal.cx> <19361e3c-8d13-af73-7896-bc4665e9788f@esi.com.au> In-Reply-To: From: enh Date: Tue, 25 Jun 2024 18:28:52 -0400 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] roundf() (and round(), and ...) i don't know about gcc, but iirc for clang you don't even need to do that. it assumes it knows what various functions mean, and inlines trivial stuff like this anyway... /tmp$ cat x.c #include double foo(double x) { return fabs(x); } /tmp$ cc -O2 -S -o - x.c .section __TEXT,__text,regular,pure_instructions .build_version macos, 14, 0 sdk_version 14, 4 .globl _foo ; -- Begin function foo .p2align 2 _foo: ; @foo .cfi_startproc ; %bb.0: fabs d0, d0 ret .cfi_endproc ; -- End function .subsections_via_symbols /tmp$ (the same is true even at -O0, there's just more boilerplate around it that way.) bionic actually uses __builtin_fabs() [and friends] to _implement_ these functions, should someone be foolish enough to be using a function pointer to call them, but we don't actually expect these functions to ever be called. On Tue, Jun 25, 2024 at 6:24=E2=80=AFPM Damian McGuckin wrote: > > On Tue, 25 Jun 2024, Markus Wichmann wrote: > > > #define fabs(x) __builtin_fabs(x) > > > > But as far as I can tell, this hasn't happened yet. > > Thanks for the insight - Damian