Skip to content

Commit

Permalink
rp2/mpconfigport: Leave callable pointers alone on RV32.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
agatti authored and dpgeorge committed Oct 22, 2024
1 parent 324871f commit 6328958
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ports/rp2/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6328958

Please sign in to comment.