Rev 252 | Rev 257 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 252 | Rev 253 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | 34 | ||
35 | 35 | ||
36 | void asm_delay_loop(__u32 t); |
36 | void asm_delay_loop(__u32 t); |
37 | void asm_fake_loop(__u32 t); |
37 | void asm_fake_loop(__u32 t); |
38 | 38 | ||
- | 39 | /** Return base address of current stack. |
|
- | 40 | * |
|
- | 41 | * Return the base address of the current stack. |
|
- | 42 | * The stack is assumed to be STACK_SIZE bytes long. |
|
- | 43 | * The stack must start on page boundary. |
|
- | 44 | */ |
|
39 | static inline __address get_stack_base(void) |
45 | static inline __address get_stack_base(void) |
40 | { |
46 | { |
41 | __address v; |
47 | __address v; |
42 | 48 | ||
43 | __asm__ volatile ("andq %%rsp, %0\n" : "=r" (v) : "0" (~((__u64)STACK_SIZE-1))); |
49 | __asm__ volatile ("andq %%rsp, %0\n" : "=r" (v) : "0" (~((__u64)STACK_SIZE-1))); |