From b14142066586a14a956d2958208f38b801e8ff0c Mon Sep 17 00:00:00 2001 From: jnk0le <jnk0le@hotmail.com> Date: Sat, 3 Jun 2023 17:43:44 +0200 Subject: [PATCH] clobber both assembly blocks --- ch32v003fun/ch32v003fun.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ch32v003fun/ch32v003fun.c b/ch32v003fun/ch32v003fun.c index 92b0bd2..014f0e4 100644 --- a/ch32v003fun/ch32v003fun.c +++ b/ch32v003fun/ch32v003fun.c @@ -783,7 +783,8 @@ void handle_reset() csrw 0x804, a3\n\ la a0, InterruptVector\n\ or a0, a0, a3\n\ - csrw mtvec, a0\n" ); + csrw mtvec, a0\n" + : : : "a0", "a3", "memory"); // Careful: Use registers to prevent overwriting of self-data. // This clears out BSS. -- GitLab