We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f44de8d commit 4f39532Copy full SHA for 4f39532
backends/cpp_hart_gen/cpp/include/udb/bits.hpp
@@ -1161,12 +1161,16 @@ template <bool RuntimeSigned>
1161
_Bits<N, BitsSigned>::_Bits(const _RuntimeBits<RuntimeSigned> &val) {
1162
if constexpr (N >= BitsMaxNativePrecision) {
1163
if constexpr (BitsSigned) {
1164
- m_val = val.value().get().get_si();
+ static_assert(false, "Can't mask signed gmp values");
1165
} else {
1166
- m_val = val.value().get().get_ui();
+ m_val = apply_mask(val.value().get());
1167
}
1168
1169
- m_val = val.value().get();
+ if constexpr (BitsSigned) {
1170
+ m_val = apply_mask(val.value().get().get_si());
1171
+ } else {
1172
+ m_val = apply_mask(val.value().get().get_ui());
1173
+ }
1174
1175
1176
0 commit comments