Skip to content

Commit 4538599

Browse files
committed
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>
1 parent d3391b7 commit 4538599

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

py/emitinlinerv32.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ static const opcode_t OPCODES[] = {
390390

391391
// These two checks assume the bitmasks are contiguous.
392392

393-
static bool is_in_signed_mask(mp_uint_t mask, mp_uint_t value) {
394-
mp_uint_t leading_zeroes = mp_clz(mask);
395-
if (leading_zeroes == 0 || leading_zeroes > 32) {
393+
static bool is_in_signed_mask(uint32_t mask, mp_uint_t value) {
394+
uint32_t leading_zeroes = mp_clz(mask);
395+
if (leading_zeroes == 0) {
396396
return true;
397397
}
398398
mp_uint_t positive_mask = ~(mask & ~(1U << (31 - leading_zeroes)));

0 commit comments

Comments
 (0)