[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [PATCH v3 21/43] arm64: define the CALLEE_SAVED_REGISTERS



In the arm64, the callee-saved registers are x19 ~ x29.

This patch also removes the macro for arm32.

Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
 arch/arm/sched.c       | 4 +---
 include/arm/arm64/os.h | 3 +++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/sched.c b/arch/arm/sched.c
index 8091566..d1af379 100644
--- a/arch/arm/sched.c
+++ b/arch/arm/sched.c
@@ -1,12 +1,10 @@
 #include <mini-os/sched.h>
 #include <mini-os/xmalloc.h>
 #include <mini-os/console.h>
+#include <mini-os/os.h>
 
 void arm_start_thread(void);
 
-/* The AAPCS requires the callee (e.g. __arch_switch_threads) to preserve 
r4-r11. */
-#define CALLEE_SAVED_REGISTERS 8
-
 /* Architecture specific setup of thread creation */
 struct thread* arch_create_thread(char *name, void (*function)(void *),
                                   void *data)
diff --git a/include/arm/arm64/os.h b/include/arm/arm64/os.h
index 3d4aada..89b4002 100644
--- a/include/arm/arm64/os.h
+++ b/include/arm/arm64/os.h
@@ -25,4 +25,7 @@ static inline void local_irq_enable(void)
     __asm__ __volatile__("mrs %0, daif":"=r"(x)::"memory"); \
 }
 
+/* The Callee-saved registers : x19 ~ x29 */
+#define CALLEE_SAVED_REGISTERS 11
+
 #endif
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.