am,x86-nemu,asye,irq_handle: save the return value of syscall

This commit is contained in:
Zihao Yu 2017-08-03 23:29:43 +08:00
parent 96bd7a1284
commit e407e19338
1 changed files with 5 additions and 1 deletions

View File

@ -13,11 +13,11 @@ uintptr_t irq_handle(_RegSet *r) {
_RegSet *next = r;
if (H) {
_Event ev;
intptr_t args[4];
switch (r->irq) {
case 32: ev.event = _EVENT_IRQ_TIME; break;
case 0x80: {
ev.event = _EVENT_SYSCALL;
intptr_t args[4];
args[0] = r->eax;
args[1] = r->ebx;
args[2] = r->ecx;
@ -30,6 +30,10 @@ uintptr_t irq_handle(_RegSet *r) {
}
next = H(ev, r);
if (ev.event == _EVENT_SYSCALL) {
r->eax = args[0];
}
if (next == NULL) {
next = r;
}