[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [PATCH v2 22/47] arm64: define the CALLEE_SAVED_REGISTERS
In the arm64, the callee-saved registers are x19 ~ x29. This patch also moves the macro to os.h for arm32. Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx> --- arch/arm/sched.c | 4 +--- include/arm/arm32/os.h | 3 +++ include/arm/arm64/os.h | 3 +++ 3 files changed, 7 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/arm32/os.h b/include/arm/arm32/os.h index cb8e440..dfd6d34 100644 --- a/include/arm/arm32/os.h +++ b/include/arm/arm32/os.h @@ -28,4 +28,7 @@ static inline void local_irq_enable(void) { #define rmb() __asm__("dsb":::"memory"); #define wmb() __asm__("dsb":::"memory"); +/* The AAPCS requires the callee (e.g. __arch_switch_threads) to preserve r4-r11. */ +#define CALLEE_SAVED_REGISTERS 8 + #endif diff --git a/include/arm/arm64/os.h b/include/arm/arm64/os.h index ae8340b..48e4a9c 100644 --- a/include/arm/arm64/os.h +++ b/include/arm/arm64/os.h @@ -49,4 +49,7 @@ static inline void local_irq_enable(void) #define wmb() dsb(st) /* Full system memory barrier store */ #define rmb() dsb(ld) /* Full system memory barrier load */ +/* 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |