diff options
| author | Damien George <damien@micropython.org> | 2024-03-19 15:08:42 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-03-25 11:52:26 +1100 |
| commit | 35f3f0a87db2580041dd0f7dfd4361df48887796 (patch) | |
| tree | e8d5fdd45ec51539c0bbae538a1f131d0ca8c0ec /py/nlrpowerpc.c | |
| parent | 35b2edfc240050fc5310093db29927f6226c3157 (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/nlrpowerpc.c')
| -rw-r--r-- | py/nlrpowerpc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/nlrpowerpc.c b/py/nlrpowerpc.c index 448459216..8a69fe1ee 100644 --- a/py/nlrpowerpc.c +++ b/py/nlrpowerpc.c @@ -114,7 +114,7 @@ NORETURN void nlr_jump(void *val) { "blr ;" : : "r" (&top->regs) - : + : "memory" ); MP_UNREACHABLE; @@ -203,7 +203,7 @@ NORETURN void nlr_jump(void *val) { "blr ;" : : "r" (&top->regs) - : + : "memory" ); MP_UNREACHABLE; |
