Subversion Repositories HelenOS

Rev

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

Rev 1 Rev 173
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
#ifndef __MIPS_ASM_H__
29
#ifndef __MIPS_ASM_H__
30
#define __MIPS_ASM_H__
30
#define __MIPS_ASM_H__
31
 
31
 
-
 
32
#include <arch/types.h>
-
 
33
#include <config.h>
-
 
34
 
32
#define cpu_sleep() ;
35
#define cpu_sleep() ;
33
 
36
 
-
 
37
/** Return base address of current stack
-
 
38
 *
-
 
39
 * Return the base address of the current stack.
-
 
40
 * The stack is assumed to be STACK_SIZE bytes long.
-
 
41
 */
-
 
42
static inline __address get_stack_base(void)
-
 
43
{
-
 
44
    __address v;
-
 
45
   
-
 
46
    __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
-
 
47
   
-
 
48
    return v;
-
 
49
}
-
 
50
 
34
#endif
51
#endif