cpuport_gcc.S 620 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-10-19 RT-Thread the first version
  9. */
  10. #include "cpuport.h"
  11. #include "stackframe.h"
  12. #include "asm-generic.h"
  13. START_POINT(_rt_thread_entry)
  14. LOAD ra, (sp) /* thread exit */
  15. addi sp, sp, 8
  16. LOAD a0, (sp) /* parameter */
  17. addi sp, sp, 8
  18. LOAD t0, (sp) /* tentry */
  19. addi sp, sp, 8
  20. mv s1, ra
  21. jalr t0
  22. jalr s1
  23. j . /* never here */
  24. START_POINT_END(_rt_thread_entry)