linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: schwab@suse.de (Andreas Schwab)
To: linux-riscv@lists.infradead.org
Subject: [PATCH 3/5] lib: Add umoddi3 and udivmoddi4 of GCC library routines
Date: Tue, 25 Sep 2018 09:20:25 +0200	[thread overview]
Message-ID: <mvmefdicabq.fsf@suse.de> (raw)
In-Reply-To: <CA+ZOyaiJv-NZWk3ec_3zhRTSn7G-NGgyaiPTXOmuWfTWD7KSJw@mail.gmail.com> (Zong Li's message of "Tue, 25 Sep 2018 10:19:55 +0800")

On Sep 25 2018, Zong Li <zongbox@gmail.com> wrote:

> 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.

You probably should use the macros from <asm/div64.h> instead.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

WARNING: multiple messages have this Message-ID (diff)
From: Andreas Schwab <schwab@suse.de>
To: Zong Li <zongbox@gmail.com>
Cc: vincentc@andestech.com, aou@eecs.berkeley.edu,
	zong@andestech.com, palmer@sifive.com,
	linux-kernel@vger.kernel.org, hch@infradead.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH 3/5] lib: Add umoddi3 and udivmoddi4 of GCC library routines
Date: Tue, 25 Sep 2018 09:20:25 +0200	[thread overview]
Message-ID: <mvmefdicabq.fsf@suse.de> (raw)
Message-ID: <20180925072025.w8Dbmi752pPz-oRltHg_ZurLqQqWaBpXjkAyoLey_0Y@z> (raw)
In-Reply-To: <CA+ZOyaiJv-NZWk3ec_3zhRTSn7G-NGgyaiPTXOmuWfTWD7KSJw@mail.gmail.com> (Zong Li's message of "Tue, 25 Sep 2018 10:19:55 +0800")

On Sep 25 2018, Zong Li <zongbox@gmail.com> wrote:

> 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.

You probably should use the macros from <asm/div64.h> instead.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2018-09-25  7:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  9:19 [PATCH 0/5] Fix some bugs on RV32 build fail and issue Zong Li
2018-09-18  9:19 ` [PATCH 1/5] RISC-V: Build tishift only on 64-bit Zong Li
2018-09-21  6:58   ` Christoph Hellwig
2018-09-25  2:33     ` Zong Li
2018-09-25  2:33       ` Zong Li
2018-09-18  9:19 ` [PATCH 2/5] RISC-V: Use swiotlb on RV64 only Zong Li
2018-09-21  6:59   ` Christoph Hellwig
2018-09-18  9:19 ` [PATCH 3/5] lib: Add umoddi3 and udivmoddi4 of GCC library routines Zong Li
2018-09-21  7:00   ` Christoph Hellwig
2018-09-25  2:19     ` Zong Li
2018-09-25  2:19       ` Zong Li
2018-09-25  7:20       ` Andreas Schwab [this message]
2018-09-25  7:20         ` Andreas Schwab
2018-09-26  7:12         ` Zong Li
2018-09-26  7:12           ` Zong Li
2018-09-25 15:25       ` Christoph Hellwig
2018-09-25 15:25         ` Christoph Hellwig
2018-09-26  2:40         ` Zong Li
2018-09-26  2:40           ` Zong Li
2018-09-18  9:19 ` [PATCH 4/5] RISC-V: Select GENERIC_LIB_UMODDI3 on RV32 Zong Li
2018-09-18  9:19 ` [PATCH 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap Zong Li
2018-09-21  7:00   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvmefdicabq.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=linux-riscv@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).