Fix tests
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
fe8a8cd100
commit
d54cb83584
1 changed files with 2 additions and 2 deletions
|
@ -331,10 +331,10 @@ void mpi_core_clz(int lz, int tz)
|
||||||
if ((lz + tz) > 0) {
|
if ((lz + tz) > 0) {
|
||||||
// some zero bits
|
// some zero bits
|
||||||
uint32_t s = (sizeof(mbedtls_mpi_uint) * 8 - lz - tz);
|
uint32_t s = (sizeof(mbedtls_mpi_uint) * 8 - lz - tz);
|
||||||
x = ((1ULL << s) - 1) << tz;
|
x = ((((mbedtls_mpi_uint) 1) << s) - 1) << tz;
|
||||||
} else {
|
} else {
|
||||||
// all bits set
|
// all bits set
|
||||||
x = ~0ULL;
|
x = ~((mbedtls_mpi_uint) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue