From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA5C527442 for ; Mon, 16 Feb 2026 22:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771280184; cv=none; b=NDNF+XOTu5hjqlDfKwG9wQiHWc4bjt/AsMWoM43sfc8XL+oc/YPLyp9O4GFKFFIDqiyMTAdAIelwO2L2pEkoqd6lCVVjWiChA3Ok6qZ4PVCC4HjJpuQQKqam+fYNfrpe7w101AXlNEAzgF6wqKP0J+I0qEa98dzaISpCORJJUnc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771280184; c=relaxed/simple; bh=5kXkSMl9iBE/EFdo4MNBtjoJDahI1huppUlMp3Rqru4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t4oXvMGwlVRH0LNaWeSBBT8c1nf2fzo+d77DAPXOckmpzkZmESizvTRCAkxdo5umF5NWfYNVwN4E1k+YNVmmJcziqhY9ZCt9nG7uKBHH0p6/ccdw7Hy4ekmSwuDCF+vC0vnate8DXjo9EnfllajKTtGC4qWbgvIz2TOZMUD5YNc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LXa61xo+; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LXa61xo+" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-4376c0bffc1so2733546f8f.0 for ; Mon, 16 Feb 2026 14:16:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771280182; x=1771884982; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=yXR0ypxyr5sIpmM1tGovgK474LWacV/rglsWghiRzHE=; b=LXa61xo+uHKR5JaWGLiUQZQgHtdnruKzQT5RrGC9/RpCqLYzpFknz02GS79+s9BgMW mMWsPbt6qbwBxnJOfCWhCPfIaJ4Hq7rQmSFNthaAqNbkruDPDWmo0G9ubSz/QIVDGjd7 NyNsnPG3Uep0wd8H6QgSmvdWShT3PYWaJ430FNqMivJeD1XdDU6pWS/3rYGfjPQKmLPy KZ8qcSQEJDnbf5ds6gWPimLq28tmRsA5gFfrciWOnX/4bYD9s+Sh5kmyVBZmFZjVGG/I FLV2lSwTME493SYAFLBn4bZPNs1ZF/ExQYsuXRA/CWLOl2Ergl6ONmvcedaMdtwqugEA +foA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771280182; x=1771884982; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=yXR0ypxyr5sIpmM1tGovgK474LWacV/rglsWghiRzHE=; b=m5Ua6gOzTCS4gbxqClZiBjK9/npL2otimlEI91X+CPW/XW71yqM+ie3KYdxJkSg8to Ng9KkkvnC0E67L0b/PPhaHIL+ZjNUFJvUuIBud8QWNuoSyfW+XBKE5YwjqyG+YpFkvQi 18SlaRMp5k2XWlc1ESt3ktzMGB2AKKgEswNcqJa6peDy+tpUrV4neGf3/AtbJiY4nLPs HgIA4/nUVmH/H1D0LQxVO//4P8ZBU1hbQ/JwfsDv9xo1BcCR4+8ToeMD1vWunco8faKk iGmQiPP1GvmcWyDYH7jh9OgK+Uo/mGemvywk6+nyppxf9AYR3tsBqXFjYq69RlRpZaXc 4tZA== X-Forwarded-Encrypted: i=1; AJvYcCUrDWTW1z7FFX9RrgxWwIA2iAVUT81ZwSfc/r/MWN/hfw8SKBBW0j1DxKCxJHnYmnYaM7wwv1ruKd7l5NI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2r7bWQQCfOgdLU34hc1bjNVeKfrSytCKWnG5pdoyU0ORC8hXd qKoGroYinsgZ0i5t0pE4iVG1LY8DUamXSvDNcr/yxyFncfLuO+wHGZWJ X-Gm-Gg: AZuq6aKfwUFIkVrFGyPFuHaS5J2Z+g7o6emmsAVU1uQZnkgCQ5tLRtSkAR+nsyk/mpl UCrHIxhzWDcvzglmx5DH0PQY9jBZpTMDerj7cZPef7pLVGwjEZkSIJERUUpQy6PU4hL67k1Ycd3 XWSBJjm/JsQSneu3we14EEhP55zKv2XxmsBd4hayYxMS6sz5vSDBLS/5JPshhE6YhygMadYMS5L 7775pC+00U/oDHW0yC/wZ5/l+FYTBLOWCgJO4mE+s3macNuBJ0PZeI0sOm9q60e8z+/BdfODDCU kU+fsPXwZaxxHCg5JAUDopwex4Nrx2MgsbYpfL8szeNk9aOAIlWOCqHzTM1vxGPZXsP4xAsCAUb yTR2zqzqDhhAMqTYgN9Rvjp4DoZ6d6T8IYV1p8Rf2a4S4pOCJi65/KbtpN18/+1cmK6TIy1LPQ5 /4fxFswjwOEArPQXzL4YwUtE96Rcwl+j4L6q4w2fhF6cos1hDmBm9XpA+hnOnPwV+h X-Received: by 2002:a05:6000:220d:b0:432:84f9:8bf9 with SMTP id ffacd0b85a97d-4379792c687mr20253817f8f.57.1771280181775; Mon, 16 Feb 2026 14:16:21 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43796a6c1bfsm31978120f8f.13.2026.02.16.14.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Feb 2026 14:16:21 -0800 (PST) Date: Mon, 16 Feb 2026 22:16:20 +0000 From: David Laight To: Thomas =?UTF-8?B?V2Vpw59zY2h1aA==?= Cc: Willy Tarreau , linux-kernel@vger.kernel.org, Cheng Li Subject: Re: [PATCH v2 next] tools/nolibc: Optimise and common up the number to ascii functions Message-ID: <20260216221620.449678f4@pumpkin> In-Reply-To: <5e0ce1ac-a5a8-4a3b-ad11-97d2cf6076bc@t-8ch.de> References: <20260208195308.4074-1-david.laight.linux@gmail.com> <20260213110859.5bff4705@pumpkin> <5e0ce1ac-a5a8-4a3b-ad11-97d2cf6076bc@t-8ch.de> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 16 Feb 2026 19:46:12 +0100 Thomas Wei=C3=9Fschuh wrote: > On 2026-02-13 11:08:59+0000, David Laight wrote: > > On Sun, 8 Feb 2026 19:53:08 +0000 > > david.laight.linux@gmail.com wrote: > > =20 > > > From: David Laight > > >=20 > > > Implement u[64]to[ah]_r() using a common function that uses multiply > > > by reciprocal to generate the least significant digit first and then > > > reverses the string. =20 > >=20 > > Self-nak on this version :-( > >=20 > > The division code can end up generating a negative remainder for > > very large values (probably only ones over 1<<63). =20 >=20 > Ok. Maybe some tests for these edgecases are in order, too. > Do you want to add them? The problem is I'm not sure how to decide where they are. The v1 patch is fine, it expects to get a large remainder and then fixes up the error. I could make the code just work for 8, 10 and 16 - but that is 'wimping out= '. David >=20 >=20 > Thomas