Skip to content

Commit

Permalink
fixed local to relative addressing
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeloJacobo committed May 22, 2022
1 parent 82fe552 commit f4db32b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extra/lhu.s
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ _start: .global _start
main:
### TEST CODE STARTS HERE ###
# load halfword unsigned with zero imm
li x1, 0x1008 # set x1 to 0x1008
lla x1, data # set x1 to data
addi x1,x1, 8 # set x1 to data + 8
lhu x2, 0(x1) # load halfword from address 0x1008 to x2, x2=0x00005577

# load halfword unsigned with positive imm
Expand Down

0 comments on commit f4db32b

Please sign in to comment.