Intrinsic operations

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.

… So my general question is what GNAT/GCC offers here. There seems nothing useful for ARM.

GNAT supports Big_Integers and Big_Reals, as defined in the Ada 2022 RM A.5.{5,6,7}.

Yes, the implementations of I am trying to improve.