3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

tclapi: Use older bignum API and handle external tommath for mac os

This commit is contained in:
Jannis Harder 2024-12-03 17:53:00 +01:00
parent f0704b6ede
commit cac6dd9bcb
2 changed files with 5 additions and 3 deletions

View file

@ -210,9 +210,8 @@ bool mp_int_to_const(mp_int *a, Const &b, bool is_signed)
}
std::vector<unsigned char> buf;
buf.resize(mp_ubin_size(a));
size_t written; // dummy
mp_to_ubin(a, buf.data(), buf.size(), &written);
buf.resize(mp_unsigned_bin_size(a));
mp_to_unsigned_bin(a, buf.data());
b.bits().reserve(mp_count_bits(a) + is_signed);
for (int i = 0; i < mp_count_bits(a);) {