Rev 1899 | Rev 2068 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1899 | Rev 1911 | ||
---|---|---|---|
Line 322... | Line 322... | ||
322 | */ |
322 | */ |
323 | static inline uint64_t asi_u64_read(asi_t asi, uintptr_t va) |
323 | static inline uint64_t asi_u64_read(asi_t asi, uintptr_t va) |
324 | { |
324 | { |
325 | uint64_t v; |
325 | uint64_t v; |
326 | 326 | ||
327 | __asm__ volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" (asi)); |
327 | __asm__ volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" ((unsigned) asi)); |
328 | 328 | ||
329 | return v; |
329 | return v; |
330 | } |
330 | } |
331 | 331 | ||
332 | /** Store uint64_t to alternate space. |
332 | /** Store uint64_t to alternate space. |
Line 335... | Line 335... | ||
335 | * @param va Virtual address within the ASI. |
335 | * @param va Virtual address within the ASI. |
336 | * @param v Value to be written. |
336 | * @param v Value to be written. |
337 | */ |
337 | */ |
338 | static inline void asi_u64_write(asi_t asi, uintptr_t va, uint64_t v) |
338 | static inline void asi_u64_write(asi_t asi, uintptr_t va, uint64_t v) |
339 | { |
339 | { |
340 | __asm__ volatile ("stxa %0, [%1] %2\n" : : "r" (v), "r" (va), "i" (asi) : "memory"); |
340 | __asm__ volatile ("stxa %0, [%1] %2\n" : : "r" (v), "r" (va), "i" ((unsigned) asi) : "memory"); |
341 | } |
341 | } |
342 | 342 | ||
343 | /** Flush all valid register windows to memory. */ |
343 | /** Flush all valid register windows to memory. */ |
344 | static inline void flushw(void) |
344 | static inline void flushw(void) |
345 | { |
345 | { |