Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libcpu]riscv使用call指令解决长跳转问题 #9652

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libcpu/risc-v/common64/context_gcc.S
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
rt_hw_context_switch_to:
LOAD sp, (a0)

jal rt_thread_self
call rt_thread_self
mv s1, a0

#ifdef RT_USING_SMART
jal lwp_aspace_switch
call lwp_aspace_switch
#endif

RESTORE_CONTEXT
Expand All @@ -104,11 +104,11 @@ rt_hw_context_switch:
LOAD sp, (a1)

// restore Address Space
jal rt_thread_self
call rt_thread_self
mv s1, a0

#ifdef RT_USING_SMART
jal lwp_aspace_switch
call lwp_aspace_switch
#endif

RESTORE_CONTEXT
Expand Down
6 changes: 4 additions & 2 deletions libcpu/risc-v/common64/interrupt_gcc.S
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ _distinguish_syscall:
#ifdef RT_USING_SMART
// TODO swap 8 with config macro name
li t1, 8
beq t0, t1, syscall_entry
bne t0, t1, _handle_interrupt_and_exception
call syscall_entry
// syscall never return here
#endif

Expand Down Expand Up @@ -78,7 +79,8 @@ _resume_execution:
#ifdef RT_USING_SMART
LOAD t0, FRAME_OFF_SSTATUS(sp)
andi t0, t0, SSTATUS_SPP
beqz t0, arch_ret_to_user
bnez t0, _resume_kernel
call arch_ret_to_user
#endif

_resume_kernel:
Expand Down
Loading