From 443fa49e56dd3589f9d675b5ed7c0e2743dcaf5b Mon Sep 17 00:00:00 2001 From: heyuanjie87 <943313837@qq.com> Date: Tue, 10 May 2022 19:08:59 +0800 Subject: [PATCH] =?UTF-8?q?[aarch64]=E4=BF=AE=E6=AD=A3=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=8F=98=E9=87=8F=E5=9C=B0=E5=9D=80=E8=B6=85?= =?UTF-8?q?adr=E8=AE=BF=E9=97=AE=E8=8C=83=E5=9B=B4=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libcpu/aarch64/common/context_gcc.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libcpu/aarch64/common/context_gcc.S b/libcpu/aarch64/common/context_gcc.S index cbc1e6aa4f..3711342240 100644 --- a/libcpu/aarch64/common/context_gcc.S +++ b/libcpu/aarch64/common/context_gcc.S @@ -411,11 +411,11 @@ rt_hw_context_switch: .globl rt_interrupt_to_thread .globl rt_hw_context_switch_interrupt rt_hw_context_switch_interrupt: - ADR X6, rt_thread_switch_interrupt_flag + LDR X6, =rt_thread_switch_interrupt_flag LDR X7, [X6] CMP X7, #1 B.EQ _reswitch - ADR X4, rt_interrupt_from_thread // set rt_interrupt_from_thread + LDR X4, =rt_interrupt_from_thread // set rt_interrupt_from_thread STR X0, [X4] MOV X7, #1 // set rt_thread_switch_interrupt_flag to 1 STR X7, [X6] @@ -424,7 +424,7 @@ rt_hw_context_switch_interrupt: BL lwp_user_setting_save LDP X1, X30, [SP], #0x10 _reswitch: - ADR X6, rt_interrupt_to_thread // set rt_interrupt_to_thread + LDR X6, =rt_interrupt_to_thread // set rt_interrupt_to_thread STR X1, [X6] RET @@ -464,7 +464,7 @@ vector_irq: // if rt_thread_switch_interrupt_flag set, jump to // rt_hw_context_switch_interrupt_do and don't return - ADR X1, rt_thread_switch_interrupt_flag + LDR X1, =rt_thread_switch_interrupt_flag LDR X2, [X1] CMP X2, #1 B.NE vector_irq_exit @@ -472,11 +472,11 @@ vector_irq: MOV X2, #0 // clear flag STR X2, [X1] - ADR X3, rt_interrupt_from_thread + LDR X3, =rt_interrupt_from_thread LDR X4, [X3] STR x0, [X4] // store sp in preempted tasks's TCB - ADR x3, rt_interrupt_to_thread + LDR x3, =rt_interrupt_to_thread LDR X4, [X3] LDR x0, [X4] // get new task's stack pointer -- Gitee