mirror of
https://github.com/apache/nuttx.git
synced 2026-10-16 18:49:05 +00:00
Fix a typo in system call when fetching parameter from the stack: regs[REG_PC]+4 is the address, not regs[REG_PC+4]
This commit is contained in:
parent
946b916f69
commit
949cc1b20c
3 changed files with 3 additions and 3 deletions
|
|
@ -407,7 +407,7 @@ int up_svcall(int irq, FAR void *context)
|
|||
* parameter will reside at an offset of 4 from the stack pointer.
|
||||
*/
|
||||
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP+4]);
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP]+4);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||
* parameter will reside at an offset of 4 from the stack pointer.
|
||||
*/
|
||||
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP+4]);
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP]+4);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ int up_svcall(int irq, FAR void *context)
|
|||
* parameter will reside at an offset of 4 from the stack pointer.
|
||||
*/
|
||||
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP+4]);
|
||||
regs[REG_R3] = *(uint32_t*)(regs[REG_SP]+4);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue