-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Open
Labels
Description
Port, board and/or hardware
unix port, obj_repr_b, x86 (32-bit)
MicroPython version
based on v1.27.0-preview-154-g44986b1f04
Reproduction
- Make a 32-bit REPR_B "standard" or "coverage" build (from e.g., Test REPR_B & fix test failures #17688)
- Run
RUN_TESTS_MPY_CROSS_FLAGS="--mpy-cross-flags=\"-march=x86 -msmall-int-bits=30\"" make -C ports/unix/ VARIANT=standard test_full_no_native# orVARIANT=coverage, depending
Expected behaviour
Tests pass
Observed behaviour
12 tests failed: micropython/native_gen.py micropython/native_misc.py micropython/native_try.py micropython/viper_import.py micropython/native_try_deep.py micropython/native_while.py micropython/native_with.py micropython/viper_misc3.py micropython/native_closure.py micropython/native_const.py micropython/native_for.py micropython/viper_with.py
I didn't dig deeply because native & viper were not important to my use case but I think that there are some assumptions about the encoding of small integer values as discussed in a related PR: #17688 (comment)
} else if (si->vtype == VTYPE_INT || si->vtype == VTYPE_UINT) {
ASM_MOV_REG_IMM(emit->as, reg_dest, (uintptr_t)MP_OBJ_NEW_SMALL_INT(si->data.u_imm));Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree