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:
Gregory Nutt 2014-09-15 10:55:10 -06:00
parent 946b916f69
commit 949cc1b20c
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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