Rev 4130 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4130 | Rev 4614 | ||
|---|---|---|---|
| Line 307... | Line 307... | ||
| 307 | */ |
307 | */ |
| 308 | static inline uintptr_t get_stack_base(void) |
308 | static inline uintptr_t get_stack_base(void) |
| 309 | { |
309 | { |
| 310 | uintptr_t unbiased_sp; |
310 | uintptr_t unbiased_sp; |
| 311 | 311 | ||
| 312 | asm volatile ("add %%sp, %1, %0\n" : "=r" (unbiased_sp) : "i" (STACK_BIAS)); |
312 | asm volatile ("add %%sp, %1, %0\n" : "=&r" (unbiased_sp) : "i" (STACK_BIAS)); |
| 313 | 313 | ||
| 314 | return ALIGN_DOWN(unbiased_sp, STACK_SIZE); |
314 | return ALIGN_DOWN(unbiased_sp, STACK_SIZE); |
| 315 | } |
315 | } |
| 316 | 316 | ||
| 317 | /** Read Trap Program Counter register. |
317 | /** Read Trap Program Counter register. |
| Line 371... | Line 371... | ||
| 371 | */ |
371 | */ |
| 372 | static inline uint64_t asi_u64_read(asi_t asi, uintptr_t va) |
372 | static inline uint64_t asi_u64_read(asi_t asi, uintptr_t va) |
| 373 | { |
373 | { |
| 374 | uint64_t v; |
374 | uint64_t v; |
| 375 | 375 | ||
| 376 | asm volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" ((unsigned) asi)); |
376 | asm volatile ("ldxa [%1] %2, %0\n" : "=&r" (v) : "r" (va), "i" ((unsigned) asi)); |
| 377 | 377 | ||
| 378 | return v; |
378 | return v; |
| 379 | } |
379 | } |
| 380 | 380 | ||
| 381 | /** Store uint64_t to alternate space. |
381 | /** Store uint64_t to alternate space. |