Subversion Repositories HelenOS

Rev

Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2071 Rev 2082
Line 59... Line 59...
59
static inline void __tcb_set(tcb_t *tcb)
59
static inline void __tcb_set(tcb_t *tcb)
60
{
60
{
61
    void *tp = tcb;
61
    void *tp = tcb;
62
    tp += MIPS_TP_OFFSET + sizeof(tcb_t);
62
    tp += MIPS_TP_OFFSET + sizeof(tcb_t);
63
 
63
 
64
    __asm__ volatile ("add $27, %0, $0" : : "r"(tp)); /* Move tls to K1 */
64
    asm volatile ("add $27, %0, $0" : : "r"(tp)); /* Move tls to K1 */
65
}
65
}
66
 
66
 
67
static inline tcb_t * __tcb_get(void)
67
static inline tcb_t * __tcb_get(void)
68
{
68
{
69
    void * retval;
69
    void * retval;
70
 
70
 
71
    __asm__ volatile("add %0, $27, $0" : "=r"(retval));
71
    asm volatile("add %0, $27, $0" : "=r"(retval));
72
 
72
 
73
    return (tcb_t *)(retval - MIPS_TP_OFFSET - sizeof(tcb_t));
73
    return (tcb_t *)(retval - MIPS_TP_OFFSET - sizeof(tcb_t));
74
}
74
}
75
 
75
 
76
#endif
76
#endif