Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp221106oof; Mon, 24 Sep 2018 19:20:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV60m9GfnJTTbG8ReADBcxhvmR8QCwbsawUWvqdx/4VyiejMg3FoljkD/SVU2dxv0A/01OsGY X-Received: by 2002:a63:1224:: with SMTP id h36-v6mr1262131pgl.120.1537842029455; Mon, 24 Sep 2018 19:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537842029; cv=none; d=google.com; s=arc-20160816; b=oOdA1CWkeXjVnbkCfRSHxUoTct+tXrPG7FEOG6rbi/vhMMfvrd59wrOcG3l3JzRemH GQFk3LJkZex9Tff/GqXCSBzt2Izk+jERSUzea6X5z1m1irAJoLWk35N1aAupixIgFHvi mko8OxmgxDS20kyEaIQrr9nK5n5F3QntjIsLWw1GcB0FEh9xPV+hgtJoo7deEloBc9Si +O/8BdN/xzSx+7mBfyCwp2aGnY+qg11C9bcWCKRpRKU4MbwhyiMEIc3vHa/E35/c+BQs tO5NMUM/R7XtqjqFYls/YyKi+y/gjmnMV/yQHHRo5cL2fv8ypkZIHSTxx5M1EpQk6rg2 /HUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ats3+gpwbZ5gzRUR6x1QFognv12Bup3QDkm7l/izQDE=; b=CaK2yG3huHSJIodSYEPdCf/UqzdymL9yOJzwBV5OACtU4jL/MBQJKLBGqrgLG51ebJ e4OmU7PK9OC9Nschk1VdEDNxgdWreqL0Z+vbeUD9MwzvZchmj/dhhmp9CuMx070mkqma 6W54oe7x+DYYugFOGnNWO8yd85vZaTFiX0mAiqY1YOdhPBKZmb5tI6o/70SrK4TsO+y5 ivdVLOO0138krxlYWt81aD/luleCl8CrgTy1MnlOWu994LXO7M2lXfiOqbxoRy1GMac6 8yzrSl0rMjWc2SZBnjl7PIjtoL1VloC3Zyq9oFfXC8rigeh1DvyQh2pLCPtIxTiAnl6b g5ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C5IIXnst; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si958134pld.394.2018.09.24.19.20.12; Mon, 24 Sep 2018 19:20:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C5IIXnst; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbeIYIZR (ORCPT + 99 others); Tue, 25 Sep 2018 04:25:17 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:37608 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbeIYIZR (ORCPT ); Tue, 25 Sep 2018 04:25:17 -0400 Received: by mail-io1-f68.google.com with SMTP id v14-v6so19272483iob.4 for ; Mon, 24 Sep 2018 19:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ats3+gpwbZ5gzRUR6x1QFognv12Bup3QDkm7l/izQDE=; b=C5IIXnstkqMWL8n+UDcgE4W3LDFlLPyAk/KqIBISFWhKu21RNf4M6NvLz+WKFS/IQN CPJyxh+MJb4q89RpvUzpuBrqxJAfogtnreGy4MdIOFpSKVK9ztL+ticn4ur2uLAKTS7+ mAusmeCupu6j1aPbYN9Jd/R0WGwlE6j0tmIjyXdEy+5awukMfYXrrBEUfYVRF9Mwi+mH 0OsOzooKqZtT2lVjzSEflctKifs4oSBjU2fdTWVRxPyYg5FTprhOr1PszooQyzwg8Vgu vT+6i/n4GhEPk6vjILSv65ua52FDxCaKvAsy8mfdk4/MIrqB7pVOmRlD1ZT3HZNALR8P HIYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ats3+gpwbZ5gzRUR6x1QFognv12Bup3QDkm7l/izQDE=; b=R6QX2INItKuMTed1Jt5qFhHIceUzJbeC9pdUTJftpY33XaIkhF1fXACFx3XjupxfbX BuhTX2ZUeWwbisMlSMal7WZ3dYQg5BSRkzt+p3E1U5BFodQrB2/MoGD2z7wTmkZ94/3O sydYls8XNDAD7AZDJOyy8WewX8O122urlJviWvq2kB8EI3rL9I5b8L1nHa+Rbtz+QzkY xXVS42E8hurPMTjnF3G1zogZYl0blWDS+UT080vsmtmNDUJgr8AnVtwypF+GWl68eal6 keKFMY5TEX6hgKuEgYwx6Pp1HvWxrOAtX+es1bZ7fXOzU5ufZaLs0PtkEdDAQAATXo9S KlEQ== X-Gm-Message-State: ABuFfojMPpGR0eeEkiImQlHHgyMaFkJSfx40gd4tJlqF/T9x18zy4fnO BUNWV11IlKJkkCGXDsbL6tiqA6udBoAKOmsWleA= X-Received: by 2002:a6b:9ace:: with SMTP id c197-v6mr1348095ioe.63.1537842006814; Mon, 24 Sep 2018 19:20:06 -0700 (PDT) MIME-Version: 1.0 References: <2ccc6c0758624dbb22f6fe451a3e476a000108ef.1537260207.git.zongbox@gmail.com> <20180921070006.GC8401@infradead.org> In-Reply-To: <20180921070006.GC8401@infradead.org> From: Zong Li Date: Tue, 25 Sep 2018 10:19:55 +0800 Message-ID: Subject: Re: [PATCH 3/5] lib: Add umoddi3 and udivmoddi4 of GCC library routines To: hch@infradead.org Cc: palmer@sifive.com, aou@eecs.berkeley.edu, vincentc@andestech.com, zong@andestech.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christoph Hellwig =E6=96=BC 2018=E5=B9=B49=E6=9C=8821= =E6=97=A5 =E9=80=B1=E4=BA=94 =E4=B8=8B=E5=8D=883:00=E5=AF=AB=E9=81=93=EF=BC= =9A > > On Tue, Sep 18, 2018 at 05:19:15PM +0800, Zong Li wrote: > > Add umoddi3 and udivmoddi4 support for 32-bit. > > This probably wants a better explanation of why you need them. > > > index 0000000..69f2d36 > > --- /dev/null > > +++ b/lib/udivmoddi4.c > > @@ -0,0 +1,291 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > Who wrote this code, where does it come from? The RV32 need the umoddi3 to do modulo when the operands are long long type, like other libraries implementation such as ucmpdi2, lshrdi3 and so on. I encounter the undefined reference 'umoddi3' when I use the in house dma driver, although it is in house driver, but I think that umoddi3 is a common function for RV32. The udivmoddi4 and umoddi3 are copies from libgcc in gcc. There are other functions use the udivmoddi4 in libgcc, so I separate the umoddi3 and udivmoddi4 for flexible extension in the future.