Skip to content

Commit

Permalink
riscv: fix accessing 8-byte variable from RV32
Browse files Browse the repository at this point in the history
A memory save operation to 8-byte variable in RV32 is divided into
two sw instructions in the put_user macro.  The current fixup returns
execution flow to the second sw instead of the one after it.

This patch fixes this fixup code according to the load access part.

Signed-off-by: Alan Kao<alankao@andestech.com>
Cc: Greentime Hu <greentime@andestech.com>
Cc: Vincent Chen <deanbo422@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
  • Loading branch information
Alan Kao authored and Palmer Dabbelt committed Mar 27, 2019
1 parent 8c2ffd9 commit dbee9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ do { \
" .balign 4\n" \
"4:\n" \
" li %0, %6\n" \
" jump 2b, %1\n" \
" jump 3b, %1\n" \
" .previous\n" \
" .section __ex_table,\"a\"\n" \
" .balign " RISCV_SZPTR "\n" \
Expand Down

0 comments on commit dbee9c9

Please sign in to comment.