(no commit message)
[libreriscv.git] / openpower / sv / biginteger.mdwn
1 # Big Integer Arithmetic
2
3 **DRAFT STATUS** 19apr2021
4
5 BigNum arithmetic is extremely common especially in cryptography,
6 where for example RSA relies on arithmetic of 2048 or 4096 bits
7 in length. The primary operations are add, multiply and divide
8 (and modulo) with specialisations of subtract and signed multiply.
9
10 A reminder that a particular focus of SVP64 is that it is built on
11 top of Scalar operations, where those scalar operations are useful in
12 their own right without SVP64. Thus the operstions here are proposed
13 first as Scalar Extensions to the Power ISA.
14
15 A secondary focus is that if Vectorised, implementors may choose
16 to deploy macro-op fusion targetting back-end 256-bit or greater
17 Dynamic SIMD ALUs for maximum performance and effectiveness.
18
19 # Add and Subtract
20
21 Surprisingly, no new additional instructions are required to perform
22 a straightforward big-integer add or subtract. Vectorised `addex`