add back 32-bit support

This commit is contained in:
Jacek Sieka 2024-08-08 17:18:21 +02:00
parent 1920adc42e
commit dca7819f2b
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8

View File

@ -104,6 +104,13 @@ proc subNoBorrow(a: var BNU256, b: BNU256) {.inline.} =
staticFor i, 0, 4:
subB(borrow, a[i], a[i], b[i], borrow)
when sizeof(int) == 4:
import stint/private/primitives/compiletime_fallback
# TODO a future intops library should expose this on 32-bit platforms too!
proc muladd2(hi, lo: var uint64, a, b, c1, c2: uint64): uint64 =
muladd2_nim(hi, lo, a, b, c1, c2)
proc macDigit[N, N2: static int](
acc: var array[N, uint64], pos: static int, b: array[N2, uint64], c: uint64) =
if c == 0'u64: