#[repr(C)]pub struct TrapFrame {Show 16 fields
    pub ra: usize,
    pub t0: usize,
    pub t1: usize,
    pub t2: usize,
    pub t3: usize,
    pub t4: usize,
    pub t5: usize,
    pub t6: usize,
    pub a0: usize,
    pub a1: usize,
    pub a2: usize,
    pub a3: usize,
    pub a4: usize,
    pub a5: usize,
    pub a6: usize,
    pub a7: 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.
t3: usizex28: temporary register t3, used for intermediate values.
t4: usizex29: temporary register t4, used for intermediate values.
t5: usizex30: temporary register t5, used for intermediate values.
t6: usizex31: temporary register t6, 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.
a6: usizex16: argument register a6. Used to pass the seventh argument to a function.
a7: usizex17: argument register a7. Used to pass the eighth argument to a function.