diff options
| author | Frédéric Desbiens <[email protected]> | 2026-03-06 19:27:49 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-06 19:27:49 +0100 |
| commit | 3726d7906b4808bfec7855fc088e073199df9120 (patch) | |
| tree | 8789bfd03d1d49e1967e80d04aa4ff606fda43eb /ports/risc-v32/iar/src/tx_thread_stack_build.s | |
| parent | 4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff) | |
| parent | c3259a216026372e3833dd8996a68f77e8595fbd (diff) | |
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'ports/risc-v32/iar/src/tx_thread_stack_build.s')
| -rw-r--r-- | ports/risc-v32/iar/src/tx_thread_stack_build.s | 76 |
1 files changed, 35 insertions, 41 deletions
diff --git a/ports/risc-v32/iar/src/tx_thread_stack_build.s b/ports/risc-v32/iar/src/tx_thread_stack_build.s index 09b6ef09..eb850146 100644 --- a/ports/risc-v32/iar/src/tx_thread_stack_build.s +++ b/ports/risc-v32/iar/src/tx_thread_stack_build.s @@ -1,18 +1,19 @@ /*************************************************************************** - * Copyright (c) 2024 Microsoft Corporation - * + * Copyright (c) 2024 Microsoft Corporation + * Copyright (c) 2026-present Eclipse ThreadX contributors + * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. - * + * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ -/** */ -/** ThreadX Component */ +/** */ +/** ThreadX Component */ /** */ /** Thread */ /** */ @@ -30,56 +31,49 @@ SECTION `.text`:CODE:REORDER:NOROOT(2) CODE -/**************************************************************************/ -/* */ -/* FUNCTION RELEASE */ -/* */ +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ /* _tx_thread_stack_build RISC-V32/IAR */ /* 6.1 */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Microsoft Corporation */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Microsoft Corporation */ /* Tom van Leeuwen, Technolution B.V. */ -/* */ -/* DESCRIPTION */ -/* */ +/* */ +/* DESCRIPTION */ +/* */ /* This function builds a stack frame on the supplied thread's stack. */ /* The stack frame results in a fake interrupt return to the supplied */ -/* function pointer. */ -/* */ -/* INPUT */ -/* */ +/* function pointer. */ +/* */ +/* INPUT */ +/* */ /* thread_ptr Pointer to thread control blk */ /* function_ptr Pointer to return function */ -/* */ -/* OUTPUT */ -/* */ +/* */ +/* OUTPUT */ +/* */ /* None */ -/* */ -/* CALLS */ -/* */ +/* */ +/* CALLS */ +/* */ /* None */ -/* */ -/* CALLED BY */ -/* */ +/* */ +/* CALLED BY */ +/* */ /* _tx_thread_create Create thread service */ -/* */ -/* RELEASE HISTORY */ -/* */ -/* DATE NAME DESCRIPTION */ -/* */ -/* 09-30-2020 William E. Lamie Initial Version 6.1 */ -/* */ -/**************************************************************************/ +/**************************************************************************/ /* VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID)) { */ PUBLIC _tx_thread_stack_build _tx_thread_stack_build: - + /* Build a fake interrupt frame. The form of the fake interrupt stack on the RISC-V RV32 should look like the following after it is built: - + Stack Top: 1 (00) Interrupt stack frame type x27 (04) Initial s11 x26 (08) Initial s10 @@ -153,7 +147,7 @@ If floating point support: /* Actually build the stack frame. */ -#if __iar_riscv_base_isa == rv32e +#if __iar_riscv_base_isa == rv32e addi t0, t0, -260 #else addi t0, t0, -128 ; Allocate space for the stack frame @@ -189,7 +183,7 @@ If floating point support: sw x0, 108(t0) ; Initial a0 sw x0, 112(t0) ; Initial ra sw a1, 120(t0) ; Initial mepc -#if __iar_riscv_base_isa == rv32e +#if __iar_riscv_base_isa == rv32e sw x0, 124(t0) ; Inital ft0 sw x0, 128(t0) ; Inital ft1 sw x0, 132(t0) ; Inital ft2 @@ -236,4 +230,4 @@ If floating point support: ret ; control block and return /* } */ END - + |
