Support 32-bit platforms

This commit is contained in:
Mamy André-Ratsimbazafy 2020-03-01 14:38:18 +01:00
parent 1fdb1df80a
commit 3ce237234d
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1
1 changed files with 9 additions and 2 deletions

View File

@ -14,9 +14,16 @@
import ../primitives/constant_time
when sizeof(int) == 8:
type
BaseType* = uint64
## Physical BigInt for conversion in "normal integers"
else:
type
BaseType* = uint32
## Physical BigInt for conversion in "normal integers"
type
BaseType* = uint64
## Physical BigInt for conversion in "normal integers"
Word* = Ct[BaseType]
## Logical BigInt word
## A logical BigInt word is of size physical MachineWord-1