I have an existing project which uses its own Bignum C++ class, coding values internally as 512-bit integers using 8 32-bit limbs. (fixed-precision, not arbitrary). I'm trying to optimize adds (to start) using assembly. My two questions are,
- Can I do this with inline assembly in Visual Studio, or do I need to write separate assembler routines and call them?
- I know the basic strategy for coding it: process each limb pair sequentially, checking the overflow flag after each add. But since incrementing the next limb up on an overflow can potentially overflow that value also, my logic winds up very convoluted. It seems like I'm missing something a very obvious and simple way to handle this.