mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
Merge pull request #4960 from stashcroft/fix-32-bit-builds
Make 32-bit tests pass
This commit is contained in:
commit
af9ad51a0a
|
@ -2224,10 +2224,10 @@ module \$print (EN, TRG, ARGS);
|
||||||
parameter PRIORITY = 0;
|
parameter PRIORITY = 0;
|
||||||
|
|
||||||
parameter FORMAT = "";
|
parameter FORMAT = "";
|
||||||
parameter ARGS_WIDTH = 0;
|
parameter signed ARGS_WIDTH = 0;
|
||||||
|
|
||||||
parameter TRG_ENABLE = 1;
|
parameter TRG_ENABLE = 1;
|
||||||
parameter TRG_WIDTH = 0;
|
parameter signed TRG_WIDTH = 0;
|
||||||
parameter TRG_POLARITY = 0;
|
parameter TRG_POLARITY = 0;
|
||||||
|
|
||||||
input EN;
|
input EN;
|
||||||
|
|
|
@ -241,7 +241,10 @@ struct CtlzTest
|
||||||
{
|
{
|
||||||
if (a == 0)
|
if (a == 0)
|
||||||
return bits;
|
return bits;
|
||||||
return __builtin_clzl(a) - (64 - bits);
|
if (sizeof(long) == 4)
|
||||||
|
return __builtin_clzll(a) - (64 - bits);
|
||||||
|
else
|
||||||
|
return __builtin_clzl(a) - (64 - bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<size_t Bits>
|
template<size_t Bits>
|
||||||
|
|
Loading…
Reference in a new issue