From ca2d9002fcbebcf37f48944dd8d67e90c186ce4f Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 13 Oct 2019 05:21:28 +0200 Subject: fixed msgq bug --- code/fe310/eos/trap_entry.S | 2 ++ 1 file changed, 2 insertions(+) (limited to 'code/fe310/eos/trap_entry.S') 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 -- cgit v1.2.3