commit | 89b62f1b7e26b417598de1ebe0fc7ab7b89171e0 | [log] [tgz] |
---|---|---|
author | Owen Anderson <resistor@mac.com> | Thu Nov 14 22:28:57 2024 +1200 |
committer | David Chisnall <davidchisnall@users.noreply.github.com> | Thu Nov 14 10:38:47 2024 +0000 |
tree | 4813e2a70cb76a27eb28ac71e098a4c5f9864d7a | |
parent | 27e473589640119fa0b089c10bfee7f95a602c8d [diff] |
Make ecall inline asm as clobbering memory, which acts as a compiler barrier.
diff --git a/sdk/include/stdlib.h b/sdk/include/stdlib.h index 6955d23..adc2143 100644 --- a/sdk/include/stdlib.h +++ b/sdk/include/stdlib.h
@@ -329,6 +329,6 @@ static inline void yield(void) { - __asm volatile("ecall"); + __asm volatile("ecall" ::: "memory"); } __END_DECLS