From 6328958a3993b689372df1b66d46e3c426192ffe Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Wed, 16 Oct 2024 20:21:48 +0200 Subject: [PATCH] rp2/mpconfigport: Leave callable pointers alone on RV32. The port configuration file tagged callable pointers' LSB on both Arm and RISC-V variants. This is needed on Arm due to Thumb/Thumb2 code addresses having their LSB set, but on RISC-V this is not required. Signed-off-by: Alessandro Gatti --- ports/rp2/mpconfigport.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index 9a11e6048c..15eeab4f34 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -275,7 +275,9 @@ extern const struct _mp_obj_type_t mod_network_nic_type_wiznet5k; #define MICROPY_HW_BOOTSEL_DELAY_US 8 #endif +#if PICO_ARM #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1)) +#endif #define MP_SSIZE_MAX (0x7fffffff) typedef intptr_t mp_int_t; // must be pointer size