no1wudi commented on a change in pull request #5192:
URL: https://github.com/apache/incubator-nuttx/pull/5192#discussion_r780743635



##########
File path: arch/risc-v/src/fe310/fe310_irq_dispatch.c
##########
@@ -72,7 +72,7 @@ void *fe310_dispatch_irq(uint32_t vector, uint32_t *regs)
 
   if (FE310_IRQ_ECALLM == irq)
     {
-      *mepc += 2;
+      *mepc += 4;

Review comment:
       ECALL instructin is alwasy 4 byte in spec, , so we must update the epc 
adjustment.
   + 2 in my previous PR is wrong but works with some unknown reason.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to