vector_gcc.S 964 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024-03-28 Shell Move vector handling codes from context_gcc.S
  9. */
  10. #ifndef __ASSEMBLY__
  11. #define __ASSEMBLY__
  12. #endif
  13. #include "../include/vector_gcc.h"
  14. #include "context_gcc.h"
  15. .section .text
  16. .globl vector_fiq
  17. vector_fiq:
  18. b .
  19. .globl rt_hw_irq_exit
  20. START_POINT(vector_irq)
  21. SAVE_IRQ_CONTEXT
  22. stp x0, x1, [sp, #-0x10]! /* X0 is thread sp */
  23. bl rt_interrupt_enter
  24. ldp x0, x1, [sp]
  25. #ifdef RT_USING_SMART
  26. SAVE_USER_CTX
  27. #endif /* RT_USING_SMART */
  28. bl rt_hw_trap_irq
  29. #ifdef RT_USING_SMART
  30. ldp x0, x1, [sp]
  31. RESTORE_USER_CTX x0
  32. #endif /* RT_USING_SMART */
  33. bl rt_interrupt_leave
  34. ldp x0, x1, [sp], #0x10
  35. bl rt_scheduler_do_irq_switch
  36. rt_hw_irq_exit:
  37. RESTORE_IRQ_CONTEXT
  38. START_POINT_END(vector_irq)