vector_gcc.S 928 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. .globl vector_fiq
  16. vector_fiq:
  17. b .
  18. START_POINT(vector_irq)
  19. SAVE_IRQ_CONTEXT
  20. stp x0, x1, [sp, #-0x10]! /* X0 is thread sp */
  21. bl rt_interrupt_enter
  22. ldp x0, x1, [sp]
  23. #ifdef RT_USING_SMART
  24. SAVE_USER_CTX
  25. #endif /* RT_USING_SMART */
  26. bl rt_hw_trap_irq
  27. #ifdef RT_USING_SMART
  28. ldp x0, x1, [sp]
  29. RESTORE_USER_CTX x0
  30. #endif /* RT_USING_SMART */
  31. bl rt_interrupt_leave
  32. ldp x0, x1, [sp], #0x10
  33. bl rt_scheduler_do_irq_switch
  34. mov x0, sp
  35. RESTORE_IRQ_CONTEXT
  36. START_POINT_END(vector_irq)