From 3ce237234d3d29cdc760986cce4943d1f7b3d52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mamy=20Andr=C3=A9-Ratsimbazafy?= Date: Sun, 1 Mar 2020 14:38:18 +0100 Subject: [PATCH] Support 32-bit platforms --- constantine/config/common.nim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/constantine/config/common.nim b/constantine/config/common.nim index 200a92a..66b0372 100644 --- a/constantine/config/common.nim +++ b/constantine/config/common.nim @@ -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