pub unsafe extern "C" fn switch_to_user(
    mut user_stack: *const u8,
    process_regs: &mut [usize; 8],
) -> *mut u8 {
    asm!("
    /* Load bottom of stack into Process Stack Pointer */
    msr psp, $0

    /* Load non-hardware-stacked registers from Process stack */
    /* Ensure that $2 is stored in a callee saved register */
    ldmia $2, {r4-r11}

    /* SWITCH */
    svc 0xff /* It doesn't matter which SVC number we use here */

    /* Push non-hardware-stacked registers into Process struct's */
    /* regs field */
    stmia $2, {r4-r11}

    mrs $0, PSP /* PSP into r0 */"
    : "={r0}"(user_stack)
    : "{r0}"(user_stack), "{r1}"(process_regs)
    : "r4","r5","r6","r7","r8","r9","r10","r11");
    user_stack as *mut u8
}
/// r0 is top of user stack, r1 Process GOT
r0 is top of user stack, r1 Process GOT
r0 is top of user stack r1 Process GOT
pub unsafe extern "C" fn switch_to_user(
    mut user_stack: *const u8,
    process_regs: &mut [usize; 8],
) -> *mut u8 {
    asm!("
    /* Load bottom of stack into Process Stack Pointer */
    msr psp, $0
    /* Load non-hardware-stacked registers from Process stack */
    /* Ensure that $2 is stored in a callee saved register */
    ldmia $2, {r4-r11}
    /* SWITCH */
    svc 0xff /* It doesn't matter which SVC number we use here */
    /* Push non-hardware-stacked registers into Process struct's */
    /* regs field */
    stmia $2, {r4-r11}
    mrs $0, PSP /* PSP into r0 */"
    : "={r0}"(user_stack)
    : "{r0}"(user_stack), "{r1}"(process_regs)
    : "r4","r5","r6","r7","r8","r9","r10","r11");
    user_stack as *mut u8
}
pub unsafe extern " " fn switch_to_user ( mut user_stack : * const u8 , process_regs : & mut [ usize ; 8 ] , ) -> * mut u8 { asm ! ( " " " " ( user_stack ) " " ( user_stack ) " " ( process_regs ) " " " " " " " " " " " " " " " " ) ; user_stack as * mut u8 }
r0 is top of user stack, r1 Process GOT
r0 is top of user stack r1 Process GOT
user_stack
*const u8
process_regs
&mut [usize; 8]
user_stack
*const u8
process_regs
&mut [usize; 8]