Skip to content

Commit 4939884

Browse files
committed
port: riscv: Split the number of registers and the size of the context
1 parent fe26af2 commit 4939884

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

portable/GCC/RISC-V/portContext.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,17 @@
4949
* specific version of freertos_risc_v_chip_specific_extensions.h. See the
5050
* notes at the top of portASM.S file. */
5151
#ifdef __riscv_32e
52-
#define portCONTEXT_SIZE ( 15 * portWORD_SIZE )
52+
#define portIREG_COUNT 15
5353
#define portCRITICAL_NESTING_OFFSET 13
5454
#define portMSTATUS_OFFSET 14
5555
#else
56-
#define portCONTEXT_SIZE ( 31 * portWORD_SIZE )
56+
#define portIREG_COUNT 31
5757
#define portCRITICAL_NESTING_OFFSET 29
5858
#define portMSTATUS_OFFSET 30
5959
#endif
60+
#define portICONTEXT_SIZE ( portIREG_COUNT * portWORD_SIZE )
6061

62+
#define portCONTEXT_SIZE ( portICONTEXT_SIZE )
6163
/*-----------------------------------------------------------*/
6264

6365
.extern pxCurrentTCB

0 commit comments

Comments
 (0)