Merge pull request #10337 from eightycc/pr-10325

Updates to PR #10325
This commit is contained in:
Scott Shawcroft 2025-05-12 10:49:47 -07:00 committed by GitHub
commit 08933456f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -91,9 +91,8 @@ static int parse_compile_execute(const void *source, mp_parse_input_kind_t input
nlr_buf_t nlr;
nlr.ret_val = NULL;
if (nlr_push(&nlr) == 0) {
// CIRCUITPY-CHANGE: Made volatile to prevent gcc from re-ordering store of function pointer into stack frame
// after call to gc_collect. For RISC-V this was causing free of the compiled function before execution.
volatile mp_obj_t module_fun = mp_const_none;
// CIRCUITPY-CHANGE
mp_obj_t module_fun = mp_const_none;
// CIRCUITPY-CHANGE
#if CIRCUITPY_ATEXIT
if (!(exec_flags & EXEC_FLAG_SOURCE_IS_ATEXIT))

View file

@ -20,6 +20,13 @@
#endif
#endif
#ifdef __riscv
#define INTEGER_REGS 12
#ifdef __riscv_vector
#define FLOATING_POINT_REGS 12
#endif
#endif
#ifndef INTEGER_REGS
#define INTEGER_REGS 0
#endif