diff options
author | Yunsup Lee <yunsup@cs.berkeley.edu> | 2010-10-26 02:20:44 -0700 |
---|---|---|
committer | Yunsup Lee <yunsup@cs.berkeley.edu> | 2010-10-26 02:20:44 -0700 |
commit | 9fe7d4f656dd3c6bfe6be17d2e48eacb59ad00f5 (patch) | |
tree | 1a433c0148d3751fa90109da5632420fd9b4e152 /pk/syscall.c | |
parent | 6ba19295c02fc04ddba539ef13fb411d3587a799 (diff) | |
download | pk-9fe7d4f656dd3c6bfe6be17d2e48eacb59ad00f5.zip pk-9fe7d4f656dd3c6bfe6be17d2e48eacb59ad00f5.tar.gz pk-9fe7d4f656dd3c6bfe6be17d2e48eacb59ad00f5.tar.bz2 |
[pk,sim,xcc] get rid of at register, introduce tp register
Diffstat (limited to 'pk/syscall.c')
-rw-r--r-- | pk/syscall.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pk/syscall.c b/pk/syscall.c index 790f32d..d303324 100644 --- a/pk/syscall.c +++ b/pk/syscall.c @@ -109,7 +109,7 @@ void handle_syscall(trapframe_t* tf) }; syscall_t p; - unsigned long n = tf->gpr[1]; + unsigned long n = tf->gpr[2]; if(n >= sizeof(syscall_table)/sizeof(void*) || !syscall_table[n]) { dump_tf(tf); @@ -118,9 +118,9 @@ void handle_syscall(trapframe_t* tf) else p = (syscall_t)syscall_table[n]; - sysret_t ret = p(tf->gpr[3],tf->gpr[4],tf->gpr[5],tf->gpr[6],n); - tf->gpr[1] = ret.result; - tf->gpr[2] = ret.result == -1 ? ret.err : 0; + sysret_t ret = p(tf->gpr[4],tf->gpr[5],tf->gpr[6],tf->gpr[7],n); + tf->gpr[2] = ret.result; + tf->gpr[3] = ret.result == -1 ? ret.err : 0; //printk("syscall %d (%x,%x,%x,%x) from %x == %d\n",n,tf->gpr[4],tf->gpr[5],tf->gpr[6],tf->gpr[7],tf->gpr[31],tf->gpr[2]); |