Rev 173 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 173 | Rev 180 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | #define __ia64_ASM_H__ |
30 | #define __ia64_ASM_H__ |
31 | 31 | ||
32 | #include <arch/types.h> |
32 | #include <arch/types.h> |
33 | #include <config.h> |
33 | #include <config.h> |
34 | 34 | ||
- | 35 | /** Return base address of current stack |
|
- | 36 | * |
|
- | 37 | * Return the base address of the current stack. |
|
- | 38 | * The stack is assumed to be STACK_SIZE long. |
|
35 | /* TODO: implement the real stuff */ |
39 | * The stack must start on page boundary. |
- | 40 | */ |
|
36 | static inline __address get_stack_base(void) |
41 | static inline __address get_stack_base(void) |
37 | { |
42 | { |
- | 43 | __u64 v; |
|
- | 44 | ||
- | 45 | __asm__ volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
|
- | 46 | ||
38 | return NULL; |
47 | return v; |
39 | } |
48 | } |
40 | 49 | ||
41 | #endif |
50 | #endif |