summaryrefslogtreecommitdiff
path: root/code/fe310/eos/trap_entry.S
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2019-10-13 05:21:28 +0200
committerUros Majstorovic <majstor@majstor.org>2019-10-13 05:21:28 +0200
commitca2d9002fcbebcf37f48944dd8d67e90c186ce4f (patch)
tree603660613302d30afca3687323c53f4434c36126 /code/fe310/eos/trap_entry.S
parent8c6c68e92d6b4c8aa5e2fcc784ed52da40845acc (diff)
fixed msgq bug
Diffstat (limited to 'code/fe310/eos/trap_entry.S')
-rw-r--r--code/fe310/eos/trap_entry.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/code/fe310/eos/trap_entry.S b/code/fe310/eos/trap_entry.S
index 21cf2f8..432e84a 100644
--- a/code/fe310/eos/trap_entry.S
+++ b/code/fe310/eos/trap_entry.S
@@ -266,8 +266,10 @@ i2s_handler_sd_xchg:
lhu x18, I2S_ABUF_OFF_IDXR(x9)
lhu x19, I2S_ABUF_OFF_IDXW(x9)
lhu x20, I2S_ABUF_OFF_SIZE(x9)
+ li x21, 0xffff
sub x18, x19, x18
+ and x18, x18, x21
beq x18, x20, 0f
addi x19, x19, 1