git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add ability to do intr-binding based on given device tree node
[lunaix-os.git]
/
lunaix-os
/
arch
/
aarch64
/
includes
/
asm
/
abi.h
diff --git
a/lunaix-os/arch/aarch64/includes/asm/abi.h
b/lunaix-os/arch/aarch64/includes/asm/abi.h
index 7f8d83d545563075799cacee0f7a52b65b92324c..cc18bba28d47d3cef59165ba4d8e719063680d7d 100644
(file)
--- a/
lunaix-os/arch/aarch64/includes/asm/abi.h
+++ b/
lunaix-os/arch/aarch64/includes/asm/abi.h
@@
-4,8
+4,13
@@
#include <lunaix/types.h>
#ifndef __ASM__
#include <lunaix/types.h>
#ifndef __ASM__
+
#define align_stack(ptr) ((ptr) & ~15)
#define align_stack(ptr) ((ptr) & ~15)
+#define store_retval(retval) current_thread->hstate->registers.x[0] = (retval)
+#define store_retval_to(th, retval) (th)->hstate->registers.x[0] = (retval)
+
+
static inline void must_inline noret
switch_context() {
// TODO
static inline void must_inline noret
switch_context() {
// TODO
@@
-29,6
+34,20
@@
abi_get_retaddrat(ptr_t fp)
return ((ptr_t*)fp)[1];
}
return ((ptr_t*)fp)[1];
}
+static inline ptr_t must_inline
+abi_get_callframe()
+{
+ ptr_t val;
+ asm volatile("mov %0, fp" : "=r"(val));
+ return val;
+}
+
+static inline void must_inline
+j_usr(ptr_t sp, ptr_t pc)
+{
+ // TODO
+}
+
#endif
#endif /* __LUNAIX_AA64_ABI_H */
#endif
#endif /* __LUNAIX_AA64_ABI_H */