This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Portable "add with carry" loop for arbitrary precision arithmetic
- From: "Alexander Konovalenko" <alexkon at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 23 Jun 2008 07:03:48 +0600
- Subject: Portable "add with carry" loop for arbitrary precision arithmetic
There is an "add with carry" instruction on some architectures which
enables efficient implementation of arbitrary precision (bignum)
integer addition. Is it possible to make gcc generate efficient
machine code from pure C or C++ code for bignum addition on those
architectures?
It looks like the popular libraries like GMP and CLN use hand-coded
assembly for that. I wonder if gcc can help rewrite that kind of code
in a more portable way.