From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE18AC48BCD for ; Wed, 9 Jun 2021 18:31:14 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E895F613D5 for ; Wed, 9 Jun 2021 18:31:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E895F613D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DEB1782E2F; Wed, 9 Jun 2021 20:31:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="p9Xx9zen"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E090F82ECD; Wed, 9 Jun 2021 20:31:09 +0200 (CEST) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4DDAE82D73 for ; Wed, 9 Jun 2021 20:31:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x832.google.com with SMTP id g12so6453746qtb.2 for ; Wed, 09 Jun 2021 11:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3EZmrIRzBbqJVJ0/HT29XmX1ctbGHvfn0dnAJRWfJaw=; b=p9Xx9zen3J5vnoxMvaAr8emSO0LokLfauh5y8SOyfoYgrWMp/2lhWQBZz+GsES1YRb g29aBNxzJS5ID6VJCL8baLMd78l3PTupoWnOHg/dIQo43Ttf8K94P6Tp/N/h8iC8aHP3 Rg8RyCZX+H257vxod3NPtCxqzxshjATITsBJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3EZmrIRzBbqJVJ0/HT29XmX1ctbGHvfn0dnAJRWfJaw=; b=V7sUmXyyiHiZ3wekqjq9+9BqrdkZWHooE4nvi4D1thqRyE0RI+AyFyz6EjAfF5zdV8 5DXaw+VhA4Lw+/Vuk8dQzuW9cda+izcghD/H51tIb/rS8ej9UARMQkiccpih4rlgcXz4 tLKNrVEjyjHrwlnUGHiOsUbM+NRbHUkHDkV//wtZrEiti0SE61jo4/3a36QXytDKkDNY lmJw6kMoQsD/3Gbt+mIiUR+Qn+qPY4JA7xdfZ5uqpsraTLwKrGyaNG6066y4ozHgBWKn SKqhqJJOFfACMHwz0VQFGEv7WS+Lor+hfm2nbuAioHdfVUGYmWtgsL5ygX0xxNX9I5SU VJ2g== X-Gm-Message-State: AOAM532rf6S6eCUNMWbPDmV2GrblllZBEzdYvDEiujLUnJVfSvTDhRUr GheK+jvAFEl7qkWhUw+3jB+XjbppxlxkNg== X-Google-Smtp-Source: ABdhPJxCoOrCdjbWAtHO309PNKNedSBfSAy+y9l5iSptqFtqvL/ri5J8PsSLSBCOQeUShbOm1TbUJQ== X-Received: by 2002:ac8:5481:: with SMTP id h1mr1297487qtq.206.1623263466071; Wed, 09 Jun 2021 11:31:06 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-4157-2a7b-ef5c-df25.res6.spectrum.com. [2603:6081:7b01:cbda:4157:2a7b:ef5c:df25]) by smtp.gmail.com with ESMTPSA id c9sm652562qke.8.2021.06.09.11.31.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jun 2021 11:31:05 -0700 (PDT) Date: Wed, 9 Jun 2021 14:31:03 -0400 From: Tom Rini To: Christian Melki Cc: u-boot@lists.denx.de Subject: Re: [PATCH] Add udivmoddi4. Message-ID: <20210609183103.GK9516@bill-the-cat> References: <20210607092047.13246-1-christian.melki@t2data.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="te9Bkl2b4W0C+FfQ" Content-Disposition: inline In-Reply-To: <20210607092047.13246-1-christian.melki@t2data.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean --te9Bkl2b4W0C+FfQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 07, 2021 at 11:20:47AM +0200, Christian Melki wrote: > A newer toolchain will emit udivmoddi4 for certain divide + modulo > operations instead of a separate divide and modulo operation. > AFAIU, this would be sufficient. >=20 > Signed-off-by: Christian Melki > --- > arch/x86/lib/div64.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/arch/x86/lib/div64.c b/arch/x86/lib/div64.c > index 2bea205f60..a5b536fbc5 100644 > --- a/arch/x86/lib/div64.c > +++ b/arch/x86/lib/div64.c > @@ -110,3 +110,8 @@ u64 __umoddi3(u64 num, u64 den) > _64bit_divide(num, den, &v); > return v; > } > + > +u64 __udivmoddi4(u64 num, u64 den, u64 *rem) > +{ > + return _64bit_divide(num, den, rem); > +} How do you trigger this and should you not be using do_div(), etc, instead? --=20 Tom --te9Bkl2b4W0C+FfQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDBCOQACgkQFHw5/5Y0 tyzEpwv/f/+Ce+Fp685d2+fdL4rpe7Z5VGaMyeZ7OIY30msQDeAAtV99F7chEFIr 1TdfuGV1aCr2rfi6W8PteUoqeu08/MnP8RuyRWK2JCSQQsbJJAX838NC1Hm6RdvA qoNgauCbUYv5xj5AT695FLnEAHDQirpyv8Mr1ZbTE66UnDT49Mob0sbXiSn5OdLF 5YdYFDNGjgGKd6GDmom8z6RrE5xGie6yFBJwQPeSlkg7FWEZMQpnqb8CnQYaY9if L85nRaKe8UDMIy54Trqe379f/8w4a8vcsAh42HG6/gf6rs1tm5MClHjZ2OM5e973 yoCajFVjo3sSxGEhI97IzmyZEUDHvytz89AOZudFiA/79G16oxKAF+VDQtuq+JdQ F0DNVSnq10VCtzeiR4PuW3RyWLo4jZKrtnxOfopF+ro2ILgjHjeMh+I3rryS025I utZsE/HxXMwncO23qlxqRsk5DLAcHGwg6zI1sBL+IE+zdpHZ/OQG4oS58rVY33hJ KUs/y8W+ =NsKk -----END PGP SIGNATURE----- --te9Bkl2b4W0C+FfQ--