Browse Source
This commit clears the upper 32 bits of returned `uint32_t` values, which are handled as `unsigned int`s by the MicroPython runtime and thus could be extended to 64 bits on some platforms. RV64 holds 32-bit values as signed integers when held in registers, but the code handling the FFI unsigned int case did not take this into account. That introduced test failures when a 32-bit value had its most significant bit set, as when performing the value extension from 32 to 64 bits, the upper half of the value would be filled with ones. On 32 bit platforms this change should be converted to a no-op, and on other 64 bit platforms that aren't RISC-V it shouldn't hurt as the value being manipulated is expected to only hold valid bits in its lower half. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>pull/15879/head
Alessandro Gatti
2 months ago
committed by
Damien George
1 changed files with 4 additions and 1 deletions
Loading…
Reference in new issue