mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-10-10 08:02:57 -04:00
comment: clarify FPU context offset calculation in RISC-V portContext.h
This commit is contained in:
parent
f006492046
commit
ee4636fa66
1 changed files with 4 additions and 3 deletions
|
|
@ -94,9 +94,10 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reserve space at the beginning of the FPU context block for:
|
* Reserve space at the beginning of the FPU context block for:
|
||||||
* 1. The FCSR (Floating-Point Control and Status Register).
|
* 1. The FCSR (one portWORD_SIZE slot).
|
||||||
* 2. Padding to ensure proper memory/stack alignment (8-byte alignment for
|
* 2. Padding (one portWORD_SIZE slot) to align the FP registers:
|
||||||
* RV32D, and 16-byte stack alignment mandated by the RISC-V ABI for RV64).
|
* - RV32: 8-byte boundary for double-precision registers.
|
||||||
|
* - RV64: 16-byte boundary mandated by the RISC-V ABI.
|
||||||
*/
|
*/
|
||||||
#define portFPU_REG_OFFSET( regIndex ) ( ( 2 * portWORD_SIZE ) + ( regIndex * portFPU_REG_SIZE ) )
|
#define portFPU_REG_OFFSET( regIndex ) ( ( 2 * portWORD_SIZE ) + ( regIndex * portFPU_REG_SIZE ) )
|
||||||
#define portFPU_CONTEXT_SIZE ( portFPU_REG_SIZE * portFPU_REG_COUNT )
|
#define portFPU_CONTEXT_SIZE ( portFPU_REG_SIZE * portFPU_REG_COUNT )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue