Skip to content

Commit ed72405

Browse files
committed
ch32v: Fix: Add clobbers to bss/data loops
1 parent 4d3ddca commit ed72405

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

port/wch/ch32v/src/cpus/main.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ pub const startup_logic = struct {
306306
\\ addi a1, a1, 4
307307
\\ blt a1, a2, clear_bss_loop
308308
\\clear_bss_done:
309-
);
309+
::: .{ .x10 = true, .x11 = true, .x12 = true });
310310

311311
// Copy .data from FLASH to RAM.
312312
asm volatile (
@@ -321,7 +321,7 @@ pub const startup_logic = struct {
321321
\\ addi a1, a1, 4
322322
\\ bne a1, a2, copy_data_loop
323323
\\copy_done:
324-
);
324+
::: .{ .x10 = true, .x11 = true, .x12 = true, .x13 = true });
325325
}
326326

327327
fn _system_init() callconv(.c) void {

0 commit comments

Comments
 (0)