rt-thread-official/libcpu/risc-v/virt64/cpuport_gcc.S

27 lines
641 B
ArmAsm
Raw Normal View History

/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-10-19 RT-Thread the first version
*/
#include "cpuport.h"
#include "stackframe.h"
#include "asm-generic.h"
START_POINT(_rt_thread_entry)
LOAD ra, (sp) /* thread exit */
2024-07-16 16:11:02 +08:00
addi sp, sp, REGBYTES
LOAD a0, (sp) /* parameter */
2024-07-16 16:11:02 +08:00
addi sp, sp, REGBYTES
LOAD t0, (sp) /* tentry */
2024-07-16 16:11:02 +08:00
addi sp, sp, REGBYTES
mv s1, ra
jalr t0
jalr s1
j . /* never here */
START_POINT_END(_rt_thread_entry)