circuitpython/ports
Alessandro Gatti 8f465dfd10 unix/modffi: Restrict uint32_t values to 32 bits.
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>
2024-09-23 11:47:18 +10:00
..
bare-arm shared/libc/string0: Don't deref args for n==0 case. 2023-11-07 16:01:50 +11:00
cc3200 cc3200/mods/pybuart: Add the UART.IRQ_RX class constant. 2024-08-29 16:27:43 +10:00
embed all: Prune trailing whitespace. 2024-03-07 16:25:17 +11:00
esp32 esp32/boards/UM_RGBTOUCH_MINI: Fix compile error with missing modules. 2024-09-20 15:57:52 +10:00
esp8266 esp32,esp8266: Use new mp_obj_new_str_from_cstr() function. 2024-07-05 11:27:25 +10:00
mimxrt mimxrt/machine_uart: Implement a Python UART IRQ handler. 2024-08-29 16:27:43 +10:00
minimal minimal: Use printf instead of echo -e. 2024-02-15 16:36:22 +11:00
nrf nrf/modules/machine/uart: Implement Python UART IRQ for nrf52840 boards. 2024-08-29 16:27:43 +10:00
pic16bit all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
powerpc py/mpconfig: Disable qstr hashing at minimum feature level. 2024-01-25 16:38:17 +11:00
qemu qemu: Rename qemu-arm port to qemu. 2024-09-06 11:08:39 +10:00
renesas-ra renesas-ra/machine_uart: Implement UART.IRQ_RXIDLE based on softtimer. 2024-08-29 16:27:43 +10:00
rp2 rp2/modules: Fix FatFS boot script to detect invalid FAT filesystem. 2024-09-19 13:04:48 +10:00
samd samd/Makefile: Specify UF2 family in firmware.uf2. 2024-09-06 20:36:06 +10:00
stm32 stm32/boards/STM32F429DISC: Add DAC support to the STM32F429DISC. 2024-09-17 10:58:47 +10:00
unix unix/modffi: Restrict uint32_t values to 32 bits. 2024-09-23 11:47:18 +10:00
webassembly webassembly: Reuse PyProxy objects when they are the same Python object. 2024-07-19 11:55:24 +10:00
windows github/workflows: Improve MSYS2-based CI builds. 2024-07-25 16:22:21 +10:00
zephyr zephyr/mphalport: Make mp_hal_wait_sem() always call k_poll(). 2024-09-06 20:48:13 +10:00