Rename jumps

This commit is contained in:
2026-09-13 16:05:45 -04:00
parent 3b279e25af
commit e18363b38a
3 changed files with 33 additions and 31 deletions
+7 -7
View File
@@ -17,32 +17,32 @@ cat_file:
addi sp, sp, 8
mv t0, a1 # put fd in t0
beqz a0, 1f # if we don't have an error, jump to reading
beqz a0, .LReadBlock # if we don't have an error, jump to reading
li a0, 1
j 2f
j .LRet
1:
.LReadBlock:
mv a0, t0
la a1, cat_buf
li a2, 4096
li a7, 63
ecall
blez a0, 3f
blez a0, .LCloseFD # if we haven't read any bytes, EOF, close FD
mv a2, a0 # move bytes read into bytes needed to write
li a0, 1
la a1, cat_buf
li a7, 64
ecall
j 1b
j .LReadBlock
3:
.LCloseFD:
mv a0, t0
li a7, 57 # close fd
ecall
2:
.LRet:
ret