search for: addmul_1

Displaying 3 results from an estimated 3 matches for "addmul_1".

2010 Jun 11
4
[LLVMdev] Bignum development
Hi all, After searching for a decent compiler backend for ages (google sometimes isn't helpful), I recently stumbled upon LLVM. Woot!! I work on bignum arithmetic (I'm a professional mathematician) and have recently decided to switch from developing GPL'd bignum code to BSD licensed code. (See http://www.mpir.org/ which I contributed to for a while - a fork of GMP). Please bear with
2010 Jun 11
3
[LLVMdev] Bignum development
...9;t think this is done, or done > efficiently in LLVM currently. Or I might be missing something. Should work the same as the previous example; try the following on x86-64: long long a(long long x, long long y) { return ((__int128_t)x)*y >> 64; } > A basic operation in bignum stuff is addmul_1, i.e. multiply a > multiple precision integer with a single "limb" (machine word) and add > the resulting multiple precision result to another bignum. This is not > best achieved by doing lots of wide multiplies, dealing with carries, > then adding. On AMD x86_64 we get 2.5 cy...
2010 Jun 12
0
[LLVMdev] Bignum development
...mul for unsigned multiplication! I feel embarrassed now. The stupid thing is I actually know this is what happens in gcc 4.4.x when you do something like the above in C. I should've thought of this. That totally solves my "problem". > >> A basic operation in bignum stuff is addmul_1, i.e. multiply a >> multiple precision integer with a single "limb" (machine word) and add >> the resulting multiple precision result to another bignum. This is not >> best achieved by doing lots of wide multiplies, dealing with carries, >> then adding. On AMD x86_...