Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion sw/snRuntime/src/platforms/cheshire/start_snitch.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _snrt_exit:
addi sp, sp, -8
sw a0, 0(sp)
sw ra, 4(sp)
call snrt_global_core_idx
call snrt_cluster_core_idx
# reload exit code into t0
lw t0, 0(sp)
lw ra, 4(sp)
Expand All @@ -25,8 +25,17 @@ _snrt_exit:
# - a0: global core index
# - t0: exit code
bnez a0, 1f
addi sp, sp, -8
sw a0, 0(sp)
sw ra, 4(sp)

slli t0, t0, 1
ori t0, t0, 1
mv a0, t0
call snrt_set_eoc_and_return_code

lw t0, 0(sp)
lw ra, 4(sp)
addi sp, sp, 8

1: ret
2 changes: 1 addition & 1 deletion sw/snRuntime/src/platforms/standalone/start_snitch.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _snrt_exit:
addi sp, sp, -8
sw a0, 0(sp)
sw ra, 4(sp)
call snrt_global_core_idx
call snrt_cluster_core_idx
# reload exit code into t0
lw t0, 0(sp)
lw ra, 4(sp)
Expand Down