fix issue of jumping to address 0

This commit is contained in:
2020-11-14 23:04:24 -07:00
parent caf9a6f4f7
commit 4a25ca6def
7 changed files with 213 additions and 154 deletions

View File

@ -27,7 +27,7 @@ _start:
# or
or x9, x1, x2 # x9 = 0xffffffff
or x10, x1, x0 # x10 = 0xfedcb789
or x11, x4, x3 # x11 = 0x0xfedcb79a
or x11, x4, x3 # x11 = 0xfedcb79a
# xor
xor x12, x1, x2 # x12 = 0x01234876
@ -209,27 +209,29 @@ test9:
j fail
test10:
# now for some memory stuff
# # sw
# la x9, someint # x9 = start of .bss
# li x10, 0x12345678 # x10 = 0x12345678
# nop
# nop
# nop
# nop
# nop
# sw x10, 0(x9) # someint = 0x12345678
# nop
# nop
# nop
# nop
# nop
# lw x11, 0(x9) # x11 = 0x12345678
# nop
# nop
# nop
# nop
# nop
addi x30, x0, 10 # x30 = 10
# # now for some memory stuff
# # sw
# la x9, someint # x9 = start of .bss
# lui x10, 0x12345 # x10 = 0x12345000
# addi x10, x10, 0x678 # x10 = 0x12345678
# nop
# nop
# nop
# nop
# nop
# sw x10, 0(x9) # someint = 0x12345678
# nop
# nop
# nop
# nop
# nop
# # lw x11, 0(x9) # x11 = 0x12345678
# nop
# nop
# nop
# nop
# nop
done: