From patchwork Thu Apr 16 21:00:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 133220 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 7004F4C9176B for ; Thu, 16 Apr 2026 21:02:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7004F4C9176B X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) by sourceware.org (Postfix) with ESMTPS id 02A0C4C515F7 for ; Thu, 16 Apr 2026 21:01:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02A0C4C515F7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 02A0C4C515F7 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.178 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373285; cv=none; b=XWt29Xnf8LU2kY4o4rI9Sh70QcxMu39Zrw6Mx5KQkKL6yZFIwfAQFP86XG+7n70/kkLWGw8HnspyjUugjkJHy8dH9HSkQ9c3QNn+j2kOBZODHCt8k5ccUuTNTmWOHX5ePMmGkP3eShe6iElsM4ndsSTMI2Gy+DIn3HAZYUsw6mg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373285; c=relaxed/simple; bh=wuMMwfSfhwrCn/VeJ9ujnAxMnJibeLe523QeOq6t5c4=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=jBPuNtDstHBXhlZYEloZhI2OBHx7Bo6EfHmWYc5ZwZii8FAMXieqV+hmhegRSWHwLpsez26XQTv7b20WTfUraHk9P2p7Sk9xWnJI53aNvGco4pWlTl6Bp4KzjF5oquOMYnWE8iDRJ2csqpjCzbFydg9lk2KnfFVogBxWAO4Zae4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02A0C4C515F7 Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-7b186dfc1d0so435697b3.1 for ; Thu, 16 Apr 2026 14:01:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776373283; x=1776978083; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qCFvgghrtWRxaWS1ZXQ2zEb1nEQsXHVvc9QarOdf9hY=; b=ICvlGRTXWYrDfpegFC55Fls/2TE5allI9Q22IPcpXKZme6/i/uVNM8m+nqjfRcD8kF ZyFMIjVvwfOCWjYWigWY+3DtGSblMZm91cAOXi6uqQItBSGJVFTbFnORTE9pnUPZiCRK E1n4cJGBeUhOlMH6a+AcA3nlFj2l3gDppbiNq+NQPIVtUakC3WVm4QA+Y+kj3CQL1NRc 1vZiWBWxCzFx5aD4bl96CPcmLbMUatExH8NDK5aj/ARFnWTPNC9UJ3vE4NfSPLvpBXBe fmwX48Gb+zN81z3hIzQleEcEH6t4RgCojzSDiyeMR5Mu5zrNXbrQfJvCdoxuYJfa9h6H MP6A== X-Gm-Message-State: AOJu0YwvJae/foft/kN/saWVecCbjiFMrZoGwx/B6VXOv8jp5YmSD4+y AQNGWft/cG8grvRRZV5v4dXRDE0H0wssx5YSJ4WHIYQA49W4+I1k3Jh3zxnlum9K X-Gm-Gg: AeBDiesOg+rlD11/XkJxg/+Ko3jUCnnv7AfjTB6ZYNDy0ynufzpHqc9nk8OGTBiWS4A qIh0xUqsSfo1xIGlkgLCwZBQsaDVfVw9+1Wuf2w3oW15tSJtAp/Qka/DN0UZpGiTG08J9YrLqNF lSUTTPpJfxvOsXWG8xSzfmkAY3JyxRHjnQHyM3fyMyADaYp60YSOcxo3cEHjB67UJDb40ATYx8W 6OPwDVHI+RKLcCQFulKjT+NRX1IZViS5s5xiToXyBulm6U1WXDeIZLFgaWXKm/KvRxlkNEUofXR qI3CW+wweYHnTETCBaTQD9zpvoalxSvo4nE4cOuFtS/lr5G84QHk0ubSFDBhGtoY8QR7zT06QT3 exUMcvWuWfFesLGQXWphe5ce/cKXmCunWKHSJg2F/hYSZujyVkh9n9HYGuVCTM3ZLFIwGqxkegJ jpEKLuUvNGWi/QrPzV0/I7VannodSUAFDHJDdB4IuJrPpBv2v+XNbOU6Pu38gVwrPrJD3L8JfD X-Received: by 2002:a05:690c:289:b0:79a:b409:b5e0 with SMTP id 00721157ae682-7b9ed0aaf97mr774817b3.0.1776373282271; Thu, 16 Apr 2026 14:01:22 -0700 (PDT) Received: from gitlab.oarcorp.com (d27-96-189-151.evv.wideopenwest.com. [96.27.151.189]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7b76931854esm28916287b3.37.2026.04.16.14.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2026 14:01:20 -0700 (PDT) From: Joel Sherrill To: newlib@sourceware.org Cc: Joel Sherrill Subject: [PATCH v3 1/6] newlib/libc: Add C23 stdbit.h from FreeBSD Date: Thu, 16 Apr 2026 16:00:42 -0500 Message-ID: <20260416210047.2198615-2-joel@rtems.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260416210047.2198615-1-joel@rtems.org> References: <20260416210047.2198615-1-joel@rtems.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3036.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org FreeBSD git hash: 80b4129bef8b908eb19fe47853cb6e45e4513d76 The files have no changes from the above FreeBSD git hash. --- newlib/libc/include/stdbit.h | 124 ++++++++++++++++++ newlib/libc/stdbit/stdc_bit_ceil.3 | 81 ++++++++++++ newlib/libc/stdbit/stdc_bit_ceil.c | 71 ++++++++++ newlib/libc/stdbit/stdc_bit_floor.3 | 83 ++++++++++++ newlib/libc/stdbit/stdc_bit_floor.c | 53 ++++++++ newlib/libc/stdbit/stdc_bit_width.3 | 104 +++++++++++++++ newlib/libc/stdbit/stdc_bit_width.c | 53 ++++++++ newlib/libc/stdbit/stdc_count_ones.3 | 85 ++++++++++++ newlib/libc/stdbit/stdc_count_ones.c | 38 ++++++ newlib/libc/stdbit/stdc_count_zeros.3 | 84 ++++++++++++ newlib/libc/stdbit/stdc_count_zeros.c | 38 ++++++ newlib/libc/stdbit/stdc_first_leading_one.3 | 93 +++++++++++++ newlib/libc/stdbit/stdc_first_leading_one.c | 57 ++++++++ newlib/libc/stdbit/stdc_first_leading_zero.3 | 92 +++++++++++++ newlib/libc/stdbit/stdc_first_leading_zero.c | 57 ++++++++ newlib/libc/stdbit/stdc_first_trailing_one.3 | 110 ++++++++++++++++ newlib/libc/stdbit/stdc_first_trailing_one.c | 52 ++++++++ newlib/libc/stdbit/stdc_first_trailing_zero.3 | 93 +++++++++++++ newlib/libc/stdbit/stdc_first_trailing_zero.c | 53 ++++++++ newlib/libc/stdbit/stdc_has_single_bit.3 | 98 ++++++++++++++ newlib/libc/stdbit/stdc_has_single_bit.c | 38 ++++++ newlib/libc/stdbit/stdc_leading_ones.3 | 86 ++++++++++++ newlib/libc/stdbit/stdc_leading_ones.c | 60 +++++++++ newlib/libc/stdbit/stdc_leading_zeros.3 | 86 ++++++++++++ newlib/libc/stdbit/stdc_leading_zeros.c | 60 +++++++++ newlib/libc/stdbit/stdc_trailing_ones.3 | 86 ++++++++++++ newlib/libc/stdbit/stdc_trailing_ones.c | 56 ++++++++ newlib/libc/stdbit/stdc_trailing_zeros.3 | 87 ++++++++++++ newlib/libc/stdbit/stdc_trailing_zeros.c | 56 ++++++++ 29 files changed, 2134 insertions(+) create mode 100644 newlib/libc/include/stdbit.h create mode 100644 newlib/libc/stdbit/stdc_bit_ceil.3 create mode 100644 newlib/libc/stdbit/stdc_bit_ceil.c create mode 100644 newlib/libc/stdbit/stdc_bit_floor.3 create mode 100644 newlib/libc/stdbit/stdc_bit_floor.c create mode 100644 newlib/libc/stdbit/stdc_bit_width.3 create mode 100644 newlib/libc/stdbit/stdc_bit_width.c create mode 100644 newlib/libc/stdbit/stdc_count_ones.3 create mode 100644 newlib/libc/stdbit/stdc_count_ones.c create mode 100644 newlib/libc/stdbit/stdc_count_zeros.3 create mode 100644 newlib/libc/stdbit/stdc_count_zeros.c create mode 100644 newlib/libc/stdbit/stdc_first_leading_one.3 create mode 100644 newlib/libc/stdbit/stdc_first_leading_one.c create mode 100644 newlib/libc/stdbit/stdc_first_leading_zero.3 create mode 100644 newlib/libc/stdbit/stdc_first_leading_zero.c create mode 100644 newlib/libc/stdbit/stdc_first_trailing_one.3 create mode 100644 newlib/libc/stdbit/stdc_first_trailing_one.c create mode 100644 newlib/libc/stdbit/stdc_first_trailing_zero.3 create mode 100644 newlib/libc/stdbit/stdc_first_trailing_zero.c create mode 100644 newlib/libc/stdbit/stdc_has_single_bit.3 create mode 100644 newlib/libc/stdbit/stdc_has_single_bit.c create mode 100644 newlib/libc/stdbit/stdc_leading_ones.3 create mode 100644 newlib/libc/stdbit/stdc_leading_ones.c create mode 100644 newlib/libc/stdbit/stdc_leading_zeros.3 create mode 100644 newlib/libc/stdbit/stdc_leading_zeros.c create mode 100644 newlib/libc/stdbit/stdc_trailing_ones.3 create mode 100644 newlib/libc/stdbit/stdc_trailing_ones.c create mode 100644 newlib/libc/stdbit/stdc_trailing_zeros.3 create mode 100644 newlib/libc/stdbit/stdc_trailing_zeros.c diff --git a/newlib/libc/include/stdbit.h b/newlib/libc/include/stdbit.h new file mode 100644 index 000000000..a529676be --- /dev/null +++ b/newlib/libc/include/stdbit.h @@ -0,0 +1,124 @@ +/*- + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef __STDC_VERSION_STDBIT_H__ +#define __STDC_VERSION_STDBIT_H__ 202311L + +#include + +/* byte order */ +#define __STDC_ENDIAN_LITTLE__ __ORDER_LITTLE_ENDIAN__ +#define __STDC_ENDIAN_BIG__ __ORDER_BIG_ENDIAN__ +#define __STDC_ENDIAN_NATIVE__ __BYTE_ORDER__ + +#define __generic_bitfunc(func, x) (_Generic(x, \ + unsigned char: func ## _uc, \ + unsigned short: func ## _us, \ + unsigned int: func ## _ui, \ + unsigned long: func ## _ul, \ + unsigned long long: func ## _ull)(x)) + +__BEGIN_DECLS +unsigned int stdc_leading_zeros_uc(unsigned char) __pure2; +unsigned int stdc_leading_zeros_us(unsigned short) __pure2; +unsigned int stdc_leading_zeros_ui(unsigned int) __pure2; +unsigned int stdc_leading_zeros_ul(unsigned long) __pure2; +unsigned int stdc_leading_zeros_ull(unsigned long long) __pure2; +#define stdc_leading_zeros(x) __generic_bitfunc(stdc_leading_zeros, x) + +unsigned int stdc_leading_ones_uc(unsigned char) __pure2; +unsigned int stdc_leading_ones_us(unsigned short) __pure2; +unsigned int stdc_leading_ones_ui(unsigned int) __pure2; +unsigned int stdc_leading_ones_ul(unsigned long) __pure2; +unsigned int stdc_leading_ones_ull(unsigned long long) __pure2; +#define stdc_leading_ones(x) __generic_bitfunc(stdc_leading_ones, x) + +unsigned int stdc_trailing_zeros_uc(unsigned char) __pure2; +unsigned int stdc_trailing_zeros_us(unsigned short) __pure2; +unsigned int stdc_trailing_zeros_ui(unsigned int) __pure2; +unsigned int stdc_trailing_zeros_ul(unsigned long) __pure2; +unsigned int stdc_trailing_zeros_ull(unsigned long long) __pure2; +#define stdc_trailing_zeros(x) __generic_bitfunc(stdc_trailing_zeros, x) + +unsigned int stdc_trailing_ones_uc(unsigned char) __pure2; +unsigned int stdc_trailing_ones_us(unsigned short) __pure2; +unsigned int stdc_trailing_ones_ui(unsigned int) __pure2; +unsigned int stdc_trailing_ones_ul(unsigned long) __pure2; +unsigned int stdc_trailing_ones_ull(unsigned long long) __pure2; +#define stdc_trailing_ones(x) __generic_bitfunc(stdc_trailing_ones, x) + +unsigned int stdc_first_leading_zero_uc(unsigned char) __pure2; +unsigned int stdc_first_leading_zero_us(unsigned short) __pure2; +unsigned int stdc_first_leading_zero_ui(unsigned int) __pure2; +unsigned int stdc_first_leading_zero_ul(unsigned long) __pure2; +unsigned int stdc_first_leading_zero_ull(unsigned long long) __pure2; +#define stdc_first_leading_zero(x) __generic_bitfunc(stdc_first_leading_zero, x) + +unsigned int stdc_first_leading_one_uc(unsigned char) __pure2; +unsigned int stdc_first_leading_one_us(unsigned short) __pure2; +unsigned int stdc_first_leading_one_ui(unsigned int) __pure2; +unsigned int stdc_first_leading_one_ul(unsigned long) __pure2; +unsigned int stdc_first_leading_one_ull(unsigned long long) __pure2; +#define stdc_first_leading_one(x) __generic_bitfunc(stdc_first_leading_one, x) + +unsigned int stdc_first_trailing_zero_uc(unsigned char) __pure2; +unsigned int stdc_first_trailing_zero_us(unsigned short) __pure2; +unsigned int stdc_first_trailing_zero_ui(unsigned int) __pure2; +unsigned int stdc_first_trailing_zero_ul(unsigned long) __pure2; +unsigned int stdc_first_trailing_zero_ull(unsigned long long) __pure2; +#define stdc_first_trailing_zero(x) __generic_bitfunc(stdc_first_trailing_zero, x) + +unsigned int stdc_first_trailing_one_uc(unsigned char) __pure2; +unsigned int stdc_first_trailing_one_us(unsigned short) __pure2; +unsigned int stdc_first_trailing_one_ui(unsigned int) __pure2; +unsigned int stdc_first_trailing_one_ul(unsigned long) __pure2; +unsigned int stdc_first_trailing_one_ull(unsigned long long) __pure2; +#define stdc_first_trailing_one(x) __generic_bitfunc(stdc_first_trailing_one, x) + +unsigned int stdc_count_zeros_uc(unsigned char) __pure2; +unsigned int stdc_count_zeros_us(unsigned short) __pure2; +unsigned int stdc_count_zeros_ui(unsigned int) __pure2; +unsigned int stdc_count_zeros_ul(unsigned long) __pure2; +unsigned int stdc_count_zeros_ull(unsigned long long) __pure2; +#define stdc_count_zeros(x) __generic_bitfunc(stdc_count_zeros, x) + +unsigned int stdc_count_ones_uc(unsigned char) __pure2; +unsigned int stdc_count_ones_us(unsigned short) __pure2; +unsigned int stdc_count_ones_ui(unsigned int) __pure2; +unsigned int stdc_count_ones_ul(unsigned long) __pure2; +unsigned int stdc_count_ones_ull(unsigned long long) __pure2; +#define stdc_count_ones(x) __generic_bitfunc(stdc_count_ones, x) + +_Bool stdc_has_single_bit_uc(unsigned char) __pure2; +_Bool stdc_has_single_bit_us(unsigned short) __pure2; +_Bool stdc_has_single_bit_ui(unsigned int) __pure2; +_Bool stdc_has_single_bit_ul(unsigned long) __pure2; +_Bool stdc_has_single_bit_ull(unsigned long long) __pure2; +#define stdc_has_single_bit(x) __generic_bitfunc(stdc_has_single_bit, x) + +unsigned int stdc_bit_width_uc(unsigned char) __pure2; +unsigned int stdc_bit_width_us(unsigned short) __pure2; +unsigned int stdc_bit_width_ui(unsigned int) __pure2; +unsigned int stdc_bit_width_ul(unsigned long) __pure2; +unsigned int stdc_bit_width_ull(unsigned long long) __pure2; +#define stdc_bit_width(x) __generic_bitfunc(stdc_bit_width, x) + +unsigned char stdc_bit_floor_uc(unsigned char) __pure2; +unsigned short stdc_bit_floor_us(unsigned short) __pure2; +unsigned stdc_bit_floor_ui(unsigned int) __pure2; +unsigned long stdc_bit_floor_ul(unsigned long) __pure2; +unsigned long long stdc_bit_floor_ull(unsigned long long) __pure2; +#define stdc_bit_floor(x) __generic_bitfunc(stdc_bit_floor, x) + +unsigned char stdc_bit_ceil_uc(unsigned char) __pure2; +unsigned short stdc_bit_ceil_us(unsigned short) __pure2; +unsigned int stdc_bit_ceil_ui(unsigned int) __pure2; +unsigned long stdc_bit_ceil_ul(unsigned long) __pure2; +unsigned long long stdc_bit_ceil_ull(unsigned long long) __pure2; +#define stdc_bit_ceil(x) __generic_bitfunc(stdc_bit_ceil, x) +__END_DECLS + +#endif /* __STDC_VERSION_STDBIT_H__ */ diff --git a/newlib/libc/stdbit/stdc_bit_ceil.3 b/newlib/libc/stdbit/stdc_bit_ceil.3 new file mode 100644 index 000000000..470b255f4 --- /dev/null +++ b/newlib/libc/stdbit/stdc_bit_ceil.3 @@ -0,0 +1,81 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_BIT_CEIL 3 +.Os +.Sh NAME +.Nm stdc_bit_ceil +.Nd round up to the next power of\~2 +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned char +.Fn stdc_bit_ceil_uc "unsigned char value" +.Ft unsigned short +.Fn stdc_bit_ceil_us "unsigned short value" +.Ft unsigned int +.Fn stdc_bit_ceil_ui "unsigned int value" +.Ft unsigned long +.Fn stdc_bit_ceil_ul "unsigned long value" +.Ft unsigned long long +.Fn stdc_bit_ceil_ull "unsigned long long value" +.Ft typeof Ns Pq Em value +.Fn stdc_bit_ceil "value" +.Sh DESCRIPTION +The +.Nm stdc_bit_ceil_ Ns Em type Ns () +family of functions rounds +.Fa value +up to the next power of\~2, where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_bit_ceil "value" +type-generic macro picks the appropriate +.Nm stdc_bit_ceil_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns +.Fa value +round up to the next power of\~2. +If this value is not representable, +0\~is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_bit_floor 3 +.Sh STANDARDS +The +.Nm stdc_bit_ceil_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_ceil +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_bit_ceil_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_ceil +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_bit_ceil.c b/newlib/libc/stdbit/stdc_bit_ceil.c new file mode 100644 index 000000000..2dfd7bbcb --- /dev/null +++ b/newlib/libc/stdbit/stdc_bit_ceil.c @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +/* Ensure we don't shift 1U out of range. */ +static_assert(UCHAR_WIDTH < UINT_WIDTH, + "stdc_bit_ceil_uc needs UCHAR_WIDTH < UINT_WIDTH"); + +unsigned char +stdc_bit_ceil_uc(unsigned char x) +{ + if (x <= 1) + return (1); + + return (1U << (UINT_WIDTH - __builtin_clz(x - 1))); +} + +/* Ensure we don't shift 1U out of range. */ +static_assert(USHRT_WIDTH < UINT_WIDTH, + "stdc_bit_ceil_us needs USHRT_WIDTH < UINT_WIDTH"); + +unsigned short +stdc_bit_ceil_us(unsigned short x) +{ + if (x <= 1) + return (1); + + return (1U << (UINT_WIDTH - __builtin_clz(x - 1))); +} + +unsigned int +stdc_bit_ceil_ui(unsigned int x) +{ + if (x <= 1) + return (1); + + if (x > UINT_MAX/2 + 1) + return (0); + + return (1U << (UINT_WIDTH - __builtin_clz(x - 1))); +} + +unsigned long +stdc_bit_ceil_ul(unsigned long x) +{ + if (x <= 1) + return (1); + + if (x > ULONG_MAX/2 + 1) + return (0); + + return (1UL << (ULONG_WIDTH - __builtin_clzl(x - 1))); +} + +unsigned long long +stdc_bit_ceil_ull(unsigned long long x) +{ + if (x <= 1) + return (1); + + if (x > ULLONG_MAX/2 + 1) + return (0); + + return (1ULL << (ULLONG_WIDTH - __builtin_clzll(x - 1))); +} diff --git a/newlib/libc/stdbit/stdc_bit_floor.3 b/newlib/libc/stdbit/stdc_bit_floor.3 new file mode 100644 index 000000000..3e90c34f0 --- /dev/null +++ b/newlib/libc/stdbit/stdc_bit_floor.3 @@ -0,0 +1,83 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_BIT_FLOOR 3 +.Os +.Sh NAME +.Nm stdc_bit_floor +.Nd round down to the previous power of\~2 +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned char +.Fn stdc_bit_floor_uc "unsigned char value" +.Ft unsigned short +.Fn stdc_bit_floor_us "unsigned short value" +.Ft unsigned int +.Fn stdc_bit_floor_ui "unsigned int value" +.Ft unsigned long +.Fn stdc_bit_floor_ul "unsigned long value" +.Ft unsigned long long +.Fn stdc_bit_floor_ull "unsigned long long value" +.Ft typeof Ns Pq Em value +.Fn stdc_bit_floor "value" +.Sh DESCRIPTION +The +.Nm stdc_bit_floor_ Ns Em type Ns () +family of functions rounds +.Fa value +down to the previous power of\~2, where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_bit_floor "value" +type-generic macro picks the appropriate +.Nm stdc_bit_floor_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns +.Fa value +round down to the previous power of\~2. +If +.Fa value +is equal to zero, +zero is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_bit_ceil 3 +.Sh STANDARDS +The +.Nm stdc_bit_floor_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_floor +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_bit_floor_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_floor +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_bit_floor.c b/newlib/libc/stdbit/stdc_bit_floor.c new file mode 100644 index 000000000..0a491d6ec --- /dev/null +++ b/newlib/libc/stdbit/stdc_bit_floor.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned char +stdc_bit_floor_uc(unsigned char x) +{ + if (x == 0) + return (0); + + return (1U << (UINT_WIDTH - __builtin_clz(x) - 1)); +} + +unsigned short +stdc_bit_floor_us(unsigned short x) +{ + if (x == 0) + return (0); + + return (1U << (UINT_WIDTH - __builtin_clz(x) - 1)); +} + +unsigned int +stdc_bit_floor_ui(unsigned int x) +{ + if (x == 0) + return (0); + + return (1U << (UINT_WIDTH - __builtin_clz(x) - 1)); +} + +unsigned long +stdc_bit_floor_ul(unsigned long x) +{ + if (x == 0) + return (0); + + return (1UL << (ULONG_WIDTH - __builtin_clzl(x) - 1)); +} + +unsigned long long +stdc_bit_floor_ull(unsigned long long x) +{ + if (x == 0) + return (0); + + return (1ULL << (ULLONG_WIDTH - __builtin_clzll(x) - 1)); +} diff --git a/newlib/libc/stdbit/stdc_bit_width.3 b/newlib/libc/stdbit/stdc_bit_width.3 new file mode 100644 index 000000000..68c41d896 --- /dev/null +++ b/newlib/libc/stdbit/stdc_bit_width.3 @@ -0,0 +1,104 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_BIT_WIDTH 3 +.Os +.Sh NAME +.Nm stdc_bit_width +.Nd find the first trailing one in an intege +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_bit_width_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_bit_width_us "unsigned short value" +.Ft unsigned int +.Fn stdc_bit_width_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_bit_width_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_bit_width_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_bit_width "value" +.Sh DESCRIPTION +The +.Nm stdc_bit_width_ Ns Em type Ns () +family of functions returns the number of bits needed to represent +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_bit_width "value" +type-generic macro picks the appropriate +.Nm stdc_bit_width_ Ns Em type Ns () +function based on the type of +.Fa value . +.Pp +Functions +.Fn stdc_bit_width_ui , +.Fn stdc_bit_width_ul , +and +.Fn stdc_bit_width_ull +are identical to +.Bx 4.3 +functions +.Xr fls 3 , +.Xr flsl 3 , +and +.Xr flsll 3 +respectively, except for operating on unsigned instead of signed values. +.Sh RETURN VALUES +Returns the least number of bits needed to represent +.Fa value . +If +.Fa value +is zero, the return value is zero. +Otherwise it is +.EQ +1 + \(lf log sub 2 italic value \(rf . +.EN +.Sh SEE ALSO +.Xr bit_fls 3 , +.Xr fls 3 , +.Xr flsl 3 , +.Xr flsll 3 , +.Xr stdbit 3 , +.Xr stdc_count_leading_zeros 3 , +.Xr stdc_first_leading_one 3 +.Sh STANDARDS +The +.Nm stdc_bit_width_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_width +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_bit_width_ Ns Em type Ns () +family of functions and the +.Fn stdc_bit_width +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_bit_width.c b/newlib/libc/stdbit/stdc_bit_width.c new file mode 100644 index 000000000..e248fae48 --- /dev/null +++ b/newlib/libc/stdbit/stdc_bit_width.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_bit_width_uc(unsigned char x) +{ + if (x == 0) + return (0); + + return (UINT_WIDTH - __builtin_clz(x)); +} + +unsigned int +stdc_bit_width_us(unsigned short x) +{ + if (x == 0) + return (0); + + return (UINT_WIDTH - __builtin_clz(x)); +} + +unsigned int +stdc_bit_width_ui(unsigned int x) +{ + if (x == 0) + return (0); + + return (UINT_WIDTH - __builtin_clz(x)); +} + +unsigned int +stdc_bit_width_ul(unsigned long x) +{ + if (x == 0) + return (0); + + return (ULONG_WIDTH - __builtin_clzl(x)); +} + +unsigned int +stdc_bit_width_ull(unsigned long long x) +{ + if (x == 0) + return (0); + + return (ULLONG_WIDTH - __builtin_clzll(x)); +} diff --git a/newlib/libc/stdbit/stdc_count_ones.3 b/newlib/libc/stdbit/stdc_count_ones.3 new file mode 100644 index 000000000..fa3a2aa36 --- /dev/null +++ b/newlib/libc/stdbit/stdc_count_ones.3 @@ -0,0 +1,85 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_COUNT_ONES 3 +.Os +.Sh NAME +.Nm stdc_count_ones +.Nd count the ones in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_count_ones_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_count_ones_us "unsigned short value" +.Ft unsigned int +.Fn stdc_count_ones_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_count_ones_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_count_ones_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_count_ones "value" +.Sh DESCRIPTION +The +.Nm stdc_count_ones_ Ns Em type Ns () +family of functions returns the number of bits set to\~1 in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +This is also known as the +.Dq population count +(popcount) or +.Dq Hamming weight +operation. +The +.Fn stdc_count_ones "value" +type-generic macro picks the appropriate +.Nm stdc_count_ones_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the number of bits set to\~1 in +.Fa value . +.Sh SEE ALSO +.Xr bit_count 3 , +.Xr stdbit 3 , +.Xr stdc_count_zeros 3 , +.Xr stdc_has_single_bit 3 +.Sh STANDARDS +The +.Nm stdc_count_ones_ Ns Em type Ns () +family of functions and the +.Fn stdc_count_ones +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_count_ones_ Ns Em type Ns () +family of functions and the +.Fn stdc_count_ones +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_count_ones.c b/newlib/libc/stdbit/stdc_count_ones.c new file mode 100644 index 000000000..c5198dca8 --- /dev/null +++ b/newlib/libc/stdbit/stdc_count_ones.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_count_ones_uc(unsigned char x) +{ + return (__builtin_popcount(x)); +} + +unsigned int +stdc_count_ones_us(unsigned short x) +{ + return (__builtin_popcount(x)); +} + +unsigned int +stdc_count_ones_ui(unsigned int x) +{ + return (__builtin_popcount(x)); +} + +unsigned int +stdc_count_ones_ul(unsigned long x) +{ + return (__builtin_popcountl(x)); +} + +unsigned int +stdc_count_ones_ull(unsigned long long x) +{ + return (__builtin_popcountll(x)); +} diff --git a/newlib/libc/stdbit/stdc_count_zeros.3 b/newlib/libc/stdbit/stdc_count_zeros.3 new file mode 100644 index 000000000..eef7a9e88 --- /dev/null +++ b/newlib/libc/stdbit/stdc_count_zeros.3 @@ -0,0 +1,84 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_COUNT_ZEROS 3 +.Os +.Sh NAME +.Nm stdc_count_zeros +.Nd count the zeros in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_count_zeros_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_count_zeros_us "unsigned short value" +.Ft unsigned int +.Fn stdc_count_zeros_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_count_zeros_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_count_zeros_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_count_zeros "value" +.Sh DESCRIPTION +The +.Nm stdc_count_zeros_ Ns Em type Ns () +family of functions returns the number of bits set to\~0 in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +This is also known as the +.Dq population count +(popcount) or +.Dq Hamming weight +of the complement of +.Fa value . +The +.Fn stdc_count_zeros "value" +type-generic macro picks the appropriate +.Nm stdc_count_zeros_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the number of bits set to\~0 in +.Fa value . +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_count_ones 3 +.Sh STANDARDS +The +.Nm stdc_count_zeros_ Ns Em type Ns () +family of functions and the +.Fn stdc_count_zeros +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_count_zeros_ Ns Em type Ns () +family of functions and the +.Fn stdc_count_zeros +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_count_zeros.c b/newlib/libc/stdbit/stdc_count_zeros.c new file mode 100644 index 000000000..35db965af --- /dev/null +++ b/newlib/libc/stdbit/stdc_count_zeros.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_count_zeros_uc(unsigned char x) +{ + return (__builtin_popcount(x ^ UCHAR_MAX)); +} + +unsigned int +stdc_count_zeros_us(unsigned short x) +{ + return (__builtin_popcount(x ^ USHRT_MAX)); +} + +unsigned int +stdc_count_zeros_ui(unsigned int x) +{ + return (__builtin_popcount(~x)); +} + +unsigned int +stdc_count_zeros_ul(unsigned long x) +{ + return (__builtin_popcountl(~x)); +} + +unsigned int +stdc_count_zeros_ull(unsigned long long x) +{ + return (__builtin_popcountll(~x)); +} diff --git a/newlib/libc/stdbit/stdc_first_leading_one.3 b/newlib/libc/stdbit/stdc_first_leading_one.3 new file mode 100644 index 000000000..c2dd423bf --- /dev/null +++ b/newlib/libc/stdbit/stdc_first_leading_one.3 @@ -0,0 +1,93 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_FIRST_LEADING_ONE 3 +.Os +.Sh NAME +.Nm stdc_first_leading_one +.Nd find the first leading one in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_first_leading_one_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_first_leading_one_us "unsigned short value" +.Ft unsigned int +.Fn stdc_first_leading_one_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_first_leading_one_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_first_leading_one_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_first_leading_one "value" +.Sh DESCRIPTION +The +.Nm stdc_first_leading_one_ Ns Em type Ns () +family of functions returns the index of the most significant set bit in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_first_leading_one "value" +type-generic macro picks the appropriate +.Nm stdc_first_leading_one_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the index of the most significant set bit in +.Fa value . +The bits are numbered such that the most significant bit has number\~1, +and the least significant bit has number +.Ms w +where +.Ms w +is the number of bits in the type of +.Fa value . +If no bits are set in +.Fa value +(i.\^e.\& +.Fa value +is zero), zero is returned. +.Sh SEE ALSO +.Xr fls 3 , +.Xr stdbit 3 , +.Xr stdc_leading_zeros 3 , +.Xr stdc_first_leading_zero 3 , +.Xr stdc_first_trailing_one 3 +.Sh STANDARDS +The +.Nm stdc_first_leading_one_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_leading_one +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_first_leading_one_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_leading_one +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_first_leading_one.c b/newlib/libc/stdbit/stdc_first_leading_one.c new file mode 100644 index 000000000..de4368565 --- /dev/null +++ b/newlib/libc/stdbit/stdc_first_leading_one.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_first_leading_one_uc(unsigned char x) +{ + const int offset = UINT_WIDTH - UCHAR_WIDTH; + + if (x == 0) + return (0); + + return (__builtin_clz(x << offset) + 1); +} + +unsigned int +stdc_first_leading_one_us(unsigned short x) +{ + const int offset = UINT_WIDTH - USHRT_WIDTH; + + if (x == 0) + return (0); + + return (__builtin_clz(x << offset) + 1); +} + +unsigned int +stdc_first_leading_one_ui(unsigned int x) +{ + if (x == 0) + return (0); + + return (__builtin_clz(x) + 1); +} + +unsigned int +stdc_first_leading_one_ul(unsigned long x) +{ + if (x == 0) + return (0); + + return (__builtin_clzl(x) + 1); +} + +unsigned int +stdc_first_leading_one_ull(unsigned long long x) +{ + if (x == 0) + return (0); + + return (__builtin_clzll(x) + 1); +} diff --git a/newlib/libc/stdbit/stdc_first_leading_zero.3 b/newlib/libc/stdbit/stdc_first_leading_zero.3 new file mode 100644 index 000000000..7c2a8e7f4 --- /dev/null +++ b/newlib/libc/stdbit/stdc_first_leading_zero.3 @@ -0,0 +1,92 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_FIRST_LEADING_ZERO 3 +.Os +.Sh NAME +.Nm stdc_first_leading_zero +.Nd find the first leading zero in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_first_leading_zero_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_first_leading_zero_us "unsigned short value" +.Ft unsigned int +.Fn stdc_first_leading_zero_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_first_leading_zero_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_first_leading_zero_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_first_leading_zero "value" +.Sh DESCRIPTION +The +.Nm stdc_first_leading_zero_ Ns Em type Ns () +family of functions returns the index of the most significant clear bit in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_first_leading_zero "value" +type-generic macro picks the appropriate +.Nm stdc_first_leading_zero_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the index of the most significant clear bit in +.Fa value . +The bits are numbered such that the most significant bit has number\~1, +and the least significant bit has number +.Ms w +where +.Ms w +is the number of bits in the type of +.Fa value . +If no bits are clear in +.Fa value +(i.\^e.\& +.Fa value +is the bitwise complement of zero), zero is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_leading_ones 3 , +.Xr stdc_first_leading_ones 3 , +.Xr stdc_first_trailing_zero 3 +.Sh STANDARDS +The +.Nm stdc_first_leading_zero_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_leading_zero +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_first_leading_zero_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_leading_zero +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_first_leading_zero.c b/newlib/libc/stdbit/stdc_first_leading_zero.c new file mode 100644 index 000000000..e6609b51b --- /dev/null +++ b/newlib/libc/stdbit/stdc_first_leading_zero.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_first_leading_zero_uc(unsigned char x) +{ + const int offset = UINT_WIDTH - UCHAR_WIDTH; + + if (x == UCHAR_MAX) + return (0); + + return (__builtin_clz(~(unsigned int)x << offset) + 1); +} + +unsigned int +stdc_first_leading_zero_us(unsigned short x) +{ + const int offset = UINT_WIDTH - USHRT_WIDTH; + + if (x == USHRT_MAX) + return (0); + + return (__builtin_clz(~(unsigned int)x << offset) + 1); +} + +unsigned int +stdc_first_leading_zero_ui(unsigned int x) +{ + if (x == ~0U) + return (0); + + return (__builtin_clz(~x) + 1); +} + +unsigned int +stdc_first_leading_zero_ul(unsigned long x) +{ + if (x == ~0UL) + return (0); + + return (__builtin_clzl(~x) + 1); +} + +unsigned int +stdc_first_leading_zero_ull(unsigned long long x) +{ + if (x == ~0ULL) + return (0); + + return (__builtin_clzll(~x) + 1); +} diff --git a/newlib/libc/stdbit/stdc_first_trailing_one.3 b/newlib/libc/stdbit/stdc_first_trailing_one.3 new file mode 100644 index 000000000..71d7025ff --- /dev/null +++ b/newlib/libc/stdbit/stdc_first_trailing_one.3 @@ -0,0 +1,110 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_FIRST_TRAILING_ONE 3 +.Os +.Sh NAME +.Nm stdc_first_trailing_one +.Nd find the first trailing one in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_first_trailing_one_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_first_trailing_one_us "unsigned short value" +.Ft unsigned int +.Fn stdc_first_trailing_one_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_first_trailing_one_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_first_trailing_one_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_first_trailing_one "value" +.Sh DESCRIPTION +The +.Nm stdc_first_trailing_one_ Ns Em type Ns () +family of functions returns the index of the least significant set bit in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_first_trailing_one "value" +type-generic macro picks the appropriate +.Nm stdc_first_trailing_one_ Ns Em type Ns () +function based on the type of +.Fa value . +.Pp +Functions +.Fn stdc_first_trailing_one_ui , +.Fn stdc_first_trailing_one_ul , +and +.Fn stdc_first_trailing_one_ull +are identical to +.Bx 4.3 +functions +.Xr ffs 3 , +.Xr ffsl 3 , +and +.Xr ffsll 3 +respectively, except for operating on unsigned instead of signed values. +.Sh RETURN VALUES +Returns the index of the least significant set bit in +.Fa value . +The bits are numbered such that the least significant bit has number\~1, +and the most significant bit has number +.Ms w +where +.Ms w +is the number of bits in the type of +.Fa value . +If no bits are set in +.Fa value +(i.\^e.\& +.Fa value +is zero), one is returned. +.Sh SEE ALSO +.Xr bit_ffs 3 , +.Xr ffs 3 , +.Xr ffsl 3 , +.Xr ffsll 3 , +.Xr stdbit 3 , +.Xr stdc_trailing_zeros 3 , +.Xr stdc_first_trailing_zero 3 , +.Xr stdc_first_leading_one 3 +.Sh STANDARDS +The +.Nm stdc_first_trailing_one_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_trailing_one +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_first_trailing_one_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_trailing_one +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_first_trailing_one.c b/newlib/libc/stdbit/stdc_first_trailing_one.c new file mode 100644 index 000000000..22972758d --- /dev/null +++ b/newlib/libc/stdbit/stdc_first_trailing_one.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +unsigned int +stdc_first_trailing_one_uc(unsigned char x) +{ + if (x == 0) + return (0); + + return (__builtin_ctz(x) + 1); +} + +unsigned int +stdc_first_trailing_one_us(unsigned short x) +{ + if (x == 0) + return (0); + + return (__builtin_ctz(x) + 1); +} + +unsigned int +stdc_first_trailing_one_ui(unsigned int x) +{ + if (x == 0) + return (0); + + return (__builtin_ctz(x) + 1); +} + +unsigned int +stdc_first_trailing_one_ul(unsigned long x) +{ + if (x == 0) + return (0); + + return (__builtin_ctzl(x) + 1); +} + +unsigned int +stdc_first_trailing_one_ull(unsigned long long x) +{ + if (x == 0) + return (0); + + return (__builtin_ctzll(x) + 1); +} diff --git a/newlib/libc/stdbit/stdc_first_trailing_zero.3 b/newlib/libc/stdbit/stdc_first_trailing_zero.3 new file mode 100644 index 000000000..2ee41cb3e --- /dev/null +++ b/newlib/libc/stdbit/stdc_first_trailing_zero.3 @@ -0,0 +1,93 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_FIRST_TRAILING_ZERO 3 +.Os +.Sh NAME +.Nm stdc_first_trailing_zero +.Nd find the first trailing zero in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_first_trailing_zero_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_first_trailing_zero_us "unsigned short value" +.Ft unsigned int +.Fn stdc_first_trailing_zero_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_first_trailing_zero_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_first_trailing_zero_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_first_trailing_zero "value" +.Sh DESCRIPTION +The +.Nm stdc_first_trailing_zero_ Ns Em type Ns () +family of functions returns the index of the least significant clear bit in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_first_trailing_zero "value" +type-generic macro picks the appropriate +.Nm stdc_first_trailing_zero_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the index of the least significant clear bit in +.Fa value . +The bits are numbered such that the least significant bit has number\~1, +and the most significant bit has number +.Ms w +where +.Ms w +is the number of bits in the type of +.Fa value . +If no bits are clear in +.Fa value +(i.\^e.\& +.Fa value +is the bitwise complement of zero), zero is returned. +.Sh SEE ALSO +.Xr bit_ffc 3 , +.Xr stdbit 3 , +.Xr stdc_trailing_ones 3 , +.Xr stdc_first_trailing_ones 3 , +.Xr stdc_first_leading_zero 3 +.Sh STANDARDS +The +.Nm stdc_first_trailing_zero_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_trailing_zero +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_first_trailing_zero_ Ns Em type Ns () +family of functions and the +.Fn stdc_first_trailing_zero +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_first_trailing_zero.c b/newlib/libc/stdbit/stdc_first_trailing_zero.c new file mode 100644 index 000000000..27395c697 --- /dev/null +++ b/newlib/libc/stdbit/stdc_first_trailing_zero.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +unsigned int +stdc_first_trailing_zero_uc(unsigned char x) +{ + if (x == UCHAR_MAX) + return (0); + + return (__builtin_ctz(~x) + 1); +} + +unsigned int +stdc_first_trailing_zero_us(unsigned short x) +{ + if (x == USHRT_MAX) + return (0); + + return (__builtin_ctz(~x) + 1); +} + +unsigned int +stdc_first_trailing_zero_ui(unsigned int x) +{ + if (x == ~0U) + return (0); + + return (__builtin_ctz(~x) + 1); +} + +unsigned int +stdc_first_trailing_zero_ul(unsigned long x) +{ + if (x == ~0UL) + return (0); + + return (__builtin_ctzl(~x) + 1); +} + +unsigned int +stdc_first_trailing_zero_ull(unsigned long long x) +{ + if (x == ~0ULL) + return (0); + + return (__builtin_ctzll(~x) + 1); +} diff --git a/newlib/libc/stdbit/stdc_has_single_bit.3 b/newlib/libc/stdbit/stdc_has_single_bit.3 new file mode 100644 index 000000000..8f82c5522 --- /dev/null +++ b/newlib/libc/stdbit/stdc_has_single_bit.3 @@ -0,0 +1,98 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_HAS_SINGLE_BIT 3 +.Os +.Sh NAME +.Nm stdc_has_single_bit +.Nd check for single bit set +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft bool +.Fn stdc_has_single_bit_uc "unsigned char value" +.Ft bool +.Fn stdc_has_single_bit_us "unsigned short value" +.Ft bool +.Fn stdc_has_single_bit_ui "unsigned int value" +.Ft bool +.Fn stdc_has_single_bit_ul "unsigned long value" +.Ft bool +.Fn stdc_has_single_bit_ull "unsigned long long value" +.Ft bool +.Fn stdc_has_single_bit "value" +.Sh DESCRIPTION +The +.Nm stdc_has_single_bit_ Ns Em type Ns () +family of functions checks if there is exactly one bit +set in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_has_single_bit "value" +type-generic macro picks the appropriate +.Nm stdc_has_single_bit_ Ns Em type Ns () +function based on the type of +.Fa value . +.Pp +The functions in this family behave similarly to the +.Fn powerof2 "value" +macro of +.In sys/param.h , +but differ when +.Fa value +is zero: while +.Fn powerof2 +considers zero to be a power of two, +.Fn stdc_has_single_bit +does not. +.Sh RETURN VALUES +Returns +.Sy true +if exactly one bit is set in +.Fa value , +otherwise returns +.Sy false . +I.\^e. the function determines if +.Fa value +is a power of two. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_count_ones 3 +.Sh STANDARDS +The +.Nm stdc_has_single_bit_ Ns Em type Ns () +family of functions and the +.Fn stdc_has_single_bit +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_has_single_bit_ Ns Em type Ns () +family of functions and the +.Fn stdc_has_single_bit +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_has_single_bit.c b/newlib/libc/stdbit/stdc_has_single_bit.c new file mode 100644 index 000000000..a448464b0 --- /dev/null +++ b/newlib/libc/stdbit/stdc_has_single_bit.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +bool +stdc_has_single_bit_uc(unsigned char x) +{ + return (x != 0 && (x & (x - 1)) == 0); +} + +bool +stdc_has_single_bit_us(unsigned short x) +{ + return (x != 0 && (x & (x - 1)) == 0); +} + +bool +stdc_has_single_bit_ui(unsigned int x) +{ + return (x != 0 && (x & (x - 1)) == 0); +} + +bool +stdc_has_single_bit_ul(unsigned long x) +{ + return (x != 0 && (x & (x - 1)) == 0); +} + +bool +stdc_has_single_bit_ull(unsigned long long x) +{ + return (x != 0 && (x & (x - 1)) == 0); +} diff --git a/newlib/libc/stdbit/stdc_leading_ones.3 b/newlib/libc/stdbit/stdc_leading_ones.3 new file mode 100644 index 000000000..bdcbe95d7 --- /dev/null +++ b/newlib/libc/stdbit/stdc_leading_ones.3 @@ -0,0 +1,86 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_LEADING_ONES 3 +.Os +.Sh NAME +.Nm stdc_leading_ones +.Nd find the number of leading ones in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_leading_ones_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_leading_ones_us "unsigned short value" +.Ft unsigned int +.Fn stdc_leading_ones_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_leading_ones_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_leading_ones_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_leading_ones "value" +.Sh DESCRIPTION +The +.Nm stdc_leading_ones_ Ns Em type Ns () +family of functions returns the number of leading ones in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_leading_ones "value" +type-generic macro picks the appropriate +.Nm stdc_leading_ones_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the number of leading ones in +.Fa value . +If +.Fa value +is all ones, +the total number of bits in the type of +.Fa value +is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_leading_zeros 3 , +.Xr stdc_trailing_ones 3 , +.Xr stdc_first_leading_zero 3 +.Sh STANDARDS +The +.Nm stdc_leading_ones_ Ns Em type Ns () +family of functions and the +.Fn stdc_leading_ones +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_leading_ones_ Ns Em type Ns () +family of functions and the +.Fn stdc_leading_ones +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_leading_ones.c b/newlib/libc/stdbit/stdc_leading_ones.c new file mode 100644 index 000000000..79d3ec7f2 --- /dev/null +++ b/newlib/libc/stdbit/stdc_leading_ones.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +/* Avoid triggering undefined behavior if x == 0. */ +static_assert(UCHAR_WIDTH < UINT_WIDTH, + "stdc_leading_ones_uc needs UCHAR_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_leading_ones_uc(unsigned char x) +{ + const int offset = UINT_WIDTH - UCHAR_WIDTH; + + return (__builtin_clz(~(x << offset))); +} + +/* Avoid triggering undefined behavior if x == 0. */ +static_assert(USHRT_WIDTH < UINT_WIDTH, + "stdc_leading_ones_us needs USHRT_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_leading_ones_us(unsigned short x) +{ + const int offset = UINT_WIDTH - USHRT_WIDTH; + + return (__builtin_clz(~(x << offset))); +} + +unsigned int +stdc_leading_ones_ui(unsigned int x) +{ + if (x == ~0U) + return (UINT_WIDTH); + + return (__builtin_clz(~x)); +} + +unsigned int +stdc_leading_ones_ul(unsigned long x) +{ + if (x == ~0UL) + return (ULONG_WIDTH); + + return (__builtin_clzl(~x)); +} + +unsigned int +stdc_leading_ones_ull(unsigned long long x) +{ + if (x == ~0ULL) + return (ULLONG_WIDTH); + + return (__builtin_clzll(~x)); +} diff --git a/newlib/libc/stdbit/stdc_leading_zeros.3 b/newlib/libc/stdbit/stdc_leading_zeros.3 new file mode 100644 index 000000000..985a6fa58 --- /dev/null +++ b/newlib/libc/stdbit/stdc_leading_zeros.3 @@ -0,0 +1,86 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_LEADING_ZEROS 3 +.Os +.Sh NAME +.Nm stdc_leading_zeros +.Nd find the number of leading zeros in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_leading_zeros_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_leading_zeros_us "unsigned short value" +.Ft unsigned int +.Fn stdc_leading_zeros_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_leading_zeros_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_leading_zeros_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_leading_zeros "value" +.Sh DESCRIPTION +The +.Nm stdc_leading_zeros_ Ns Em type Ns () +family of functions returns the number of leading zeros in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_leading_zeros "value" +type-generic macro picks the appropriate +.Nm stdc_leading_zeros_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the number of leading zeros in +.Fa value . +If +.Fa value +is all zeros, +the total number of bits in the type of +.Fa value +is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_leading_ones 3 , +.Xr stdc_trailing_zeros 3 , +.Xr stdc_first_leading_one 3 +.Sh STANDARDS +The +.Nm stdc_leading_zeros_ Ns Em type Ns () +family of functions and the +.Fn stdc_leading_zeros +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_leading_zeros_ Ns Em type Ns () +family of functions and the +.Fn stdc_leading_zeros +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_leading_zeros.c b/newlib/libc/stdbit/stdc_leading_zeros.c new file mode 100644 index 000000000..2fdf64ec9 --- /dev/null +++ b/newlib/libc/stdbit/stdc_leading_zeros.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +/* Offset must be greater than zero. */ +static_assert(UCHAR_WIDTH < UINT_WIDTH, + "stdc_leading_zeros_uc needs UCHAR_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_leading_zeros_uc(unsigned char x) +{ + const int offset = UINT_WIDTH - UCHAR_WIDTH; + + return (__builtin_clz((x << offset) + (1U << (offset - 1)))); +} + +/* Offset must be greater than zero. */ +static_assert(USHRT_WIDTH < UINT_WIDTH, + "stdc_leading_zeros_us needs USHRT_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_leading_zeros_us(unsigned short x) +{ + const int offset = UINT_WIDTH - USHRT_WIDTH; + + return (__builtin_clz((x << offset) + (1U << (offset - 1)))); +} + +unsigned int +stdc_leading_zeros_ui(unsigned int x) +{ + if (x == 0) + return (UINT_WIDTH); + + return (__builtin_clz(x)); +} + +unsigned int +stdc_leading_zeros_ul(unsigned long x) +{ + if (x == 0) + return (ULONG_WIDTH); + + return (__builtin_clzl(x)); +} + +unsigned int +stdc_leading_zeros_ull(unsigned long long x) +{ + if (x == 0) + return (ULLONG_WIDTH); + + return (__builtin_clzll(x)); +} diff --git a/newlib/libc/stdbit/stdc_trailing_ones.3 b/newlib/libc/stdbit/stdc_trailing_ones.3 new file mode 100644 index 000000000..0548a7564 --- /dev/null +++ b/newlib/libc/stdbit/stdc_trailing_ones.3 @@ -0,0 +1,86 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_TRAILING_ONES 3 +.Os +.Sh NAME +.Nm stdc_trailing_ones +.Nd find the number of trailing ones in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_trailing_ones_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_trailing_ones_us "unsigned short value" +.Ft unsigned int +.Fn stdc_trailing_ones_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_trailing_ones_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_trailing_ones_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_trailing_ones "value" +.Sh DESCRIPTION +The +.Nm stdc_trailing_ones_ Ns Em type Ns () +family of functions returns the number of trailing ones in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_trailing_ones "value" +type-generic macro picks the appropriate +.Nm stdc_trailing_ones_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the number of trailing ones in +.Fa value . +If +.Fa value +is all ones, +the total number of bits in the type of +.Fa value +is returned. +.Sh SEE ALSO +.Xr stdbit 3 , +.Xr stdc_leading_ones 3 , +.Xr stdc_trailing_zeros 3 , +.Xr stdc_first_trailing_zero 3 +.Sh STANDARDS +The +.Nm stdc_trailing_ones_ Ns Em type Ns () +family of functions and the +.Fn stdc_trailing_ones +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_trailing_ones_ Ns Em type Ns () +family of functions and the +.Fn stdc_trailing_ones +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_trailing_ones.c b/newlib/libc/stdbit/stdc_trailing_ones.c new file mode 100644 index 000000000..c1a0e6b99 --- /dev/null +++ b/newlib/libc/stdbit/stdc_trailing_ones.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +/* Avoid triggering undefined behavior if x == ~0. */ +static_assert(UCHAR_WIDTH < UINT_WIDTH, + "stdc_trailing_ones_uc needs UCHAR_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_trailing_ones_uc(unsigned char x) +{ + return (__builtin_ctz(~x)); +} + +/* Avoid triggering undefined behavior if x == ~0. */ +static_assert(USHRT_WIDTH < UINT_WIDTH, + "stdc_trailing_ones_uc needs USHRT_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_trailing_ones_us(unsigned short x) +{ + return (__builtin_ctz(~x)); +} + +unsigned int +stdc_trailing_ones_ui(unsigned int x) +{ + if (x == ~0U) + return (UINT_WIDTH); + + return (__builtin_ctz(~x)); +} + +unsigned int +stdc_trailing_ones_ul(unsigned long x) +{ + if (x == ~0UL) + return (ULONG_WIDTH); + + return (__builtin_ctzl(~x)); +} + +unsigned int +stdc_trailing_ones_ull(unsigned long long x) +{ + if (x == ~0ULL) + return (ULLONG_WIDTH); + + return (__builtin_ctzll(~x)); +} diff --git a/newlib/libc/stdbit/stdc_trailing_zeros.3 b/newlib/libc/stdbit/stdc_trailing_zeros.3 new file mode 100644 index 000000000..833a164d4 --- /dev/null +++ b/newlib/libc/stdbit/stdc_trailing_zeros.3 @@ -0,0 +1,87 @@ +.\" +.\" Copyright (c) 2025 Robert Clausecker +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd November 9, 2025 +.Dt STDC_TRAILING_ZEROS 3 +.Os +.Sh NAME +.Nm stdc_trailing_zeros +.Nd find the number of trailing zeros in an integer +.Sh SYNOPSIS +.Lb libc +.In stdbit.h +.Ft unsigned int +.Fn stdc_trailing_zeros_uc "unsigned char value" +.Ft unsigned int +.Fn stdc_trailing_zeros_us "unsigned short value" +.Ft unsigned int +.Fn stdc_trailing_zeros_ui "unsigned int value" +.Ft unsigned int +.Fn stdc_trailing_zeros_ul "unsigned long value" +.Ft unsigned int +.Fn stdc_trailing_zeros_ull "unsigned long long value" +.Ft unsigned int +.Fn stdc_trailing_zeros "value" +.Sh DESCRIPTION +The +.Nm stdc_trailing_zeros_ Ns Em type Ns () +family of functions returns the number of trailing zeros in +.Fa value , +where +.Fa value +is of type +.Va unsigned char , +.Va unsigned short , +.Va unsigned int , +.Va unsigned long , +or +.Va unsigned long long +for +.Em type +being +.Sy uc , +.Sy us , +.Sy ui , +.Sy ul , +or +.Sy ull +respectively. +The +.Fn stdc_trailing_zeros "value" +type-generic macro picks the appropriate +.Nm stdc_trailing_zeros_ Ns Em type Ns () +function based on the type of +.Fa value . +.Sh RETURN VALUES +Returns the number of trailing zeros in +.Fa value . +If +.Fa value +is all zeros, +the total number of bits in the type of +.Fa value +is returned. +.Sh SEE ALSO +.Xr ffs 3 , +.Xr stdbit 3 , +.Xr stdc_leading_zeros 3 , +.Xr stdc_trailing_ones 3 , +.Xr stdc_first_trailing_one 3 +.Sh STANDARDS +The +.Nm stdc_trailing_zeros_ Ns Em type Ns () +family of functions and the +.Fn stdc_trailing_zeros +type-generic macro conform to +.St -isoC-2023 . +.Sh HISTORY +The +.Nm stdc_trailing_zeros_ Ns Em type Ns () +family of functions and the +.Fn stdc_trailing_zeros +type-generic macro were added in +.Fx 15.1. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org diff --git a/newlib/libc/stdbit/stdc_trailing_zeros.c b/newlib/libc/stdbit/stdc_trailing_zeros.c new file mode 100644 index 000000000..6213f62cf --- /dev/null +++ b/newlib/libc/stdbit/stdc_trailing_zeros.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025 Robert Clausecker + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +/* Ensure we do not shift 1U out of range. */ +static_assert(UCHAR_WIDTH < UINT_WIDTH, + "stdc_trailing_zeros_uc needs UCHAR_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_trailing_zeros_uc(unsigned char x) +{ + return (__builtin_ctz(x | 1U << UCHAR_WIDTH)); +} + +/* Ensure we do not shift 1U out of range. */ +static_assert(USHRT_WIDTH < UINT_WIDTH, + "stdc_trailing_zeros_uc needs USHRT_WIDTH < UINT_WIDTH"); + +unsigned int +stdc_trailing_zeros_us(unsigned short x) +{ + return (__builtin_ctz(x | 1U << USHRT_WIDTH)); +} + +unsigned int +stdc_trailing_zeros_ui(unsigned int x) +{ + if (x == 0U) + return (UINT_WIDTH); + + return (__builtin_ctz(x)); +} + +unsigned int +stdc_trailing_zeros_ul(unsigned long x) +{ + if (x == 0UL) + return (ULONG_WIDTH); + + return (__builtin_ctzl(x)); +} + +unsigned int +stdc_trailing_zeros_ull(unsigned long long x) +{ + if (x == 0ULL) + return (ULLONG_WIDTH); + + return (__builtin_ctzll(x)); +} From patchwork Thu Apr 16 21:00:43 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 133219 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 5C7504AA51E6 for ; Thu, 16 Apr 2026 21:01:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C7504AA51E6 X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by sourceware.org (Postfix) with ESMTPS id 3086C4C900E3 for ; Thu, 16 Apr 2026 21:01:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3086C4C900E3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3086C4C900E3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.179 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373286; cv=none; b=kaCbhlES9xp90y9z+t5Aushi1IdZfiNDgg7rNSW+Q37prH63UTYhNa1cv0oAiFRTjvkbIOS9rZYVwii3U+oFKdFd4KoaVpaq3u5dsL6cIev8vaZUlx8N8KWH+idM0c1JfQqgYeDqmXo/ImNbuKm8ebvHCWIgY8sbJl/G1J9QnXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373286; c=relaxed/simple; bh=PaUkItJ5qtKk+vgDsgqgTcw2aLQdsPt/an6GbLXuSJA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=xILFnnXK1Mx9q9bOwR+bwq2n1D5IfDdoV71efrGo13pDW1RW9OseLJXD4gCANCoSFZCn2gYs4F9nB0c1Qg99Y0LxnMhAhEacZQOtM8JynJGtbpBzQK4D/kaQ21P+kKj0TsNn+ni7rZmcwEddIORF/POgYNPHdH+6HRN6+p6Tnc4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3086C4C900E3 Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-79ab5fd969aso95932497b3.0 for ; Thu, 16 Apr 2026 14:01:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776373284; x=1776978084; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=D+0I309zdfZiNLY19Lq7ipNBQNXtyVjdI2dhCa8wbZg=; b=SX7QDM+Kk07+dx5YKk0iZF3smTFad1ez0C4+r3TSWq+14tZCOWlNqk9LPt57cRdiq0 yN6at265IOSubxzx79/9zN87X8Iw0KHtlZknM1/odvaIAqubqDOKZrzUSjR12RC+Zgtt QThZw4lcEEk9uGqqVBd0M8UVOcbzQ289hwxAwyuq3ac6f8SNHryX0Ya5T6lBkuMmnW0Z qmXigPzRbd6Ap00eLEOOQ8h5vavaI6r5sCWCXXInik8ItOWvMTDk/AAvrn21Guy9G/Pg CQFV6YsNasdKU5CypnnVCGlwrPscdJBVfVQiNmX7VXferrGDSMNqPOEvFIl+pUaupTJK i0Sw== X-Gm-Message-State: AOJu0Yyg2Pfd/uhoA2C2ik86JXljvYvO3ms/yg9wpu4AQFROuZ4I/nyS 2b2Dw0bp0SZurSWLr5rYOGSODBQjoefsqIHU6SDOHuvuFc0I6vbtinZDfXgng3tk X-Gm-Gg: AeBDievqf9SnWUMUCzDk/TyDVVbGDTRI71tm0pAPbwH86DoF3PBPeJ28KJkYdKO85/T 0i+j4ywr6C7fmzjs3Y2xydMMVdVsSmSMf2Kb2A7n5JKSHQTphPoVv7fmwGeIo683dO/nLmfMFMz m135pFzoluvqsia89GR39OKqqWY5rvoXiJFytclfBxluwmrqi4REZoqDcr3VCSHkLkYLah9Thxm wf0nCdGwkwPRGsTcG3i0DoxKbdmEy2x03rOrb88k0gb2aEyGQTJQ9lUHvpti9sTF4JkPfXXb4Ax cRZ+Q1uIEUNdk2iZOucSbsxAoGqK/ddKqWvRRBoN0La2If123JWy509NP+keOHbqu56EKwIuL2o m9ZnB0vB0u7Ay6ZKlgv/Ct/4U4DEnBGNjGRyuQU+fKRj5l/SyzxV2gHAVH8LuMKnIU9oEioGNNN EbqGW9n6/fD2TVEvSGSkYK1wv/JwBjySMaASZJAJvxe6VOnGnMQdE5a4kgSqLs0pETbDpppz/A X-Received: by 2002:a05:690c:8e10:b0:7b3:8a18:ba89 with SMTP id 00721157ae682-7b9ed00ba9fmr1066797b3.42.1776373283648; Thu, 16 Apr 2026 14:01:23 -0700 (PDT) Received: from gitlab.oarcorp.com (d27-96-189-151.evv.wideopenwest.com. [96.27.151.189]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7b76931854esm28916287b3.37.2026.04.16.14.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2026 14:01:22 -0700 (PDT) From: Joel Sherrill To: newlib@sourceware.org Cc: Joel Sherrill Subject: [PATCH v3 2/6] Makefile.inc, stdbit/Makefile.inc: Add stdbit Date: Thu, 16 Apr 2026 16:00:43 -0500 Message-ID: <20260416210047.2198615-3-joel@rtems.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260416210047.2198615-1-joel@rtems.org> References: <20260416210047.2198615-1-joel@rtems.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3036.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org --- newlib/libc/Makefile.inc | 1 + newlib/libc/stdbit/Makefile.inc | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 newlib/libc/stdbit/Makefile.inc diff --git a/newlib/libc/Makefile.inc b/newlib/libc/Makefile.inc index d07eed764..39e98338d 100644 --- a/newlib/libc/Makefile.inc +++ b/newlib/libc/Makefile.inc @@ -56,6 +56,7 @@ include %D%/misc/Makefile.inc include %D%/unix/Makefile.inc include %D%/posix/Makefile.inc include %D%/syscalls/Makefile.inc +include %D%/stdbit/Makefile.inc include %D%/iconv/Makefile.inc include %D%/xdr/Makefile.inc include %D%/ssp/Makefile.inc diff --git a/newlib/libc/stdbit/Makefile.inc b/newlib/libc/stdbit/Makefile.inc new file mode 100644 index 000000000..d70675718 --- /dev/null +++ b/newlib/libc/stdbit/Makefile.inc @@ -0,0 +1,15 @@ +libc_a_SOURCES += \ + %D%/stdc_bit_ceil.c \ + %D%/stdc_bit_floor.c \ + %D%/stdc_bit_width.c \ + %D%/stdc_count_ones.c \ + %D%/stdc_count_zeros.c \ + %D%/stdc_first_leading_one.c \ + %D%/stdc_first_leading_zero.c \ + %D%/stdc_first_trailing_one.c \ + %D%/stdc_first_trailing_zero.c \ + %D%/stdc_has_single_bit.c \ + %D%/stdc_leading_ones.c \ + %D%/stdc_leading_zeros.c \ + %D%/stdc_trailing_ones.c \ + %D%/stdc_trailing_zeros.c From patchwork Thu Apr 16 21:00:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 133221 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id ECE464C9175D for ; Thu, 16 Apr 2026 21:02:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECE464C9175D X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) by sourceware.org (Postfix) with ESMTPS id 503AA4C9176E for ; Thu, 16 Apr 2026 21:01:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 503AA4C9176E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 503AA4C9176E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.181 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373290; cv=none; b=UdOs0S/Sbs+MyVPcjziEEM6vHDTjvrnKT1NxbQzCipKD6P4T0eILfYEYCyPOrCn4wON1tWxlEe7+0v5yDRzxZfMt+d4YIh2xVDn04NehnpwQlrBVclC5krn2i/z/RbBUmtr7AOjyCGaUZe5qNmjLuW6MAI4zuN75L/hBczCFLYc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373290; c=relaxed/simple; bh=YUDCMzD7eynKpIjk8+vHkUNxcehddetw8ybbTxZOd94=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=QYPyZflInjqX7epRpjfbTP4esXp0TLz9yi040fcZOfTcPnWnNUlOBT8v7BjfN54S44ISdmyFkgHzDVp4C8lkD3bxj2WBZ1y/ybEQ4HP/Q1K5aVoFL+7e8UGkPuYKFGTZBiTpibwO2xKqwobywo8ETT+4ohdf3dTZ+D9oLmcqB8c= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 503AA4C9176E Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-79cd8f8e261so57204467b3.3 for ; Thu, 16 Apr 2026 14:01:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776373288; x=1776978088; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=W/TcsIV0Prvl2ZU1WF3g/brKMN3BYZ9heMb9PEqKaw8=; b=Xsx8T7fkeiYo3nf0DS30rYavfCdoNVVi/poKab1hEtbEO5SZ25ajYKJKWlNbearAH3 k7Dp8DNw45EeqXoCPfsZRcDOvuMi53J8AAMfjSPqQ0PfAtrvMSo31nb08cXAYBgy6HX2 LjVtMlQ6Vwz7TFXjnP3eNBvlDHeYZP2cq8s0TAUxFoHFebGqNWRqyRMTTwQcGFpeeG8q OIedRMFadKx/sewh6b7F0NSSdFg6Yd+ksmOzVMNXcaWp7d5m43QXUQe5tSZenaRxn+L+ tesHYK+POg2GHT5P8SXc3TdkiHHnQPiJ0ajBL4uw4v8Qelw7MxgMRsiid4OiF6CkzCq7 BQQg== X-Gm-Message-State: AOJu0YwvsGW8+jRaoTttJLJus2ARS+6tY1ZH9AwNnEuPcyhiXXT+13k+ 7cRu6zrcGjS7kXbcxxN17BRkzOSyaM9hktEleAYZI6tNhf4uockSNRAiY76CSMPu X-Gm-Gg: AeBDiev4MSaESkF1YP8Nh4ikm+SV0ZEqLMox35ToUAJ8eY22yq12Nf0szPsBmDONrEM 5hIhX/RsNo3dSFAluFsY+LruifXR1iBwF6T4NBTiE2FGEeCZ0aO/cFXYoUoqn6k7nFJNchzgFCH 7ZziHO+6bvFQVRsnviDldhP7bTyO/BWDmmbkUvljc0H8ycQIPnem14y9hzH7eNgZ93e0u0poEfO aVhig0GL+jisggFYR+n1HGJoPsgMXKGPjHYCWuttht7D5zvyeit/lePIIAklCXZuRytSdqTTWEP BTpAgphUjRwI/+my4Iz4Hmj9uDGFzV9KFqRxIEQwdnrLiRcF/UwYs9lG7zv5/sn0DjgEAoO+AnC K0CEuhPtpl9mXc3zyfH2TT6yk0QTK2Si6/AG5/8juBLV5zRXaRSdV2jajPRA53l1KdbPFWE1Yhg M2EML7AfNOG7D0S5rT0e7ZWuaheyewTnmAKfdYAONQVor+Ncz2DKeQKzKnK0JBjQknRjiF7L5F X-Received: by 2002:a05:690c:e3ee:b0:79a:b9cc:2100 with SMTP id 00721157ae682-7b9ecffc3d4mr1323667b3.35.1776373286752; Thu, 16 Apr 2026 14:01:26 -0700 (PDT) Received: from gitlab.oarcorp.com (d27-96-189-151.evv.wideopenwest.com. [96.27.151.189]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7b76931854esm28916287b3.37.2026.04.16.14.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2026 14:01:24 -0700 (PDT) From: Joel Sherrill To: newlib@sourceware.org Cc: Joel Sherrill Subject: [PATCH v3 3/6] newlib/Makefile.in: Regenerated Date: Thu, 16 Apr 2026 16:00:44 -0500 Message-ID: <20260416210047.2198615-4-joel@rtems.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260416210047.2198615-1-joel@rtems.org> References: <20260416210047.2198615-1-joel@rtems.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3036.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TVD_SPACE_RATIO, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org --- newlib/Makefile.in | 423 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 354 insertions(+), 69 deletions(-) diff --git a/newlib/Makefile.in b/newlib/Makefile.in index 85cd06f1b..47902dfe5 100644 --- a/newlib/Makefile.in +++ b/newlib/Makefile.in @@ -2646,38 +2646,52 @@ am_libc_a_OBJECTS = $(am__objects_1) \ $(am__objects_31) $(am__objects_33) $(am__objects_34) \ $(am__objects_36) $(am__objects_37) $(am__objects_24) \ $(am__objects_39) $(am__objects_41) $(am__objects_43) \ - $(am__objects_44) $(am__objects_45) $(am__objects_46) \ - $(am__objects_49) $(am__objects_52) $(am__objects_53) \ - $(am__objects_54) $(am__objects_55) $(am__objects_56) \ - $(am__objects_57) $(am__objects_58) $(am__objects_59) \ - $(am__objects_60) $(am__objects_61) $(am__objects_62) \ - $(am__objects_63) $(am__objects_64) $(am__objects_65) \ - $(am__objects_66) $(am__objects_67) $(am__objects_68) \ - $(am__objects_69) $(am__objects_70) $(am__objects_71) \ - $(am__objects_72) $(am__objects_73) $(am__objects_74) \ - $(am__objects_75) $(am__objects_76) $(am__objects_77) \ - $(am__objects_78) $(am__objects_79) $(am__objects_80) \ - $(am__objects_81) $(am__objects_82) $(am__objects_83) \ - $(am__objects_84) $(am__objects_85) $(am__objects_86) \ - $(am__objects_87) $(am__objects_88) $(am__objects_89) \ - $(am__objects_90) $(am__objects_91) $(am__objects_92) \ - $(am__objects_93) $(am__objects_94) $(am__objects_95) \ - $(am__objects_96) $(am__objects_97) $(am__objects_98) \ - $(am__objects_99) $(am__objects_100) $(am__objects_101) \ - $(am__objects_102) $(am__objects_103) $(am__objects_104) \ - $(am__objects_105) $(am__objects_106) $(am__objects_107) \ - $(am__objects_108) $(am__objects_109) $(am__objects_110) \ - $(am__objects_111) $(am__objects_112) $(am__objects_113) \ - $(am__objects_114) $(am__objects_115) $(am__objects_116) \ - $(am__objects_117) $(am__objects_118) $(am__objects_119) \ - $(am__objects_120) $(am__objects_121) $(am__objects_122) \ - $(am__objects_123) $(am__objects_124) $(am__objects_125) \ - $(am__objects_126) $(am__objects_127) $(am__objects_128) \ - $(am__objects_129) $(am__objects_130) $(am__objects_131) \ - $(am__objects_132) $(am__objects_133) $(am__objects_134) \ - $(am__objects_135) $(am__objects_136) $(am__objects_137) \ - $(am__objects_138) $(am__objects_139) $(am__objects_140) \ - $(am__objects_141) $(am__objects_142) + $(am__objects_44) $(am__objects_45) \ + libc/stdbit/libc_a-stdc_bit_ceil.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_bit_floor.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_bit_width.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_count_ones.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_count_zeros.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_first_leading_one.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_first_leading_zero.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_first_trailing_one.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_first_trailing_zero.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_has_single_bit.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_leading_ones.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_leading_zeros.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_trailing_ones.$(OBJEXT) \ + libc/stdbit/libc_a-stdc_trailing_zeros.$(OBJEXT) \ + $(am__objects_46) $(am__objects_49) $(am__objects_52) \ + $(am__objects_53) $(am__objects_54) $(am__objects_55) \ + $(am__objects_56) $(am__objects_57) $(am__objects_58) \ + $(am__objects_59) $(am__objects_60) $(am__objects_61) \ + $(am__objects_62) $(am__objects_63) $(am__objects_64) \ + $(am__objects_65) $(am__objects_66) $(am__objects_67) \ + $(am__objects_68) $(am__objects_69) $(am__objects_70) \ + $(am__objects_71) $(am__objects_72) $(am__objects_73) \ + $(am__objects_74) $(am__objects_75) $(am__objects_76) \ + $(am__objects_77) $(am__objects_78) $(am__objects_79) \ + $(am__objects_80) $(am__objects_81) $(am__objects_82) \ + $(am__objects_83) $(am__objects_84) $(am__objects_85) \ + $(am__objects_86) $(am__objects_87) $(am__objects_88) \ + $(am__objects_89) $(am__objects_90) $(am__objects_91) \ + $(am__objects_92) $(am__objects_93) $(am__objects_94) \ + $(am__objects_95) $(am__objects_96) $(am__objects_97) \ + $(am__objects_98) $(am__objects_99) $(am__objects_100) \ + $(am__objects_101) $(am__objects_102) $(am__objects_103) \ + $(am__objects_104) $(am__objects_105) $(am__objects_106) \ + $(am__objects_107) $(am__objects_108) $(am__objects_109) \ + $(am__objects_110) $(am__objects_111) $(am__objects_112) \ + $(am__objects_113) $(am__objects_114) $(am__objects_115) \ + $(am__objects_116) $(am__objects_117) $(am__objects_118) \ + $(am__objects_119) $(am__objects_120) $(am__objects_121) \ + $(am__objects_122) $(am__objects_123) $(am__objects_124) \ + $(am__objects_125) $(am__objects_126) $(am__objects_127) \ + $(am__objects_128) $(am__objects_129) $(am__objects_130) \ + $(am__objects_131) $(am__objects_132) $(am__objects_133) \ + $(am__objects_134) $(am__objects_135) $(am__objects_136) \ + $(am__objects_137) $(am__objects_138) $(am__objects_139) \ + $(am__objects_140) $(am__objects_141) $(am__objects_142) libc_a_OBJECTS = $(am_libc_a_OBJECTS) libc_machine_cris_libic_a_AR = $(AR) $(ARFLAGS) @HAVE_LIBC_MACHINE_CRIS_TRUE@libc_machine_cris_libic_a_DEPENDENCIES = libc/machine/cris/libc_a-setjmp.o \ @@ -4015,7 +4029,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ shared_machine_dir = @shared_machine_dir@ sharedstatedir = @sharedstatedir@ @@ -4257,38 +4270,49 @@ libc_a_SOURCES = $(am__append_5) libc/stdlib/__adjust.c \ $(am__append_26) $(am__append_27) $(am__append_28) \ $(am__append_29) $(am__append_30) $(am__append_31) \ $(am__append_32) $(am__append_33) $(am__append_34) \ - $(am__append_35) $(am__append_36) $(am__append_38) \ - $(am__append_41) $(am__append_42) $(am__append_43) \ - $(am__append_44) $(am__append_45) $(am__append_46) \ - $(am__append_47) $(am__append_48) $(am__append_49) \ - $(am__append_50) $(am__append_51) $(am__append_52) \ - $(am__append_53) $(am__append_54) $(am__append_55) \ - $(am__append_56) $(am__append_57) $(am__append_58) \ - $(am__append_59) $(am__append_60) $(am__append_61) \ - $(am__append_62) $(am__append_63) $(am__append_64) \ - $(am__append_65) $(am__append_66) $(am__append_67) \ - $(am__append_68) $(am__append_69) $(am__append_70) \ - $(am__append_71) $(am__append_72) $(am__append_74) \ - $(am__append_75) $(am__append_76) $(am__append_77) \ - $(am__append_78) $(am__append_79) $(am__append_80) \ - $(am__append_81) $(am__append_82) $(am__append_83) \ - $(am__append_84) $(am__append_85) $(am__append_86) \ - $(am__append_87) $(am__append_88) $(am__append_89) \ - $(am__append_90) $(am__append_91) $(am__append_92) \ - $(am__append_93) $(am__append_94) $(am__append_95) \ - $(am__append_96) $(am__append_97) $(am__append_98) \ - $(am__append_99) $(am__append_100) $(am__append_101) \ - $(am__append_102) $(am__append_103) $(am__append_104) \ - $(am__append_105) $(am__append_106) $(am__append_107) \ - $(am__append_108) $(am__append_109) $(am__append_110) \ - $(am__append_111) $(am__append_112) $(am__append_113) \ - $(am__append_114) $(am__append_115) $(am__append_116) \ - $(am__append_117) $(am__append_118) $(am__append_119) \ - $(am__append_120) $(am__append_121) $(am__append_122) \ - $(am__append_123) $(am__append_124) $(am__append_125) \ - $(am__append_126) $(am__append_127) $(am__append_128) \ - $(am__append_129) $(am__append_130) $(am__append_131) \ - $(am__append_132) + $(am__append_35) libc/stdbit/stdc_bit_ceil.c \ + libc/stdbit/stdc_bit_floor.c libc/stdbit/stdc_bit_width.c \ + libc/stdbit/stdc_count_ones.c libc/stdbit/stdc_count_zeros.c \ + libc/stdbit/stdc_first_leading_one.c \ + libc/stdbit/stdc_first_leading_zero.c \ + libc/stdbit/stdc_first_trailing_one.c \ + libc/stdbit/stdc_first_trailing_zero.c \ + libc/stdbit/stdc_has_single_bit.c \ + libc/stdbit/stdc_leading_ones.c \ + libc/stdbit/stdc_leading_zeros.c \ + libc/stdbit/stdc_trailing_ones.c \ + libc/stdbit/stdc_trailing_zeros.c $(am__append_36) \ + $(am__append_38) $(am__append_41) $(am__append_42) \ + $(am__append_43) $(am__append_44) $(am__append_45) \ + $(am__append_46) $(am__append_47) $(am__append_48) \ + $(am__append_49) $(am__append_50) $(am__append_51) \ + $(am__append_52) $(am__append_53) $(am__append_54) \ + $(am__append_55) $(am__append_56) $(am__append_57) \ + $(am__append_58) $(am__append_59) $(am__append_60) \ + $(am__append_61) $(am__append_62) $(am__append_63) \ + $(am__append_64) $(am__append_65) $(am__append_66) \ + $(am__append_67) $(am__append_68) $(am__append_69) \ + $(am__append_70) $(am__append_71) $(am__append_72) \ + $(am__append_74) $(am__append_75) $(am__append_76) \ + $(am__append_77) $(am__append_78) $(am__append_79) \ + $(am__append_80) $(am__append_81) $(am__append_82) \ + $(am__append_83) $(am__append_84) $(am__append_85) \ + $(am__append_86) $(am__append_87) $(am__append_88) \ + $(am__append_89) $(am__append_90) $(am__append_91) \ + $(am__append_92) $(am__append_93) $(am__append_94) \ + $(am__append_95) $(am__append_96) $(am__append_97) \ + $(am__append_98) $(am__append_99) $(am__append_100) \ + $(am__append_101) $(am__append_102) $(am__append_103) \ + $(am__append_104) $(am__append_105) $(am__append_106) \ + $(am__append_107) $(am__append_108) $(am__append_109) \ + $(am__append_110) $(am__append_111) $(am__append_112) \ + $(am__append_113) $(am__append_114) $(am__append_115) \ + $(am__append_116) $(am__append_117) $(am__append_118) \ + $(am__append_119) $(am__append_120) $(am__append_121) \ + $(am__append_122) $(am__append_123) $(am__append_124) \ + $(am__append_125) $(am__append_126) $(am__append_127) \ + $(am__append_128) $(am__append_129) $(am__append_130) \ + $(am__append_131) $(am__append_132) libc_a_CFLAGS = $(AM_CFLAGS) $(libc_a_CFLAGS_$(subst /,_,$(@D))) $(libc_a_CFLAGS_$(subst /,_,$(@D)_$( libc/stdbit/$(am__dirstamp) +libc/stdbit/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libc/stdbit/$(DEPDIR) + @: > libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_bit_ceil.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_bit_floor.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_bit_width.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_count_ones.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_count_zeros.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_first_leading_one.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_first_leading_zero.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_first_trailing_one.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_first_trailing_zero.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_has_single_bit.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_leading_ones.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_leading_zeros.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_trailing_ones.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) +libc/stdbit/libc_a-stdc_trailing_zeros.$(OBJEXT): \ + libc/stdbit/$(am__dirstamp) \ + libc/stdbit/$(DEPDIR)/$(am__dirstamp) libc/iconv/ces/$(am__dirstamp): @$(MKDIR_P) libc/iconv/ces @: > libc/iconv/ces/$(am__dirstamp) @@ -12675,6 +12747,7 @@ mostlyclean-compile: -rm -f libc/search/*.$(OBJEXT) -rm -f libc/signal/*.$(OBJEXT) -rm -f libc/ssp/*.$(OBJEXT) + -rm -f libc/stdbit/*.$(OBJEXT) -rm -f libc/stdio/*.$(OBJEXT) -rm -f libc/stdio64/*.$(OBJEXT) -rm -f libc/stdlib/*.$(OBJEXT) @@ -13476,6 +13549,20 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libc/ssp/$(DEPDIR)/libc_a-strncpy_chk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/ssp/$(DEPDIR)/libc_a-vsnprintf_chk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/ssp/$(DEPDIR)/libc_a-vsprintf_chk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_ceil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_floor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_width.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_count_ones.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_count_zeros.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_one.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_zero.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_one.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_zero.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_has_single_bit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_ones.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_zeros.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_ones.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_zeros.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/stdio/$(DEPDIR)/libc_a-asiprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/stdio/$(DEPDIR)/libc_a-asniprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/stdio/$(DEPDIR)/libc_a-asnprintf.Po@am__quote@ @@ -29749,6 +29836,202 @@ libc/syscalls/libc_a-syswait.obj: libc/syscalls/syswait.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/syscalls/libc_a-syswait.obj `if test -f 'libc/syscalls/syswait.c'; then $(CYGPATH_W) 'libc/syscalls/syswait.c'; else $(CYGPATH_W) '$(srcdir)/libc/syscalls/syswait.c'; fi` +libc/stdbit/libc_a-stdc_bit_ceil.o: libc/stdbit/stdc_bit_ceil.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_bit_ceil.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_ceil.Tpo -c -o libc/stdbit/libc_a-stdc_bit_ceil.o `test -f 'libc/stdbit/stdc_bit_ceil.c' || echo '$(srcdir)/'`libc/stdbit/stdc_bit_ceil.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_ceil.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_ceil.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_bit_ceil.c' object='libc/stdbit/libc_a-stdc_bit_ceil.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_bit_ceil.o `test -f 'libc/stdbit/stdc_bit_ceil.c' || echo '$(srcdir)/'`libc/stdbit/stdc_bit_ceil.c + +libc/stdbit/libc_a-stdc_bit_ceil.obj: libc/stdbit/stdc_bit_ceil.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_bit_ceil.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_ceil.Tpo -c -o libc/stdbit/libc_a-stdc_bit_ceil.obj `if test -f 'libc/stdbit/stdc_bit_ceil.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_bit_ceil.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_bit_ceil.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_ceil.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_ceil.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_bit_ceil.c' object='libc/stdbit/libc_a-stdc_bit_ceil.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_bit_ceil.obj `if test -f 'libc/stdbit/stdc_bit_ceil.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_bit_ceil.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_bit_ceil.c'; fi` + +libc/stdbit/libc_a-stdc_bit_floor.o: libc/stdbit/stdc_bit_floor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_bit_floor.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_floor.Tpo -c -o libc/stdbit/libc_a-stdc_bit_floor.o `test -f 'libc/stdbit/stdc_bit_floor.c' || echo '$(srcdir)/'`libc/stdbit/stdc_bit_floor.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_floor.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_floor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_bit_floor.c' object='libc/stdbit/libc_a-stdc_bit_floor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_bit_floor.o `test -f 'libc/stdbit/stdc_bit_floor.c' || echo '$(srcdir)/'`libc/stdbit/stdc_bit_floor.c + +libc/stdbit/libc_a-stdc_bit_floor.obj: libc/stdbit/stdc_bit_floor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_bit_floor.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_floor.Tpo -c -o libc/stdbit/libc_a-stdc_bit_floor.obj `if test -f 'libc/stdbit/stdc_bit_floor.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_bit_floor.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_bit_floor.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_floor.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_floor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_bit_floor.c' object='libc/stdbit/libc_a-stdc_bit_floor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_bit_floor.obj `if test -f 'libc/stdbit/stdc_bit_floor.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_bit_floor.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_bit_floor.c'; fi` + +libc/stdbit/libc_a-stdc_bit_width.o: libc/stdbit/stdc_bit_width.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_bit_width.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_width.Tpo -c -o libc/stdbit/libc_a-stdc_bit_width.o `test -f 'libc/stdbit/stdc_bit_width.c' || echo '$(srcdir)/'`libc/stdbit/stdc_bit_width.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_width.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_width.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_bit_width.c' object='libc/stdbit/libc_a-stdc_bit_width.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_bit_width.o `test -f 'libc/stdbit/stdc_bit_width.c' || echo '$(srcdir)/'`libc/stdbit/stdc_bit_width.c + +libc/stdbit/libc_a-stdc_bit_width.obj: libc/stdbit/stdc_bit_width.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_bit_width.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_width.Tpo -c -o libc/stdbit/libc_a-stdc_bit_width.obj `if test -f 'libc/stdbit/stdc_bit_width.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_bit_width.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_bit_width.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_width.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_bit_width.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_bit_width.c' object='libc/stdbit/libc_a-stdc_bit_width.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_bit_width.obj `if test -f 'libc/stdbit/stdc_bit_width.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_bit_width.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_bit_width.c'; fi` + +libc/stdbit/libc_a-stdc_count_ones.o: libc/stdbit/stdc_count_ones.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_count_ones.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_count_ones.Tpo -c -o libc/stdbit/libc_a-stdc_count_ones.o `test -f 'libc/stdbit/stdc_count_ones.c' || echo '$(srcdir)/'`libc/stdbit/stdc_count_ones.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_count_ones.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_count_ones.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_count_ones.c' object='libc/stdbit/libc_a-stdc_count_ones.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_count_ones.o `test -f 'libc/stdbit/stdc_count_ones.c' || echo '$(srcdir)/'`libc/stdbit/stdc_count_ones.c + +libc/stdbit/libc_a-stdc_count_ones.obj: libc/stdbit/stdc_count_ones.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_count_ones.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_count_ones.Tpo -c -o libc/stdbit/libc_a-stdc_count_ones.obj `if test -f 'libc/stdbit/stdc_count_ones.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_count_ones.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_count_ones.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_count_ones.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_count_ones.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_count_ones.c' object='libc/stdbit/libc_a-stdc_count_ones.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_count_ones.obj `if test -f 'libc/stdbit/stdc_count_ones.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_count_ones.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_count_ones.c'; fi` + +libc/stdbit/libc_a-stdc_count_zeros.o: libc/stdbit/stdc_count_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_count_zeros.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_count_zeros.Tpo -c -o libc/stdbit/libc_a-stdc_count_zeros.o `test -f 'libc/stdbit/stdc_count_zeros.c' || echo '$(srcdir)/'`libc/stdbit/stdc_count_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_count_zeros.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_count_zeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_count_zeros.c' object='libc/stdbit/libc_a-stdc_count_zeros.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_count_zeros.o `test -f 'libc/stdbit/stdc_count_zeros.c' || echo '$(srcdir)/'`libc/stdbit/stdc_count_zeros.c + +libc/stdbit/libc_a-stdc_count_zeros.obj: libc/stdbit/stdc_count_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_count_zeros.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_count_zeros.Tpo -c -o libc/stdbit/libc_a-stdc_count_zeros.obj `if test -f 'libc/stdbit/stdc_count_zeros.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_count_zeros.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_count_zeros.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_count_zeros.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_count_zeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_count_zeros.c' object='libc/stdbit/libc_a-stdc_count_zeros.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_count_zeros.obj `if test -f 'libc/stdbit/stdc_count_zeros.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_count_zeros.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_count_zeros.c'; fi` + +libc/stdbit/libc_a-stdc_first_leading_one.o: libc/stdbit/stdc_first_leading_one.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_first_leading_one.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_one.Tpo -c -o libc/stdbit/libc_a-stdc_first_leading_one.o `test -f 'libc/stdbit/stdc_first_leading_one.c' || echo '$(srcdir)/'`libc/stdbit/stdc_first_leading_one.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_one.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_one.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_first_leading_one.c' object='libc/stdbit/libc_a-stdc_first_leading_one.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_first_leading_one.o `test -f 'libc/stdbit/stdc_first_leading_one.c' || echo '$(srcdir)/'`libc/stdbit/stdc_first_leading_one.c + +libc/stdbit/libc_a-stdc_first_leading_one.obj: libc/stdbit/stdc_first_leading_one.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_first_leading_one.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_one.Tpo -c -o libc/stdbit/libc_a-stdc_first_leading_one.obj `if test -f 'libc/stdbit/stdc_first_leading_one.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_first_leading_one.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_first_leading_one.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_one.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_one.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_first_leading_one.c' object='libc/stdbit/libc_a-stdc_first_leading_one.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_first_leading_one.obj `if test -f 'libc/stdbit/stdc_first_leading_one.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_first_leading_one.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_first_leading_one.c'; fi` + +libc/stdbit/libc_a-stdc_first_leading_zero.o: libc/stdbit/stdc_first_leading_zero.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_first_leading_zero.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_zero.Tpo -c -o libc/stdbit/libc_a-stdc_first_leading_zero.o `test -f 'libc/stdbit/stdc_first_leading_zero.c' || echo '$(srcdir)/'`libc/stdbit/stdc_first_leading_zero.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_zero.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_zero.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_first_leading_zero.c' object='libc/stdbit/libc_a-stdc_first_leading_zero.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_first_leading_zero.o `test -f 'libc/stdbit/stdc_first_leading_zero.c' || echo '$(srcdir)/'`libc/stdbit/stdc_first_leading_zero.c + +libc/stdbit/libc_a-stdc_first_leading_zero.obj: libc/stdbit/stdc_first_leading_zero.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_first_leading_zero.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_zero.Tpo -c -o libc/stdbit/libc_a-stdc_first_leading_zero.obj `if test -f 'libc/stdbit/stdc_first_leading_zero.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_first_leading_zero.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_first_leading_zero.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_zero.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_first_leading_zero.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_first_leading_zero.c' object='libc/stdbit/libc_a-stdc_first_leading_zero.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_first_leading_zero.obj `if test -f 'libc/stdbit/stdc_first_leading_zero.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_first_leading_zero.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_first_leading_zero.c'; fi` + +libc/stdbit/libc_a-stdc_first_trailing_one.o: libc/stdbit/stdc_first_trailing_one.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_first_trailing_one.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_one.Tpo -c -o libc/stdbit/libc_a-stdc_first_trailing_one.o `test -f 'libc/stdbit/stdc_first_trailing_one.c' || echo '$(srcdir)/'`libc/stdbit/stdc_first_trailing_one.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_one.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_one.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_first_trailing_one.c' object='libc/stdbit/libc_a-stdc_first_trailing_one.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_first_trailing_one.o `test -f 'libc/stdbit/stdc_first_trailing_one.c' || echo '$(srcdir)/'`libc/stdbit/stdc_first_trailing_one.c + +libc/stdbit/libc_a-stdc_first_trailing_one.obj: libc/stdbit/stdc_first_trailing_one.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_first_trailing_one.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_one.Tpo -c -o libc/stdbit/libc_a-stdc_first_trailing_one.obj `if test -f 'libc/stdbit/stdc_first_trailing_one.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_first_trailing_one.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_first_trailing_one.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_one.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_one.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_first_trailing_one.c' object='libc/stdbit/libc_a-stdc_first_trailing_one.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_first_trailing_one.obj `if test -f 'libc/stdbit/stdc_first_trailing_one.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_first_trailing_one.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_first_trailing_one.c'; fi` + +libc/stdbit/libc_a-stdc_first_trailing_zero.o: libc/stdbit/stdc_first_trailing_zero.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_first_trailing_zero.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_zero.Tpo -c -o libc/stdbit/libc_a-stdc_first_trailing_zero.o `test -f 'libc/stdbit/stdc_first_trailing_zero.c' || echo '$(srcdir)/'`libc/stdbit/stdc_first_trailing_zero.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_zero.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_zero.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_first_trailing_zero.c' object='libc/stdbit/libc_a-stdc_first_trailing_zero.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_first_trailing_zero.o `test -f 'libc/stdbit/stdc_first_trailing_zero.c' || echo '$(srcdir)/'`libc/stdbit/stdc_first_trailing_zero.c + +libc/stdbit/libc_a-stdc_first_trailing_zero.obj: libc/stdbit/stdc_first_trailing_zero.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_first_trailing_zero.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_zero.Tpo -c -o libc/stdbit/libc_a-stdc_first_trailing_zero.obj `if test -f 'libc/stdbit/stdc_first_trailing_zero.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_first_trailing_zero.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_first_trailing_zero.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_zero.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_first_trailing_zero.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_first_trailing_zero.c' object='libc/stdbit/libc_a-stdc_first_trailing_zero.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_first_trailing_zero.obj `if test -f 'libc/stdbit/stdc_first_trailing_zero.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_first_trailing_zero.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_first_trailing_zero.c'; fi` + +libc/stdbit/libc_a-stdc_has_single_bit.o: libc/stdbit/stdc_has_single_bit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_has_single_bit.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_has_single_bit.Tpo -c -o libc/stdbit/libc_a-stdc_has_single_bit.o `test -f 'libc/stdbit/stdc_has_single_bit.c' || echo '$(srcdir)/'`libc/stdbit/stdc_has_single_bit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_has_single_bit.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_has_single_bit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_has_single_bit.c' object='libc/stdbit/libc_a-stdc_has_single_bit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_has_single_bit.o `test -f 'libc/stdbit/stdc_has_single_bit.c' || echo '$(srcdir)/'`libc/stdbit/stdc_has_single_bit.c + +libc/stdbit/libc_a-stdc_has_single_bit.obj: libc/stdbit/stdc_has_single_bit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_has_single_bit.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_has_single_bit.Tpo -c -o libc/stdbit/libc_a-stdc_has_single_bit.obj `if test -f 'libc/stdbit/stdc_has_single_bit.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_has_single_bit.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_has_single_bit.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_has_single_bit.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_has_single_bit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_has_single_bit.c' object='libc/stdbit/libc_a-stdc_has_single_bit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_has_single_bit.obj `if test -f 'libc/stdbit/stdc_has_single_bit.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_has_single_bit.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_has_single_bit.c'; fi` + +libc/stdbit/libc_a-stdc_leading_ones.o: libc/stdbit/stdc_leading_ones.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_leading_ones.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_ones.Tpo -c -o libc/stdbit/libc_a-stdc_leading_ones.o `test -f 'libc/stdbit/stdc_leading_ones.c' || echo '$(srcdir)/'`libc/stdbit/stdc_leading_ones.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_ones.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_ones.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_leading_ones.c' object='libc/stdbit/libc_a-stdc_leading_ones.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_leading_ones.o `test -f 'libc/stdbit/stdc_leading_ones.c' || echo '$(srcdir)/'`libc/stdbit/stdc_leading_ones.c + +libc/stdbit/libc_a-stdc_leading_ones.obj: libc/stdbit/stdc_leading_ones.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_leading_ones.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_ones.Tpo -c -o libc/stdbit/libc_a-stdc_leading_ones.obj `if test -f 'libc/stdbit/stdc_leading_ones.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_leading_ones.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_leading_ones.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_ones.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_ones.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_leading_ones.c' object='libc/stdbit/libc_a-stdc_leading_ones.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_leading_ones.obj `if test -f 'libc/stdbit/stdc_leading_ones.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_leading_ones.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_leading_ones.c'; fi` + +libc/stdbit/libc_a-stdc_leading_zeros.o: libc/stdbit/stdc_leading_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_leading_zeros.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_zeros.Tpo -c -o libc/stdbit/libc_a-stdc_leading_zeros.o `test -f 'libc/stdbit/stdc_leading_zeros.c' || echo '$(srcdir)/'`libc/stdbit/stdc_leading_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_zeros.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_zeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_leading_zeros.c' object='libc/stdbit/libc_a-stdc_leading_zeros.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_leading_zeros.o `test -f 'libc/stdbit/stdc_leading_zeros.c' || echo '$(srcdir)/'`libc/stdbit/stdc_leading_zeros.c + +libc/stdbit/libc_a-stdc_leading_zeros.obj: libc/stdbit/stdc_leading_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_leading_zeros.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_zeros.Tpo -c -o libc/stdbit/libc_a-stdc_leading_zeros.obj `if test -f 'libc/stdbit/stdc_leading_zeros.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_leading_zeros.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_leading_zeros.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_zeros.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_leading_zeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_leading_zeros.c' object='libc/stdbit/libc_a-stdc_leading_zeros.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_leading_zeros.obj `if test -f 'libc/stdbit/stdc_leading_zeros.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_leading_zeros.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_leading_zeros.c'; fi` + +libc/stdbit/libc_a-stdc_trailing_ones.o: libc/stdbit/stdc_trailing_ones.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_trailing_ones.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_ones.Tpo -c -o libc/stdbit/libc_a-stdc_trailing_ones.o `test -f 'libc/stdbit/stdc_trailing_ones.c' || echo '$(srcdir)/'`libc/stdbit/stdc_trailing_ones.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_ones.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_ones.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_trailing_ones.c' object='libc/stdbit/libc_a-stdc_trailing_ones.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_trailing_ones.o `test -f 'libc/stdbit/stdc_trailing_ones.c' || echo '$(srcdir)/'`libc/stdbit/stdc_trailing_ones.c + +libc/stdbit/libc_a-stdc_trailing_ones.obj: libc/stdbit/stdc_trailing_ones.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_trailing_ones.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_ones.Tpo -c -o libc/stdbit/libc_a-stdc_trailing_ones.obj `if test -f 'libc/stdbit/stdc_trailing_ones.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_trailing_ones.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_trailing_ones.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_ones.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_ones.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_trailing_ones.c' object='libc/stdbit/libc_a-stdc_trailing_ones.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_trailing_ones.obj `if test -f 'libc/stdbit/stdc_trailing_ones.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_trailing_ones.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_trailing_ones.c'; fi` + +libc/stdbit/libc_a-stdc_trailing_zeros.o: libc/stdbit/stdc_trailing_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_trailing_zeros.o -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_zeros.Tpo -c -o libc/stdbit/libc_a-stdc_trailing_zeros.o `test -f 'libc/stdbit/stdc_trailing_zeros.c' || echo '$(srcdir)/'`libc/stdbit/stdc_trailing_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_zeros.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_zeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_trailing_zeros.c' object='libc/stdbit/libc_a-stdc_trailing_zeros.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_trailing_zeros.o `test -f 'libc/stdbit/stdc_trailing_zeros.c' || echo '$(srcdir)/'`libc/stdbit/stdc_trailing_zeros.c + +libc/stdbit/libc_a-stdc_trailing_zeros.obj: libc/stdbit/stdc_trailing_zeros.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/stdbit/libc_a-stdc_trailing_zeros.obj -MD -MP -MF libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_zeros.Tpo -c -o libc/stdbit/libc_a-stdc_trailing_zeros.obj `if test -f 'libc/stdbit/stdc_trailing_zeros.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_trailing_zeros.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_trailing_zeros.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_zeros.Tpo libc/stdbit/$(DEPDIR)/libc_a-stdc_trailing_zeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/stdbit/stdc_trailing_zeros.c' object='libc/stdbit/libc_a-stdc_trailing_zeros.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/stdbit/libc_a-stdc_trailing_zeros.obj `if test -f 'libc/stdbit/stdc_trailing_zeros.c'; then $(CYGPATH_W) 'libc/stdbit/stdc_trailing_zeros.c'; else $(CYGPATH_W) '$(srcdir)/libc/stdbit/stdc_trailing_zeros.c'; fi` + libc/iconv/ces/libc_a-utf-8.o: libc/iconv/ces/utf-8.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/iconv/ces/libc_a-utf-8.o -MD -MP -MF libc/iconv/ces/$(DEPDIR)/libc_a-utf-8.Tpo -c -o libc/iconv/ces/libc_a-utf-8.o `test -f 'libc/iconv/ces/utf-8.c' || echo '$(srcdir)/'`libc/iconv/ces/utf-8.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/iconv/ces/$(DEPDIR)/libc_a-utf-8.Tpo libc/iconv/ces/$(DEPDIR)/libc_a-utf-8.Po @@ -50632,6 +50915,8 @@ distclean-generic: -rm -f libc/signal/$(am__dirstamp) -rm -f libc/ssp/$(DEPDIR)/$(am__dirstamp) -rm -f libc/ssp/$(am__dirstamp) + -rm -f libc/stdbit/$(DEPDIR)/$(am__dirstamp) + -rm -f libc/stdbit/$(am__dirstamp) -rm -f libc/stdio/$(DEPDIR)/$(am__dirstamp) -rm -f libc/stdio/$(am__dirstamp) -rm -f libc/stdio64/$(DEPDIR)/$(am__dirstamp) @@ -50748,7 +51033,7 @@ clean-am: clean-aminfo clean-checkPROGRAMS clean-generic clean-local \ distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf libc/argz/$(DEPDIR) libc/ctype/$(DEPDIR) libc/errno/$(DEPDIR) libc/iconv/ccs/$(DEPDIR) libc/iconv/ces/$(DEPDIR) libc/iconv/lib/$(DEPDIR) libc/locale/$(DEPDIR) libc/machine/aarch64/$(DEPDIR) libc/machine/amdgcn/$(DEPDIR) libc/machine/arc/$(DEPDIR) libc/machine/arc64/$(DEPDIR) libc/machine/arm/$(DEPDIR) libc/machine/bfin/$(DEPDIR) libc/machine/cr16/$(DEPDIR) libc/machine/cris/$(DEPDIR) libc/machine/crx/$(DEPDIR) libc/machine/csky/$(DEPDIR) libc/machine/d10v/$(DEPDIR) libc/machine/d30v/$(DEPDIR) libc/machine/epiphany/$(DEPDIR) libc/machine/fr30/$(DEPDIR) libc/machine/frv/$(DEPDIR) libc/machine/ft32/$(DEPDIR) libc/machine/h8300/$(DEPDIR) libc/machine/h8500/$(DEPDIR) libc/machine/hppa/$(DEPDIR) libc/machine/i386/$(DEPDIR) libc/machine/i960/$(DEPDIR) libc/machine/iq2000/$(DEPDIR) libc/machine/lm32/$(DEPDIR) libc/machine/m32c/$(DEPDIR) libc/machine/m32r/$(DEPDIR) libc/machine/m68hc11/$(DEPDIR) libc/machine/m68k/$(DEPDIR) libc/machine/m88k/$(DEPDIR) libc/machine/mep/$(DEPDIR) libc/machine/microblaze/$(DEPDIR) libc/machine/mips/$(DEPDIR) libc/machine/mn10200/$(DEPDIR) libc/machine/mn10300/$(DEPDIR) libc/machine/moxie/$(DEPDIR) libc/machine/msp430/$(DEPDIR) libc/machine/mt/$(DEPDIR) libc/machine/nds32/$(DEPDIR) libc/machine/necv70/$(DEPDIR) libc/machine/nvptx/$(DEPDIR) libc/machine/or1k/$(DEPDIR) libc/machine/powerpc/$(DEPDIR) libc/machine/riscv/$(DEPDIR) libc/machine/rl78/$(DEPDIR) libc/machine/rx/$(DEPDIR) libc/machine/sh/$(DEPDIR) libc/machine/sparc/$(DEPDIR) libc/machine/spu/$(DEPDIR) libc/machine/tic4x/$(DEPDIR) libc/machine/tic6x/$(DEPDIR) libc/machine/tic80/$(DEPDIR) libc/machine/v850/$(DEPDIR) libc/machine/visium/$(DEPDIR) libc/machine/w65/$(DEPDIR) libc/machine/x86_64/$(DEPDIR) libc/machine/xc16x/$(DEPDIR) libc/machine/xstormy16/$(DEPDIR) libc/machine/xtensa/$(DEPDIR) libc/machine/z8k/$(DEPDIR) libc/misc/$(DEPDIR) libc/posix/$(DEPDIR) libc/reent/$(DEPDIR) libc/search/$(DEPDIR) libc/signal/$(DEPDIR) libc/ssp/$(DEPDIR) libc/stdio/$(DEPDIR) libc/stdio64/$(DEPDIR) libc/stdlib/$(DEPDIR) libc/string/$(DEPDIR) libc/sys/a29khif/$(DEPDIR) libc/sys/amdgcn/$(DEPDIR) libc/sys/arm/$(DEPDIR) libc/sys/d10v/$(DEPDIR) libc/sys/epiphany/$(DEPDIR) libc/sys/h8300hms/$(DEPDIR) libc/sys/h8500hms/$(DEPDIR) libc/sys/m88kbug/$(DEPDIR) libc/sys/mmixware/$(DEPDIR) libc/sys/netware/$(DEPDIR) libc/sys/or1k/$(DEPDIR) libc/sys/rdos/$(DEPDIR) libc/sys/rtems/$(DEPDIR) libc/sys/sh/$(DEPDIR) libc/sys/sysmec/$(DEPDIR) libc/sys/sysnec810/$(DEPDIR) libc/sys/sysnecv850/$(DEPDIR) libc/sys/sysvi386/$(DEPDIR) libc/sys/sysvnecv70/$(DEPDIR) libc/sys/tirtos/$(DEPDIR) libc/sys/w65/$(DEPDIR) libc/sys/z8ksim/$(DEPDIR) libc/syscalls/$(DEPDIR) libc/time/$(DEPDIR) libc/unix/$(DEPDIR) libc/xdr/$(DEPDIR) libm/common/$(DEPDIR) libm/complex/$(DEPDIR) libm/fenv/$(DEPDIR) libm/ld/$(DEPDIR) libm/ld128/$(DEPDIR) libm/ld80/$(DEPDIR) libm/machine/aarch64/$(DEPDIR) libm/machine/amdgcn/$(DEPDIR) libm/machine/arm/$(DEPDIR) libm/machine/i386/$(DEPDIR) libm/machine/mips/$(DEPDIR) libm/machine/nds32/$(DEPDIR) libm/machine/powerpc/$(DEPDIR) libm/machine/pru/$(DEPDIR) libm/machine/riscv/$(DEPDIR) libm/machine/sparc/$(DEPDIR) libm/machine/spu/$(DEPDIR) libm/machine/x86_64/$(DEPDIR) libm/machine/xtensa/$(DEPDIR) libm/math/$(DEPDIR) libm/mathfp/$(DEPDIR) libm/test/$(DEPDIR) + -rm -rf libc/argz/$(DEPDIR) libc/ctype/$(DEPDIR) libc/errno/$(DEPDIR) libc/iconv/ccs/$(DEPDIR) libc/iconv/ces/$(DEPDIR) libc/iconv/lib/$(DEPDIR) libc/locale/$(DEPDIR) libc/machine/aarch64/$(DEPDIR) libc/machine/amdgcn/$(DEPDIR) libc/machine/arc/$(DEPDIR) libc/machine/arc64/$(DEPDIR) libc/machine/arm/$(DEPDIR) libc/machine/bfin/$(DEPDIR) libc/machine/cr16/$(DEPDIR) libc/machine/cris/$(DEPDIR) libc/machine/crx/$(DEPDIR) libc/machine/csky/$(DEPDIR) libc/machine/d10v/$(DEPDIR) libc/machine/d30v/$(DEPDIR) libc/machine/epiphany/$(DEPDIR) libc/machine/fr30/$(DEPDIR) libc/machine/frv/$(DEPDIR) libc/machine/ft32/$(DEPDIR) libc/machine/h8300/$(DEPDIR) libc/machine/h8500/$(DEPDIR) libc/machine/hppa/$(DEPDIR) libc/machine/i386/$(DEPDIR) libc/machine/i960/$(DEPDIR) libc/machine/iq2000/$(DEPDIR) libc/machine/lm32/$(DEPDIR) libc/machine/m32c/$(DEPDIR) libc/machine/m32r/$(DEPDIR) libc/machine/m68hc11/$(DEPDIR) libc/machine/m68k/$(DEPDIR) libc/machine/m88k/$(DEPDIR) libc/machine/mep/$(DEPDIR) libc/machine/microblaze/$(DEPDIR) libc/machine/mips/$(DEPDIR) libc/machine/mn10200/$(DEPDIR) libc/machine/mn10300/$(DEPDIR) libc/machine/moxie/$(DEPDIR) libc/machine/msp430/$(DEPDIR) libc/machine/mt/$(DEPDIR) libc/machine/nds32/$(DEPDIR) libc/machine/necv70/$(DEPDIR) libc/machine/nvptx/$(DEPDIR) libc/machine/or1k/$(DEPDIR) libc/machine/powerpc/$(DEPDIR) libc/machine/riscv/$(DEPDIR) libc/machine/rl78/$(DEPDIR) libc/machine/rx/$(DEPDIR) libc/machine/sh/$(DEPDIR) libc/machine/sparc/$(DEPDIR) libc/machine/spu/$(DEPDIR) libc/machine/tic4x/$(DEPDIR) libc/machine/tic6x/$(DEPDIR) libc/machine/tic80/$(DEPDIR) libc/machine/v850/$(DEPDIR) libc/machine/visium/$(DEPDIR) libc/machine/w65/$(DEPDIR) libc/machine/x86_64/$(DEPDIR) libc/machine/xc16x/$(DEPDIR) libc/machine/xstormy16/$(DEPDIR) libc/machine/xtensa/$(DEPDIR) libc/machine/z8k/$(DEPDIR) libc/misc/$(DEPDIR) libc/posix/$(DEPDIR) libc/reent/$(DEPDIR) libc/search/$(DEPDIR) libc/signal/$(DEPDIR) libc/ssp/$(DEPDIR) libc/stdbit/$(DEPDIR) libc/stdio/$(DEPDIR) libc/stdio64/$(DEPDIR) libc/stdlib/$(DEPDIR) libc/string/$(DEPDIR) libc/sys/a29khif/$(DEPDIR) libc/sys/amdgcn/$(DEPDIR) libc/sys/arm/$(DEPDIR) libc/sys/d10v/$(DEPDIR) libc/sys/epiphany/$(DEPDIR) libc/sys/h8300hms/$(DEPDIR) libc/sys/h8500hms/$(DEPDIR) libc/sys/m88kbug/$(DEPDIR) libc/sys/mmixware/$(DEPDIR) libc/sys/netware/$(DEPDIR) libc/sys/or1k/$(DEPDIR) libc/sys/rdos/$(DEPDIR) libc/sys/rtems/$(DEPDIR) libc/sys/sh/$(DEPDIR) libc/sys/sysmec/$(DEPDIR) libc/sys/sysnec810/$(DEPDIR) libc/sys/sysnecv850/$(DEPDIR) libc/sys/sysvi386/$(DEPDIR) libc/sys/sysvnecv70/$(DEPDIR) libc/sys/tirtos/$(DEPDIR) libc/sys/w65/$(DEPDIR) libc/sys/z8ksim/$(DEPDIR) libc/syscalls/$(DEPDIR) libc/time/$(DEPDIR) libc/unix/$(DEPDIR) libc/xdr/$(DEPDIR) libm/common/$(DEPDIR) libm/complex/$(DEPDIR) libm/fenv/$(DEPDIR) libm/ld/$(DEPDIR) libm/ld128/$(DEPDIR) libm/ld80/$(DEPDIR) libm/machine/aarch64/$(DEPDIR) libm/machine/amdgcn/$(DEPDIR) libm/machine/arm/$(DEPDIR) libm/machine/i386/$(DEPDIR) libm/machine/mips/$(DEPDIR) libm/machine/nds32/$(DEPDIR) libm/machine/powerpc/$(DEPDIR) libm/machine/pru/$(DEPDIR) libm/machine/riscv/$(DEPDIR) libm/machine/sparc/$(DEPDIR) libm/machine/spu/$(DEPDIR) libm/machine/x86_64/$(DEPDIR) libm/machine/xtensa/$(DEPDIR) libm/math/$(DEPDIR) libm/mathfp/$(DEPDIR) libm/test/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-DEJAGNU distclean-compile \ distclean-generic distclean-hdr distclean-local distclean-tags @@ -50886,7 +51171,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf libc/argz/$(DEPDIR) libc/ctype/$(DEPDIR) libc/errno/$(DEPDIR) libc/iconv/ccs/$(DEPDIR) libc/iconv/ces/$(DEPDIR) libc/iconv/lib/$(DEPDIR) libc/locale/$(DEPDIR) libc/machine/aarch64/$(DEPDIR) libc/machine/amdgcn/$(DEPDIR) libc/machine/arc/$(DEPDIR) libc/machine/arc64/$(DEPDIR) libc/machine/arm/$(DEPDIR) libc/machine/bfin/$(DEPDIR) libc/machine/cr16/$(DEPDIR) libc/machine/cris/$(DEPDIR) libc/machine/crx/$(DEPDIR) libc/machine/csky/$(DEPDIR) libc/machine/d10v/$(DEPDIR) libc/machine/d30v/$(DEPDIR) libc/machine/epiphany/$(DEPDIR) libc/machine/fr30/$(DEPDIR) libc/machine/frv/$(DEPDIR) libc/machine/ft32/$(DEPDIR) libc/machine/h8300/$(DEPDIR) libc/machine/h8500/$(DEPDIR) libc/machine/hppa/$(DEPDIR) libc/machine/i386/$(DEPDIR) libc/machine/i960/$(DEPDIR) libc/machine/iq2000/$(DEPDIR) libc/machine/lm32/$(DEPDIR) libc/machine/m32c/$(DEPDIR) libc/machine/m32r/$(DEPDIR) libc/machine/m68hc11/$(DEPDIR) libc/machine/m68k/$(DEPDIR) libc/machine/m88k/$(DEPDIR) libc/machine/mep/$(DEPDIR) libc/machine/microblaze/$(DEPDIR) libc/machine/mips/$(DEPDIR) libc/machine/mn10200/$(DEPDIR) libc/machine/mn10300/$(DEPDIR) libc/machine/moxie/$(DEPDIR) libc/machine/msp430/$(DEPDIR) libc/machine/mt/$(DEPDIR) libc/machine/nds32/$(DEPDIR) libc/machine/necv70/$(DEPDIR) libc/machine/nvptx/$(DEPDIR) libc/machine/or1k/$(DEPDIR) libc/machine/powerpc/$(DEPDIR) libc/machine/riscv/$(DEPDIR) libc/machine/rl78/$(DEPDIR) libc/machine/rx/$(DEPDIR) libc/machine/sh/$(DEPDIR) libc/machine/sparc/$(DEPDIR) libc/machine/spu/$(DEPDIR) libc/machine/tic4x/$(DEPDIR) libc/machine/tic6x/$(DEPDIR) libc/machine/tic80/$(DEPDIR) libc/machine/v850/$(DEPDIR) libc/machine/visium/$(DEPDIR) libc/machine/w65/$(DEPDIR) libc/machine/x86_64/$(DEPDIR) libc/machine/xc16x/$(DEPDIR) libc/machine/xstormy16/$(DEPDIR) libc/machine/xtensa/$(DEPDIR) libc/machine/z8k/$(DEPDIR) libc/misc/$(DEPDIR) libc/posix/$(DEPDIR) libc/reent/$(DEPDIR) libc/search/$(DEPDIR) libc/signal/$(DEPDIR) libc/ssp/$(DEPDIR) libc/stdio/$(DEPDIR) libc/stdio64/$(DEPDIR) libc/stdlib/$(DEPDIR) libc/string/$(DEPDIR) libc/sys/a29khif/$(DEPDIR) libc/sys/amdgcn/$(DEPDIR) libc/sys/arm/$(DEPDIR) libc/sys/d10v/$(DEPDIR) libc/sys/epiphany/$(DEPDIR) libc/sys/h8300hms/$(DEPDIR) libc/sys/h8500hms/$(DEPDIR) libc/sys/m88kbug/$(DEPDIR) libc/sys/mmixware/$(DEPDIR) libc/sys/netware/$(DEPDIR) libc/sys/or1k/$(DEPDIR) libc/sys/rdos/$(DEPDIR) libc/sys/rtems/$(DEPDIR) libc/sys/sh/$(DEPDIR) libc/sys/sysmec/$(DEPDIR) libc/sys/sysnec810/$(DEPDIR) libc/sys/sysnecv850/$(DEPDIR) libc/sys/sysvi386/$(DEPDIR) libc/sys/sysvnecv70/$(DEPDIR) libc/sys/tirtos/$(DEPDIR) libc/sys/w65/$(DEPDIR) libc/sys/z8ksim/$(DEPDIR) libc/syscalls/$(DEPDIR) libc/time/$(DEPDIR) libc/unix/$(DEPDIR) libc/xdr/$(DEPDIR) libm/common/$(DEPDIR) libm/complex/$(DEPDIR) libm/fenv/$(DEPDIR) libm/ld/$(DEPDIR) libm/ld128/$(DEPDIR) libm/ld80/$(DEPDIR) libm/machine/aarch64/$(DEPDIR) libm/machine/amdgcn/$(DEPDIR) libm/machine/arm/$(DEPDIR) libm/machine/i386/$(DEPDIR) libm/machine/mips/$(DEPDIR) libm/machine/nds32/$(DEPDIR) libm/machine/powerpc/$(DEPDIR) libm/machine/pru/$(DEPDIR) libm/machine/riscv/$(DEPDIR) libm/machine/sparc/$(DEPDIR) libm/machine/spu/$(DEPDIR) libm/machine/x86_64/$(DEPDIR) libm/machine/xtensa/$(DEPDIR) libm/math/$(DEPDIR) libm/mathfp/$(DEPDIR) libm/test/$(DEPDIR) + -rm -rf libc/argz/$(DEPDIR) libc/ctype/$(DEPDIR) libc/errno/$(DEPDIR) libc/iconv/ccs/$(DEPDIR) libc/iconv/ces/$(DEPDIR) libc/iconv/lib/$(DEPDIR) libc/locale/$(DEPDIR) libc/machine/aarch64/$(DEPDIR) libc/machine/amdgcn/$(DEPDIR) libc/machine/arc/$(DEPDIR) libc/machine/arc64/$(DEPDIR) libc/machine/arm/$(DEPDIR) libc/machine/bfin/$(DEPDIR) libc/machine/cr16/$(DEPDIR) libc/machine/cris/$(DEPDIR) libc/machine/crx/$(DEPDIR) libc/machine/csky/$(DEPDIR) libc/machine/d10v/$(DEPDIR) libc/machine/d30v/$(DEPDIR) libc/machine/epiphany/$(DEPDIR) libc/machine/fr30/$(DEPDIR) libc/machine/frv/$(DEPDIR) libc/machine/ft32/$(DEPDIR) libc/machine/h8300/$(DEPDIR) libc/machine/h8500/$(DEPDIR) libc/machine/hppa/$(DEPDIR) libc/machine/i386/$(DEPDIR) libc/machine/i960/$(DEPDIR) libc/machine/iq2000/$(DEPDIR) libc/machine/lm32/$(DEPDIR) libc/machine/m32c/$(DEPDIR) libc/machine/m32r/$(DEPDIR) libc/machine/m68hc11/$(DEPDIR) libc/machine/m68k/$(DEPDIR) libc/machine/m88k/$(DEPDIR) libc/machine/mep/$(DEPDIR) libc/machine/microblaze/$(DEPDIR) libc/machine/mips/$(DEPDIR) libc/machine/mn10200/$(DEPDIR) libc/machine/mn10300/$(DEPDIR) libc/machine/moxie/$(DEPDIR) libc/machine/msp430/$(DEPDIR) libc/machine/mt/$(DEPDIR) libc/machine/nds32/$(DEPDIR) libc/machine/necv70/$(DEPDIR) libc/machine/nvptx/$(DEPDIR) libc/machine/or1k/$(DEPDIR) libc/machine/powerpc/$(DEPDIR) libc/machine/riscv/$(DEPDIR) libc/machine/rl78/$(DEPDIR) libc/machine/rx/$(DEPDIR) libc/machine/sh/$(DEPDIR) libc/machine/sparc/$(DEPDIR) libc/machine/spu/$(DEPDIR) libc/machine/tic4x/$(DEPDIR) libc/machine/tic6x/$(DEPDIR) libc/machine/tic80/$(DEPDIR) libc/machine/v850/$(DEPDIR) libc/machine/visium/$(DEPDIR) libc/machine/w65/$(DEPDIR) libc/machine/x86_64/$(DEPDIR) libc/machine/xc16x/$(DEPDIR) libc/machine/xstormy16/$(DEPDIR) libc/machine/xtensa/$(DEPDIR) libc/machine/z8k/$(DEPDIR) libc/misc/$(DEPDIR) libc/posix/$(DEPDIR) libc/reent/$(DEPDIR) libc/search/$(DEPDIR) libc/signal/$(DEPDIR) libc/ssp/$(DEPDIR) libc/stdbit/$(DEPDIR) libc/stdio/$(DEPDIR) libc/stdio64/$(DEPDIR) libc/stdlib/$(DEPDIR) libc/string/$(DEPDIR) libc/sys/a29khif/$(DEPDIR) libc/sys/amdgcn/$(DEPDIR) libc/sys/arm/$(DEPDIR) libc/sys/d10v/$(DEPDIR) libc/sys/epiphany/$(DEPDIR) libc/sys/h8300hms/$(DEPDIR) libc/sys/h8500hms/$(DEPDIR) libc/sys/m88kbug/$(DEPDIR) libc/sys/mmixware/$(DEPDIR) libc/sys/netware/$(DEPDIR) libc/sys/or1k/$(DEPDIR) libc/sys/rdos/$(DEPDIR) libc/sys/rtems/$(DEPDIR) libc/sys/sh/$(DEPDIR) libc/sys/sysmec/$(DEPDIR) libc/sys/sysnec810/$(DEPDIR) libc/sys/sysnecv850/$(DEPDIR) libc/sys/sysvi386/$(DEPDIR) libc/sys/sysvnecv70/$(DEPDIR) libc/sys/tirtos/$(DEPDIR) libc/sys/w65/$(DEPDIR) libc/sys/z8ksim/$(DEPDIR) libc/syscalls/$(DEPDIR) libc/time/$(DEPDIR) libc/unix/$(DEPDIR) libc/xdr/$(DEPDIR) libm/common/$(DEPDIR) libm/complex/$(DEPDIR) libm/fenv/$(DEPDIR) libm/ld/$(DEPDIR) libm/ld128/$(DEPDIR) libm/ld80/$(DEPDIR) libm/machine/aarch64/$(DEPDIR) libm/machine/amdgcn/$(DEPDIR) libm/machine/arm/$(DEPDIR) libm/machine/i386/$(DEPDIR) libm/machine/mips/$(DEPDIR) libm/machine/nds32/$(DEPDIR) libm/machine/powerpc/$(DEPDIR) libm/machine/pru/$(DEPDIR) libm/machine/riscv/$(DEPDIR) libm/machine/sparc/$(DEPDIR) libm/machine/spu/$(DEPDIR) libm/machine/x86_64/$(DEPDIR) libm/machine/xtensa/$(DEPDIR) libm/math/$(DEPDIR) libm/mathfp/$(DEPDIR) libm/test/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-local From patchwork Thu Apr 16 21:00:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 133218 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 86A294C91769 for ; Thu, 16 Apr 2026 21:01:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86A294C91769 X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) by sourceware.org (Postfix) with ESMTPS id 9A6584C9175B for ; Thu, 16 Apr 2026 21:01:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A6584C9175B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9A6584C9175B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.174 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373291; cv=none; b=FAHRSw0nkMA8nh3NLoz5f4xR07XnHcu6LGqOArOaOpA/8DU3YxMytmmuosltFHWqm1Ur2KoI650FmWtfma2YfVYeYLchzLjdVCmQmpiV/aRluCNTADYj9hrs+ZhC0IIxZ2GxEa+l+o7uqFfv31YWaTTQ9R6O82PQbHRp/rMfilQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373291; c=relaxed/simple; bh=o7SRjL4dUaJ8vbF9M0lyY0btP/BmTKtKNHvkk+BMtZA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=DPUfwL8T9uHJx7dk1VA0JpCUOfvckw9MTy1L6Xe8mDjS7rMPLeyKsJP2csmGeyL7w4ctctG5jg6FAvHvVunlnmGYykSBYFqubNy9cBRI6GgXdsVYOi4BojC4PsawPdwfeiRJj5XvJoxqo2P2xzsHFObvIY5HydfdXgWFqZTKRWk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A6584C9175B Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-794719afcd4so93717197b3.1 for ; Thu, 16 Apr 2026 14:01:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776373289; x=1776978089; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5Zs8PNchTaWydpDmDfciCjAUJxRaLNqJVJ0wupMHwss=; b=HN5TnT2RSuVrMMD2YdOYmbxYr0mAo9oMfCnwURgQcgWITxft7wnmJx0MlB/TnK1MLn p9+21aVVbTwpo7X0AN7BGLFe+hBmWrxnNh6t39W0DAzYLRpShTXVLy8bqQwzA9tgUcH0 tztU/IFq+KshiACPh/EQBPvmA6U4cY3DLGbawBDWan4eIx27n0EzEwQkDVH49y5NJb/D QUX98+1BDDWL+pTX6i/t024566wCynHms4Pq3jDEPdEL69KdW3X4iw8mxyBEt8HfsTSu xAd5Q1Wq/nUq+EwkeQNcfHYm52zU3ya84//I7QslC0SMNqhVVSAPTpNl9niboSqlroX/ 0ItQ== X-Gm-Message-State: AOJu0YymRUmrQ29HXwxHL1sH3f4MBr9XysvEH6PBJNs6Fb9BGgJDQlfP 0EKeJrxok2IdlA2XuZI06hGrySdB6+bsC0bxcHK1dt4aQBouJ1RckKQ1aovf9lCP X-Gm-Gg: AeBDies2nRpS+GKTUp85lM6I8Ha+7hcjrFhnBsSPcXKRGTRpM8AvwyOB/PeAyU9CXFM tYYpih8gM6zMs0gy1Ok0r+vGWrt8szO0lmcAqRIPqLZ+cgk9B0OIq6CHdOTixMJQVdVIChA4G6B Fl+4ouXmxv6nu43RX7EJfpTxUiLXbyTHI9PxJuu4aUv/FHCRAAs5O1ukdGzeseyQCdUOvqsiRfm RNNJFGg1QmUTgxq+0A+WDTMYdkZwtHnHmoJJhId12zGPsNIWuhqfZCWTcxFGpBF8svKWpI+8hQE JgSXa6vgesSyW3Woj0vw3qJ8rfJFaaRlh1a2AuNLskj3H6a/TzsvOKNi7eH6hYwsNxSQysPLiqO wBZsbhgRH2pLkmtl/c1gqtbIZKG0R86yh5k11QSfb68y5id7wck6f7C3UeFUQEKjsnIEOAn2MVu v6PgnCK8kQ3ah25tz0Fpu5kmnkXxnjnzGdrL2F+oodioWbKiDDlFtMZLGELyiBJwU0f3sIBhyW X-Received: by 2002:a05:690c:1d:b0:7b4:f43f:1a23 with SMTP id 00721157ae682-7b9ecfa1baamr1480537b3.34.1776373289136; Thu, 16 Apr 2026 14:01:29 -0700 (PDT) Received: from gitlab.oarcorp.com (d27-96-189-151.evv.wideopenwest.com. [96.27.151.189]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7b76931854esm28916287b3.37.2026.04.16.14.01.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2026 14:01:27 -0700 (PDT) From: Joel Sherrill To: newlib@sourceware.org Cc: Joel Sherrill Subject: [PATCH v3 4/6] newlib/libc/stdbit: Make compile for C99 and newer Date: Thu, 16 Apr 2026 16:00:45 -0500 Message-ID: <20260416210047.2198615-5-joel@rtems.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260416210047.2198615-1-joel@rtems.org> References: <20260416210047.2198615-1-joel@rtems.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3036.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org This involved two issues. First, is that C23 adds multiple _WIDTH constants which are used by the implementation. This is addressed by stdbit_internal.h defining them if needed. Second, C99 does not have static_assert(). Changed to use newlib's _Static_assert() adapter which has implementations for C99 and newer. --- newlib/libc/stdbit/stdbit_internal.h | 47 +++++++++++++++++++ newlib/libc/stdbit/stdc_bit_ceil.c | 6 ++- newlib/libc/stdbit/stdc_bit_floor.c | 2 + newlib/libc/stdbit/stdc_bit_width.c | 2 + newlib/libc/stdbit/stdc_count_ones.c | 2 + newlib/libc/stdbit/stdc_count_zeros.c | 2 + newlib/libc/stdbit/stdc_first_leading_one.c | 2 + newlib/libc/stdbit/stdc_first_leading_zero.c | 2 + newlib/libc/stdbit/stdc_first_trailing_one.c | 2 + newlib/libc/stdbit/stdc_first_trailing_zero.c | 2 + newlib/libc/stdbit/stdc_has_single_bit.c | 2 + newlib/libc/stdbit/stdc_leading_ones.c | 6 ++- newlib/libc/stdbit/stdc_leading_zeros.c | 6 ++- newlib/libc/stdbit/stdc_trailing_ones.c | 6 ++- newlib/libc/stdbit/stdc_trailing_zeros.c | 6 ++- 15 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 newlib/libc/stdbit/stdbit_internal.h diff --git a/newlib/libc/stdbit/stdbit_internal.h b/newlib/libc/stdbit/stdbit_internal.h new file mode 100644 index 000000000..0d99c691b --- /dev/null +++ b/newlib/libc/stdbit/stdbit_internal.h @@ -0,0 +1,47 @@ +/* + * Newlib specific addition to ensure the C23 *_WIDTH constants + * used in the stdbits implementation are available even when + * compiling using another version of the C Programming Language. + */ + +/* + * Written by Joel Sherrill . + * + * COPYRIGHT (c) 2026. + * On-Line Applications Research Corporation (OAR). + * + * Permission to use, copy, modify, and distribute this software for any + * purpose without fee is hereby granted, provided that this entire notice + * is included in all copies of any software which is or includes a copy + * or modification of this software. + * + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION + * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS + * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + */ + +#ifndef STDBIT_INTERNAL_h +#define STDBIT_INTERNAL_h + +#ifndef UCHAR_WIDTH +#define UCHAR_WIDTH __SCHAR_WIDTH__ +#endif + +#ifndef USHRT_WIDTH +#define USHRT_WIDTH __SHRT_WIDTH__ +#endif + +#ifndef UINT_WIDTH +#define UINT_WIDTH __INT_WIDTH__ +#endif + +#ifndef ULONG_WIDTH +#define ULONG_WIDTH __LONG_LONG_WIDTH__ +#endif + +#ifndef ULLONG_WIDTH +#define ULLONG_WIDTH __LONG_LONG_WIDTH__ +#endif + +#endif diff --git a/newlib/libc/stdbit/stdc_bit_ceil.c b/newlib/libc/stdbit/stdc_bit_ceil.c index 2dfd7bbcb..f25d184af 100644 --- a/newlib/libc/stdbit/stdc_bit_ceil.c +++ b/newlib/libc/stdbit/stdc_bit_ceil.c @@ -8,8 +8,10 @@ #include #include +#include "stdbit_internal.h" + /* Ensure we don't shift 1U out of range. */ -static_assert(UCHAR_WIDTH < UINT_WIDTH, +_Static_assert(UCHAR_WIDTH < UINT_WIDTH, "stdc_bit_ceil_uc needs UCHAR_WIDTH < UINT_WIDTH"); unsigned char @@ -22,7 +24,7 @@ stdc_bit_ceil_uc(unsigned char x) } /* Ensure we don't shift 1U out of range. */ -static_assert(USHRT_WIDTH < UINT_WIDTH, +_Static_assert(USHRT_WIDTH < UINT_WIDTH, "stdc_bit_ceil_us needs USHRT_WIDTH < UINT_WIDTH"); unsigned short diff --git a/newlib/libc/stdbit/stdc_bit_floor.c b/newlib/libc/stdbit/stdc_bit_floor.c index 0a491d6ec..ab9156056 100644 --- a/newlib/libc/stdbit/stdc_bit_floor.c +++ b/newlib/libc/stdbit/stdc_bit_floor.c @@ -7,6 +7,8 @@ #include #include +#include "stdbit_internal.h" + unsigned char stdc_bit_floor_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_bit_width.c b/newlib/libc/stdbit/stdc_bit_width.c index e248fae48..602916d21 100644 --- a/newlib/libc/stdbit/stdc_bit_width.c +++ b/newlib/libc/stdbit/stdc_bit_width.c @@ -7,6 +7,8 @@ #include #include +#include "stdbit_internal.h" + unsigned int stdc_bit_width_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_count_ones.c b/newlib/libc/stdbit/stdc_count_ones.c index c5198dca8..6dfcbfd45 100644 --- a/newlib/libc/stdbit/stdc_count_ones.c +++ b/newlib/libc/stdbit/stdc_count_ones.c @@ -7,6 +7,8 @@ #include #include +#include "stdbit_internal.h" + unsigned int stdc_count_ones_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_count_zeros.c b/newlib/libc/stdbit/stdc_count_zeros.c index 35db965af..49f1ff851 100644 --- a/newlib/libc/stdbit/stdc_count_zeros.c +++ b/newlib/libc/stdbit/stdc_count_zeros.c @@ -7,6 +7,8 @@ #include #include +#include "stdbit_internal.h" + unsigned int stdc_count_zeros_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_first_leading_one.c b/newlib/libc/stdbit/stdc_first_leading_one.c index de4368565..ad95b3cfd 100644 --- a/newlib/libc/stdbit/stdc_first_leading_one.c +++ b/newlib/libc/stdbit/stdc_first_leading_one.c @@ -7,6 +7,8 @@ #include #include +#include "stdbit_internal.h" + unsigned int stdc_first_leading_one_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_first_leading_zero.c b/newlib/libc/stdbit/stdc_first_leading_zero.c index e6609b51b..4e3d29002 100644 --- a/newlib/libc/stdbit/stdc_first_leading_zero.c +++ b/newlib/libc/stdbit/stdc_first_leading_zero.c @@ -7,6 +7,8 @@ #include #include +#include "stdbit_internal.h" + unsigned int stdc_first_leading_zero_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_first_trailing_one.c b/newlib/libc/stdbit/stdc_first_trailing_one.c index 22972758d..23d2329ea 100644 --- a/newlib/libc/stdbit/stdc_first_trailing_one.c +++ b/newlib/libc/stdbit/stdc_first_trailing_one.c @@ -6,6 +6,8 @@ #include +#include "stdbit_internal.h" + unsigned int stdc_first_trailing_one_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_first_trailing_zero.c b/newlib/libc/stdbit/stdc_first_trailing_zero.c index 27395c697..248f8d99b 100644 --- a/newlib/libc/stdbit/stdc_first_trailing_zero.c +++ b/newlib/libc/stdbit/stdc_first_trailing_zero.c @@ -7,6 +7,8 @@ #include #include +#include "stdbit_internal.h" + unsigned int stdc_first_trailing_zero_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_has_single_bit.c b/newlib/libc/stdbit/stdc_has_single_bit.c index a448464b0..9a235c023 100644 --- a/newlib/libc/stdbit/stdc_has_single_bit.c +++ b/newlib/libc/stdbit/stdc_has_single_bit.c @@ -7,6 +7,8 @@ #include #include +#include "stdbit_internal.h" + bool stdc_has_single_bit_uc(unsigned char x) { diff --git a/newlib/libc/stdbit/stdc_leading_ones.c b/newlib/libc/stdbit/stdc_leading_ones.c index 79d3ec7f2..c7ab75b98 100644 --- a/newlib/libc/stdbit/stdc_leading_ones.c +++ b/newlib/libc/stdbit/stdc_leading_ones.c @@ -8,8 +8,10 @@ #include #include +#include "stdbit_internal.h" + /* Avoid triggering undefined behavior if x == 0. */ -static_assert(UCHAR_WIDTH < UINT_WIDTH, +_Static_assert(UCHAR_WIDTH < UINT_WIDTH, "stdc_leading_ones_uc needs UCHAR_WIDTH < UINT_WIDTH"); unsigned int @@ -21,7 +23,7 @@ stdc_leading_ones_uc(unsigned char x) } /* Avoid triggering undefined behavior if x == 0. */ -static_assert(USHRT_WIDTH < UINT_WIDTH, +_Static_assert(USHRT_WIDTH < UINT_WIDTH, "stdc_leading_ones_us needs USHRT_WIDTH < UINT_WIDTH"); unsigned int diff --git a/newlib/libc/stdbit/stdc_leading_zeros.c b/newlib/libc/stdbit/stdc_leading_zeros.c index 2fdf64ec9..dba6a14e2 100644 --- a/newlib/libc/stdbit/stdc_leading_zeros.c +++ b/newlib/libc/stdbit/stdc_leading_zeros.c @@ -8,8 +8,10 @@ #include #include +#include "stdbit_internal.h" + /* Offset must be greater than zero. */ -static_assert(UCHAR_WIDTH < UINT_WIDTH, +_Static_assert(UCHAR_WIDTH < UINT_WIDTH, "stdc_leading_zeros_uc needs UCHAR_WIDTH < UINT_WIDTH"); unsigned int @@ -21,7 +23,7 @@ stdc_leading_zeros_uc(unsigned char x) } /* Offset must be greater than zero. */ -static_assert(USHRT_WIDTH < UINT_WIDTH, +_Static_assert(USHRT_WIDTH < UINT_WIDTH, "stdc_leading_zeros_us needs USHRT_WIDTH < UINT_WIDTH"); unsigned int diff --git a/newlib/libc/stdbit/stdc_trailing_ones.c b/newlib/libc/stdbit/stdc_trailing_ones.c index c1a0e6b99..0f7ccb553 100644 --- a/newlib/libc/stdbit/stdc_trailing_ones.c +++ b/newlib/libc/stdbit/stdc_trailing_ones.c @@ -8,8 +8,10 @@ #include #include +#include "stdbit_internal.h" + /* Avoid triggering undefined behavior if x == ~0. */ -static_assert(UCHAR_WIDTH < UINT_WIDTH, +_Static_assert(UCHAR_WIDTH < UINT_WIDTH, "stdc_trailing_ones_uc needs UCHAR_WIDTH < UINT_WIDTH"); unsigned int @@ -19,7 +21,7 @@ stdc_trailing_ones_uc(unsigned char x) } /* Avoid triggering undefined behavior if x == ~0. */ -static_assert(USHRT_WIDTH < UINT_WIDTH, +_Static_assert(USHRT_WIDTH < UINT_WIDTH, "stdc_trailing_ones_uc needs USHRT_WIDTH < UINT_WIDTH"); unsigned int diff --git a/newlib/libc/stdbit/stdc_trailing_zeros.c b/newlib/libc/stdbit/stdc_trailing_zeros.c index 6213f62cf..396333e17 100644 --- a/newlib/libc/stdbit/stdc_trailing_zeros.c +++ b/newlib/libc/stdbit/stdc_trailing_zeros.c @@ -8,8 +8,10 @@ #include #include +#include "stdbit_internal.h" + /* Ensure we do not shift 1U out of range. */ -static_assert(UCHAR_WIDTH < UINT_WIDTH, +_Static_assert(UCHAR_WIDTH < UINT_WIDTH, "stdc_trailing_zeros_uc needs UCHAR_WIDTH < UINT_WIDTH"); unsigned int @@ -19,7 +21,7 @@ stdc_trailing_zeros_uc(unsigned char x) } /* Ensure we do not shift 1U out of range. */ -static_assert(USHRT_WIDTH < UINT_WIDTH, +_Static_assert(USHRT_WIDTH < UINT_WIDTH, "stdc_trailing_zeros_uc needs USHRT_WIDTH < UINT_WIDTH"); unsigned int From patchwork Thu Apr 16 21:00:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 133223 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 9645C4C91764 for ; Thu, 16 Apr 2026 21:03:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9645C4C91764 X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by sourceware.org (Postfix) with ESMTPS id B8A6C4C9175D for ; Thu, 16 Apr 2026 21:01:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B8A6C4C9175D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B8A6C4C9175D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.179 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373293; cv=none; b=xWZsjsOYlbIvo3iVmxmtEaacTVwOA9aur8UM7ygLKBcHtlkp/SN4QsjmuEHHp8PY4m4x6JKgrYfceaCBFDlVlQJVBbsZ6/l0xf7CDqeysRisazN7mD+2KB1m1ZNPqWgMqFSc84TiK5R6mk+XPXTp4oNCl0Kyy//yojECFicHnNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373293; c=relaxed/simple; bh=1hELxSzPGEUJhoW2AlBJgaW29DrlNoavQR2HBmuWSPo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=SfF3w72T7TUBxxIpfzL1SlnCDU1FWVd2H+kY3XyRedQQ+hBP6SyegWkKMp/uQD/xtaC2iHH6BJIixb/CKyAgmOzPqso3cGMb0895vlhok/krEpfUr/RI+zKBAUXtTOFLRabayrMTVboxMUjRf2zgkQ+Og7RU0oznbmJz5Vbcr+E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8A6C4C9175D Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-79885f4a8ffso91167307b3.3 for ; Thu, 16 Apr 2026 14:01:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776373292; x=1776978092; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YnrdwTQ+KUhL4uWF0ZyIfjDkr7ieyJNIZCzlIA8UFPo=; b=pGI544hHFCWkNqmtaHVCYM/Q7QOlT9CBX29MFIy+iwLvlyzR2RUhmuUacBFOoBd7h/ lKntarpjQEN1xiwKS0HPTww+9GQ+kMgp1ate4QoD4AffZdwZMDxsfoPGGOTz1yvoMrzR estxJwNxKoHRrg+1QgJVO3FDJCKgmoLKgU+/S0oDbytACmT3OVXDSb+8ZIa8BCnMQGG2 xd2dB01/F1u4Ml9Z1UmP84JltiPkBwDU1uLUcI5zqXopWcsAtMh/wzZzT5jvEps3WJYe goJdlu5UHpwIgQlyL7UhERhDxsvCLg+z/lC/as1oeOfBpTG0YXiPo/0kVp0gPggJy9FU eaww== X-Gm-Message-State: AOJu0YyVQw1qg71WwTHrwfSx/+Q3XD1MWmPl7pAhR8y2V+5sksnrUnog lT1yR/g4dFkjaX9+YNtDpj1I9KO3Ea8J4LhsmZC6dHuNW71j3HaQIrUipOUSwmde X-Gm-Gg: AeBDievoQVDtRzpyrFQeFffDncFSWeVEnv8yAzCsPD5kpspufJ4TOHSRmk45vBj+6uT RumULKa8SmrmYWbFkSZxq+1f78TY0GvNlW79Cx3WeQ9u8u55LFOmkk1R3K8JuYWypOgQV0Qmqbt +dYvRFHKBnJ6qbhQLc74tO4Ug8tY0kUV2xDt5ctswWXrJcjF9EnfwsIPFnrYZK4RQmbTkFyLI4B WAFQMxeXc8/psXlwjAjea8SD4fvIh0pj3bAgqjLz3Q9B1wZTZ/hOuvioWU5DBulQPe7V5hS2vOE dsx5mRSSoW/TMAiaCTI5VrhjBoawbma7jSoSeCCwLac+qvBuhgpENf+SFDndF9gByAUxy5nldAI yj1CSGRTbjJhlnGO73duLs8bZGEmZU0D4e+lYUQPzycicAuDMF4guOiR9CwCxF59eGHY5Fg/xZU pSHrDaStFgZ7pzX4YasnhDHZeisjpyYLJ3ihRNHnW1nMBHbbkwz/WCLkLRDWFvFNbn3SwMmsBP X-Received: by 2002:a05:690c:398:b0:79a:bdac:adf with SMTP id 00721157ae682-7b9ecec36ddmr1914657b3.14.1776373291977; Thu, 16 Apr 2026 14:01:31 -0700 (PDT) Received: from gitlab.oarcorp.com (d27-96-189-151.evv.wideopenwest.com. [96.27.151.189]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7b76931854esm28916287b3.37.2026.04.16.14.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2026 14:01:29 -0700 (PDT) From: Joel Sherrill To: newlib@sourceware.org Cc: Joel Sherrill Subject: [PATCH v3 5/6] libc/sys/rtems/crt0.c: _arc4random_getentropy_fail should not return Date: Thu, 16 Apr 2026 16:00:46 -0500 Message-ID: <20260416210047.2198615-6-joel@rtems.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260416210047.2198615-1-joel@rtems.org> References: <20260416210047.2198615-1-joel@rtems.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3036.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org GCC now detects that the stub did return. Added while (1) to address the warning. --- newlib/libc/sys/rtems/crt0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c index 67f9d7302..f9c5ab951 100644 --- a/newlib/libc/sys/rtems/crt0.c +++ b/newlib/libc/sys/rtems/crt0.c @@ -73,7 +73,7 @@ RTEMS_STUB(void, _Libatomic_Unlock_n(void *ptr, __size_t n), { }); /* Stubs for routines for arc4random (from and */ RTEMS_STUB(int, getentropy(void *ptr, __size_t n), { return -1; }); -RTEMS_STUB(void, _arc4random_getentropy_fail(void), { }); +RTEMS_STUB(void, _arc4random_getentropy_fail(void), { while(1) ; }); #if defined(__GNUC__) /* From patchwork Thu Apr 16 21:00:47 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 133222 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id AE9DC4AA2999 for ; Thu, 16 Apr 2026 21:03:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE9DC4AA2999 X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by sourceware.org (Postfix) with ESMTPS id 192C84AA51BA for ; Thu, 16 Apr 2026 21:01:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 192C84AA51BA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 192C84AA51BA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.179 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373296; cv=none; b=cpESZvY8S24LTdBJ1+/1X8fguCH/uo2bv39xO095I0O32iSylKQbTp/OF+v8qVhtpdr4iTCvskcMqpnFOAi94yjPmK2/uX2WIWJp5OqAQz0snDN757tNbhLnPruV+JbyLUJpEnqV0nq0W0Ia1obJXTUQG2NkF7A/ObFRSXiB8+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776373296; c=relaxed/simple; bh=MkiEwAk/olDHNVMrFHHIBdpIFg9uXnTIP+/LtcRyczg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=LNwws/IcMuLG67NMCghyf3xVvaUjMHBs79hSrEsTyOOUzdXJ94WmLXKT2ZFdxeWJEbWiMIFiC7VFcmsuvQBQDbgc3FAnuXNnEFXZ58ETyzzcsQ1inJtLB3vSZcaYPJudiiatwNxk+fs/mUPkbbhqUW2aI3SewP+jytZmoL4sTq4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 192C84AA51BA Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-79495b1aaa7so90349717b3.1 for ; Thu, 16 Apr 2026 14:01:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776373294; x=1776978094; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=f8vz0pwYmqbDJepGqKMPCpgGo9PIuh2hMHZ6vhByZFI=; b=nDwONLCWfl8e4kaRywb2ufvd3jMSUZqw8O3s59Es8d5owLWWx3D8eET68ThlynujTX ztR0jmy9tIUGPbDAgeJl1BCyQCZSoKxuN+7MXj6w2010SR+o/ZrhJGtjNc5L5+hyue6M CSBfrHSZzUwx1qsUgBMIuAGSRKmn0IGZZgkheALHtNtR5kv0wY/b1Qowzj2wVHMgyobD gxTg5+V+ofPpCZFO+PYte7QCL8HrRPhfU2pA57Pr8v1JzCNnXZa8WwUAR4UDtwj9oUxC /Czhn0u4KlPImdFIJCEFsRGF09KX/w3CYgcaw3hWMSY+EwJH9Qc8voJcZZivT9D2Xadw p6bQ== X-Gm-Message-State: AOJu0YwPCZYLIzIP1wNYs53Z28y/+fJ6Qp784fSQ55f6X89CzXmG0SPO +c70RhMzaj8Aj6s1954PQgHXCkl5VADOi8DX1zypHLg99dJ7BPEksugMMtF01b/B X-Gm-Gg: AeBDiesoiFJ9sBvoVN0J4SIKlH+ZogHv+V7wFMZs8vPE5E052QGOtwxhPlF3//Feg/f 645b3hh6+DUDlcFCMtHuyzRHAEfBrfUkbsyJkrNGzGzt0uNHZ7X4fadJ5igHPLTmFfVIk06PIrw 468JTR2/U8BT/vUVaJMVNWITv7KcxfZJTJNhS6tYVj/3/9wjOxZhHq21LC6naPHfYFlpO307Tu4 QywkGjKScnpHOavAbdsYajcS6wHtedTMAF8eCrQ0WZp1Ee+gh9VP16qAYjfhYjm+/R327q3Qg/Z cq6xNmsZ+lt4jryxXPI+VclAP6qXyXy1e6z84LuIm8LXmzZQ99nKpZnUs9vCBnJtrOBzC62O9/y NVrYLn4b8leTafwXaHw/jlQHTEUAZZGmi5gkW9XPMZtby/9i2ZBYMI4O0JtR7Y6yAlyhic3uNHf RxVHYpQdmZy5HAMua9usax57wFWUvnodAmFSdXoV/FlehGkbmMUhhtF4wH85xd2Am77xVuDDh/e +9Jrg/2nE0= X-Received: by 2002:a05:690c:6d84:b0:79e:b3aa:b352 with SMTP id 00721157ae682-7b9ecf8a2e8mr1533737b3.31.1776373294414; Thu, 16 Apr 2026 14:01:34 -0700 (PDT) Received: from gitlab.oarcorp.com (d27-96-189-151.evv.wideopenwest.com. [96.27.151.189]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7b76931854esm28916287b3.37.2026.04.16.14.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2026 14:01:32 -0700 (PDT) From: Joel Sherrill To: newlib@sourceware.org Cc: Joel Sherrill Subject: [PATCH v3 6/6] cygwin.din, version.h: Add stdbit.h functions and increment minor Date: Thu, 16 Apr 2026 16:00:47 -0500 Message-ID: <20260416210047.2198615-7-joel@rtems.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260416210047.2198615-1-joel@rtems.org> References: <20260416210047.2198615-1-joel@rtems.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3036.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org Incremented CYGWIN_VERSION_DLL_MINOR to 1 after adding C23 stdc_* functions from stdbit.h. --- winsup/cygwin/cygwin.din | 70 ++++++++++++++++++++++++++ winsup/cygwin/include/cygwin/version.h | 2 +- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din index 76477bb4a..caa9a3987 100644 --- a/winsup/cygwin/cygwin.din +++ b/winsup/cygwin/cygwin.din @@ -1458,6 +1458,76 @@ sscanf SIGFE stat SIGFE statfs SIGFE statvfs SIGFE +stdc_bit_ceil_uc NOSIGFPE +stdc_bit_ceil_ui NOSIGFPE +stdc_bit_ceil_ull NOSIGFPE +stdc_bit_ceil_ul NOSIGFPE +stdc_bit_ceil_us NOSIGFPE +stdc_bit_floor_uc NOSIGFPE +stdc_bit_floor_ui NOSIGFPE +stdc_bit_floor_ull NOSIGFPE +stdc_bit_floor_ul NOSIGFPE +stdc_bit_floor_us NOSIGFPE +stdc_bit_width_uc NOSIGFPE +stdc_bit_width_ui NOSIGFPE +stdc_bit_width_ull NOSIGFPE +stdc_bit_width_ul NOSIGFPE +stdc_bit_width_us NOSIGFPE +stdc_count_ones_uc NOSIGFPE +stdc_count_ones_ui NOSIGFPE +stdc_count_ones_ull NOSIGFPE +stdc_count_ones_ul NOSIGFPE +stdc_count_ones_us NOSIGFPE +stdc_count_zeros_uc NOSIGFPE +stdc_count_zeros_ui NOSIGFPE +stdc_count_zeros_ull NOSIGFPE +stdc_count_zeros_ul NOSIGFPE +stdc_count_zeros_us NOSIGFPE +stdc_first_leading_one_uc NOSIGFPE +stdc_first_leading_one_ui NOSIGFPE +stdc_first_leading_one_ull NOSIGFPE +stdc_first_leading_one_ul NOSIGFPE +stdc_first_leading_one_us NOSIGFPE +stdc_first_leading_zero_uc NOSIGFPE +stdc_first_leading_zero_ui NOSIGFPE +stdc_first_leading_zero_ull NOSIGFPE +stdc_first_leading_zero_ul NOSIGFPE +stdc_first_leading_zero_us NOSIGFPE +stdc_first_trailing_one_uc NOSIGFPE +stdc_first_trailing_one_ui NOSIGFPE +stdc_first_trailing_one_ull NOSIGFPE +stdc_first_trailing_one_ul NOSIGFPE +stdc_first_trailing_one_us NOSIGFPE +stdc_first_trailing_zero_uc NOSIGFPE +stdc_first_trailing_zero_ui NOSIGFPE +stdc_first_trailing_zero_ull NOSIGFPE +stdc_first_trailing_zero_ul NOSIGFPE +stdc_first_trailing_zero_us NOSIGFPE +stdc_has_single_bit_uc NOSIGFPE +stdc_has_single_bit_ui NOSIGFPE +stdc_has_single_bit_ull NOSIGFPE +stdc_has_single_bit_ul NOSIGFPE +stdc_has_single_bit_us NOSIGFPE +stdc_leading_ones_uc NOSIGFPE +stdc_leading_ones_ui NOSIGFPE +stdc_leading_ones_ull NOSIGFPE +stdc_leading_ones_ul NOSIGFPE +stdc_leading_ones_us NOSIGFPE +stdc_leading_zeros_uc NOSIGFPE +stdc_leading_zeros_ui NOSIGFPE +stdc_leading_zeros_ull NOSIGFPE +stdc_leading_zeros_ul NOSIGFPE +stdc_leading_zeros_us NOSIGFPE +stdc_trailing_ones_uc NOSIGFPE +stdc_trailing_ones_ui NOSIGFPE +stdc_trailing_ones_ull NOSIGFPE +stdc_trailing_ones_ul NOSIGFPE +stdc_trailing_ones_us NOSIGFPE +stdc_trailing_zeros_uc NOSIGFPE +stdc_trailing_zeros_ui NOSIGFPE +stdc_trailing_zeros_ull NOSIGFPE +stdc_trailing_zeros_ul NOSIGFPE +stdc_trailing_zeros_us NOSIGFPE stime SIGFE stpcpy NOSIGFE stpncpy NOSIGFE diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 695477bec..67eb23d06 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -11,7 +11,7 @@ details. */ changes to the DLL and is mainly informative in nature. */ #define CYGWIN_VERSION_DLL_MAJOR 3007 -#define CYGWIN_VERSION_DLL_MINOR 0 +#define CYGWIN_VERSION_DLL_MINOR 1 /* CYGWIN_VERSION_DLL_COMBINED gives us a single number representing the combined DLL major and minor numbers. */