Skip to content

Commit 6328958

Browse files
agattidpgeorge
authored andcommitted
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 <[email protected]>
1 parent 324871f commit 6328958

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ports/rp2/mpconfigport.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ extern const struct _mp_obj_type_t mod_network_nic_type_wiznet5k;
275275
#define MICROPY_HW_BOOTSEL_DELAY_US 8
276276
#endif
277277

278+
#if PICO_ARM
278279
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1))
280+
#endif
279281

280282
#define MP_SSIZE_MAX (0x7fffffff)
281283
typedef intptr_t mp_int_t; // must be pointer size

0 commit comments

Comments
 (0)