summaryrefslogtreecommitdiff
path: root/py/nlrmips.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-03-19 15:08:42 +1100
committerDamien George <damien@micropython.org>2024-03-25 11:52:26 +1100
commit35f3f0a87db2580041dd0f7dfd4361df48887796 (patch)
treee8d5fdd45ec51539c0bbae538a1f131d0ca8c0ec /py/nlrmips.c
parent35b2edfc240050fc5310093db29927f6226c3157 (diff)
py/nlr: Add "memory" to asm clobbers list in nlr_jump.
Newer versions of gcc (14 and up) have more sophisticated dead-code detection, and the asm clobbers list needs to contain "memory" to inform the compiler that the asm code actually does something. Tested that adding this "memory" line does not change the generated code on ARM Thumb2, x86-64 and Xtensa targets (using gcc 13.2). Fixes issue #14115. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/nlrmips.c')
-rw-r--r--py/nlrmips.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/nlrmips.c b/py/nlrmips.c
index bd5d73b6f..cba52b16a 100644
--- a/py/nlrmips.c
+++ b/py/nlrmips.c
@@ -78,7 +78,7 @@ NORETURN void nlr_jump(void *val) {
"nop \n"
:
: "r" (top)
- :
+ : "memory"
);
MP_UNREACHABLE
}