Skip to content

Commit 4f39532

Browse files
author
Derek Hower
committed
WIP
1 parent f44de8d commit 4f39532

File tree

1 file changed

+7
-3
lines changed
  • backends/cpp_hart_gen/cpp/include/udb

1 file changed

+7
-3
lines changed

backends/cpp_hart_gen/cpp/include/udb/bits.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,12 +1161,16 @@ template <bool RuntimeSigned>
11611161
_Bits<N, BitsSigned>::_Bits(const _RuntimeBits<RuntimeSigned> &val) {
11621162
if constexpr (N >= BitsMaxNativePrecision) {
11631163
if constexpr (BitsSigned) {
1164-
m_val = val.value().get().get_si();
1164+
static_assert(false, "Can't mask signed gmp values");
11651165
} else {
1166-
m_val = val.value().get().get_ui();
1166+
m_val = apply_mask(val.value().get());
11671167
}
11681168
} else {
1169-
m_val = val.value().get();
1169+
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+
}
11701174
}
11711175
}
11721176

0 commit comments

Comments
 (0)