1 #ifndef __LUNAIX_AA64_ABI_H
2 #define __LUNAIX_AA64_ABI_H
4 #include <lunaix/types.h>
8 #define align_stack(ptr) ((ptr) & ~15)
10 #define store_retval(retval) current_thread->hstate->registers.x[0] = (retval)
11 #define store_retval_to(th, retval) (th)->hstate->registers.x[0] = (retval)
14 static inline void must_inline noret
17 asm ("b _aa64_switch_task");
26 asm ("mov %0, lr" : "=r"(lr));
32 abi_get_retaddrat(ptr_t fp)
34 return ((ptr_t*)fp)[1];
37 static inline ptr_t must_inline
41 asm volatile("mov %0, fp" : "=r"(val));
45 static inline void must_inline
46 j_usr(ptr_t sp, ptr_t pc)
53 #endif /* __LUNAIX_AA64_ABI_H */