blob: d87af364b0d43f841b78ea16bf6291c9b254d470 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* ISC license. */
#include <stdint.h>
#include <skalibs/biguint.h>
int bu_slbc (register uint32_t *a, register unsigned int n, register int carry)
{
register unsigned int i = 0 ;
carry = !!carry ;
for (; i < n ; i++)
{
register int c = a[i] >> 31 ;
a[i] = (a[i] << 1) | carry ;
carry = c ;
}
return carry ;
}
|