Skip to content

Commit 4db37e8

Browse files
authored
ch32v: Fix: Add clobbers to bss/data loops (#878)
1 parent faef22d commit 4db37e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

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

315315
// Copy .data from FLASH to RAM.
316316
asm volatile (
@@ -325,7 +325,7 @@ pub const startup_logic = struct {
325325
\\ addi a1, a1, 4
326326
\\ bne a1, a2, copy_data_loop
327327
\\copy_done:
328-
);
328+
::: .{ .x10 = true, .x11 = true, .x12 = true, .x13 = true });
329329
}
330330

331331
export fn _reset_vector() linksection("microzig_flash_start") callconv(.naked) void {

0 commit comments

Comments
 (0)