From b0deb61bc4768bc82f9e7e1896ed0669eeb9de7e Mon Sep 17 00:00:00 2001 From: Shell Date: Sat, 16 Sep 2023 11:52:42 +0800 Subject: [PATCH] [libcpu/aarch64] fix compile error (#8045) Signed-off-by: Shell --- libcpu/aarch64/common/context_gcc.S | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libcpu/aarch64/common/context_gcc.S b/libcpu/aarch64/common/context_gcc.S index e3487c9135..1e36cbc9f4 100644 --- a/libcpu/aarch64/common/context_gcc.S +++ b/libcpu/aarch64/common/context_gcc.S @@ -268,6 +268,17 @@ START_POINT_END(_thread_start) ERET .endm +.macro SAVE_USER_CTX + MRS X1, SPSR_EL1 + AND X1, X1, 0xf + CMP X1, XZR + + BNE 1f + BL lwp_uthread_ctx_save + LDP X0, X1, [SP] +1: +.endm + #ifdef RT_USING_SMP #define rt_hw_interrupt_disable rt_hw_local_irq_disable #define rt_hw_interrupt_enable rt_hw_local_irq_enable @@ -376,17 +387,6 @@ rt_hw_context_switch_interrupt: vector_fiq: B . -.macro SAVE_USER_CTX - MRS X1, SPSR_EL1 - AND X1, X1, 0xf - CMP X1, XZR - - BNE 1f - BL lwp_uthread_ctx_save - LDP X0, X1, [SP] -1: -.endm - .globl vector_irq vector_irq: SAVE_CONTEXT