#[repr(C)]pub struct TrapFrame {
pub ra: usize,
pub t0: usize,
pub t1: usize,
pub t2: usize,
pub a0: usize,
pub a1: usize,
pub a2: usize,
pub a3: usize,
pub a4: usize,
pub a5: usize,
}Expand description
Registers saved in trap handler
Fields§
§ra: usizex1: return address, stores the address to return to after a function call or interrupt.
t0: usizex5: temporary register t0, used for intermediate values.
t1: usizex6: temporary register t1, used for intermediate values.
t2: usizex7: temporary register t2, used for intermediate values.
a0: usizex10: argument register a0. Used to pass the first argument to a function.
a1: usizex11: argument register a1. Used to pass the second argument to a function.
a2: usizex12: argument register a2. Used to pass the third argument to a function.
a3: usizex13: argument register a3. Used to pass the fourth argument to a function.
a4: usizex14: argument register a4. Used to pass the fifth argument to a function.
a5: usizex15: argument register a5. Used to pass the sixth argument to a function.