Skip to content

Commit 0893345

Browse files
authored
Merge pull request #10337 from eightycc/pr-10325
Updates to PR #10325
2 parents 36d6da5 + 1cca691 commit 0893345

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

shared/runtime/pyexec.c

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

supervisor/shared/cpu_regs.h

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
#endif
2121
#endif
2222

23+
#ifdef __riscv
24+
#define INTEGER_REGS 12
25+
#ifdef __riscv_vector
26+
#define FLOATING_POINT_REGS 12
27+
#endif
28+
#endif
29+
2330
#ifndef INTEGER_REGS
2431
#define INTEGER_REGS 0
2532
#endif

0 commit comments

Comments
 (0)