I am about to publish arbitrary precision arithmetic in Simple Components. I managed to get performance closer to GMP, but of course I cannot compete with assembly code GMP uses for critical operations.
So my general question is what GNAT/GCC offers here. There seems nothing useful for ARM. Intel has some useful instructions, but it is for Intel only. I do not want to make it dependent on the architecture.
The basic instructions for arbitrary precision arithmetic would be:
A + B + C * D -> Carry, Result
Similarly subtraction:
A - B - C * D -> Borrow, Result
Squaring needs more advanced stuff, so I leave it.