diff options
| author | Frédéric Desbiens <[email protected]> | 2026-10-02 10:42:44 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-10-02 10:42:44 -0400 |
| commit | 93387b0a60382a29579bbad5045c68328e3751df (patch) | |
| tree | 42be790d602cb76f55090e5a7c418df7ea2b3428 /ports/risc-v32/iar/src/tx_thread_context_save.s | |
| parent | 44d7c95c582d415c4ad84527180b29c93c3bf664 (diff) | |
| parent | 28281cd5647d4671236ca08d19bd18ed15b2265a (diff) | |
Merge pull request #783 from eclipse-threadx/devv6.5.2.202603_rel
Merged changes ahead of the v6.5.2.202603 release
Diffstat (limited to 'ports/risc-v32/iar/src/tx_thread_context_save.s')
| -rw-r--r-- | ports/risc-v32/iar/src/tx_thread_context_save.s | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ports/risc-v32/iar/src/tx_thread_context_save.s b/ports/risc-v32/iar/src/tx_thread_context_save.s index 00b971ef..68bfdac9 100644 --- a/ports/risc-v32/iar/src/tx_thread_context_save.s +++ b/ports/risc-v32/iar/src/tx_thread_context_save.s @@ -9,6 +9,7 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +; Portions of this file were generated with AI assistance. /**************************************************************************/ /**************************************************************************/ @@ -145,7 +146,11 @@ _tx_thread_context_save: #endif #ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY + addi sp, sp, -16 ; Reserve space to save the return address + sw ra, 0(sp) ; Save the return address call _tx_execution_isr_enter ; Call the ISR execution enter function + lw ra, 0(sp) ; Recover the return address + addi sp, sp, 16 ; Recover the reserved stack space #endif ret ; Return to calling ISR @@ -223,7 +228,11 @@ _tx_thread_not_nested_save: #ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY /* _tx_execution_isr_enter is called with thread stack pointer */ + addi sp, sp, -16 ; Reserve space to save the return address + sw ra, 0(sp) ; Save the return address call _tx_execution_isr_enter ; Call the ISR execution enter function + lw ra, 0(sp) ; Recover the return address + addi sp, sp, 16 ; Recover the reserved stack space #endif @@ -238,7 +247,11 @@ _tx_thread_idle_system_save: #ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY + addi sp, sp, -16 ; Reserve space to save the return address + sw ra, 0(sp) ; Save the return address call _tx_execution_isr_enter ; Call the ISR execution enter function + lw ra, 0(sp) ; Recover the return address + addi sp, sp, 16 ; Recover the reserved stack space #endif /* Interrupt occurred in the scheduling loop. */ |
