Fix syscall handling for mipsel, update user programs repo

Signed-off-by: Harry Chen <i@harrychen.xyz>
master
Harry Chen 6 years ago
parent f8a62b5549
commit 78b7c7b893

@ -115,10 +115,9 @@ fn timer() {
} }
fn syscall(tf: &mut TrapFrame) { fn syscall(tf: &mut TrapFrame) {
// TODO
tf.sepc += 4; // Must before syscall, because of fork. tf.sepc += 4; // Must before syscall, because of fork.
let ret = crate::syscall::syscall(tf.x[17], [tf.x[10], tf.x[11], tf.x[12], tf.x[13], tf.x[14], tf.x[15]], tf); let ret = crate::syscall::syscall(tf.t0, [tf.x0, tf.x1, tf.x2, tf.x3, tf.s0, tf.s1], tf);
tf.x[10] = ret as usize; tf.v0 = ret as usize;
} }
fn page_fault(tf: &mut TrapFrame) { fn page_fault(tf: &mut TrapFrame) {

@ -1 +1 @@
Subproject commit b1e7a2d07e81ce5035a1cc25b0ade9367aee1a94 Subproject commit 97bae0c39a7aeaab07654d99c3ba3bcb4d01658c
Loading…
Cancel
Save