Skip to content

Commit

Permalink
also print return address when asked to deallocate a zeroed object
Browse files Browse the repository at this point in the history
  • Loading branch information
devyn committed Aug 17, 2023
1 parent 856d8f2 commit 94cd5c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stage1/memory.s
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,17 @@ drop_object:
la ra, .Ldrop_object_end
jr (t0)
.Ldrop_object_zero:
# print z address and return without deallocating
# print z address:ra and return without deallocating
li a0, 'z'
call putc
mv a0, s1
li a1, 16
call put_hex
li a0, ':'
call putc
ld a0, 0(sp) # return address
li a1, 16
call put_hex
li a0, '\n'
call putc
j .Ldrop_object_ret
Expand Down

0 comments on commit 94cd5c9

Please sign in to comment.