Rev 2071 | Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2082 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | 41 | ||
42 | 42 | ||
43 | static inline void cpu_sleep(void) |
43 | static inline void cpu_sleep(void) |
44 | { |
44 | { |
45 | /* Most of the simulators do not support */ |
45 | /* Most of the simulators do not support */ |
46 | /* __asm__ volatile ("wait"); */ |
46 | /* asm volatile ("wait"); */ |
47 | } |
47 | } |
48 | 48 | ||
49 | /** Return base address of current stack |
49 | /** Return base address of current stack |
50 | * |
50 | * |
51 | * Return the base address of the current stack. |
51 | * Return the base address of the current stack. |
Line 54... | Line 54... | ||
54 | */ |
54 | */ |
55 | static inline uintptr_t get_stack_base(void) |
55 | static inline uintptr_t get_stack_base(void) |
56 | { |
56 | { |
57 | uintptr_t v; |
57 | uintptr_t v; |
58 | 58 | ||
59 | __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
59 | asm volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
60 | 60 | ||
61 | return v; |
61 | return v; |
62 | } |
62 | } |
63 | 63 | ||
64 | extern void cpu_halt(void); |
64 | extern void cpu_halt(void); |