Subversion Repositories HelenOS

Rev

Rev 3168 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3168 Rev 4345
Line 88... Line 88...
88
    ipl_t user_mode = current_status_reg_read() &
88
    ipl_t user_mode = current_status_reg_read() &
89
        (~STATUS_REG_MODE_MASK | USER_MODE);
89
        (~STATUS_REG_MODE_MASK | USER_MODE);
90
 
90
 
91
    /* set user mode, set registers, jump */
91
    /* set user mode, set registers, jump */
92
    asm volatile (
92
    asm volatile (
93
        "mov sp, %0         \n"
93
        "mov sp, %[ustate]\n"
94
        "msr spsr_c, %1         \n"
94
        "msr spsr_c, %[user_mode]\n"
95
        "ldmfd sp!, {r0-r12, sp, lr}^   \n"
95
        "ldmfd sp!, {r0-r12, sp, lr}^\n"
96
        "ldmfd sp!, {pc}^\n"
96
        "ldmfd sp!, {pc}^\n"
97
        :
-
 
98
        : "r" (&ustate), "r" (user_mode)
97
        :: [ustate] "r" (&ustate), [user_mode] "r" (user_mode)
99
    );
98
    );
100
 
99
 
101
    /* unreachable */
100
    /* unreachable */
102
    while(1)
101
    while(1)
103
        ;
102
        ;