summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-12-05 16:03:51 +1100
committerDamien George <damien@micropython.org>2025-12-07 16:05:14 +1100
commit45385994752c1ee30d115bd77165449e918b3daf (patch)
treee22278b46a629f96442927dec6f041727f038cc3 /py
parentd3391b7632d76a728c723ad58d74371677201531 (diff)
py/emitinlinerv32: Change mask arg of is_in_signed_mask to uint32_t.
Prior to this change mpy-cross would fail to build under Windows with: D:\a\micropython\micropython\py\emitinlinerv32.c(398,40): warning C4319: '~': zero extending 'unsigned int' to 'mp_uint_t' of greater size [D:\a\micropython\micropython\mpy-cross\mpy-cross.vcxproj] Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r--py/emitinlinerv32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/emitinlinerv32.c b/py/emitinlinerv32.c
index a5f4c49c2..e81b15208 100644
--- a/py/emitinlinerv32.c
+++ b/py/emitinlinerv32.c
@@ -390,9 +390,9 @@ static const opcode_t OPCODES[] = {
// These two checks assume the bitmasks are contiguous.
-static bool is_in_signed_mask(mp_uint_t mask, mp_uint_t value) {
- mp_uint_t leading_zeroes = mp_clz(mask);
- if (leading_zeroes == 0 || leading_zeroes > 32) {
+static bool is_in_signed_mask(uint32_t mask, mp_uint_t value) {
+ uint32_t leading_zeroes = mp_clz(mask);
+ if (leading_zeroes == 0) {
return true;
}
mp_uint_t positive_mask = ~(mask & ~(1U << (31 - leading_zeroes)));