forked from Imagelibrary/rtems
riscv: Remove RISCV_GCC_RED_ZONE_SIZE
The current ABI says that there is no stack red zone: https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md "Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer." Update #3433.
This commit is contained in:
@@ -164,9 +164,6 @@ uint32_t _CPU_ISR_Get_level( void );
|
||||
|
||||
/* end of ISR handler macros */
|
||||
|
||||
/* Context handler macros */
|
||||
#define RISCV_GCC_RED_ZONE_SIZE 128
|
||||
|
||||
void _CPU_Context_Initialize(
|
||||
Context_Control *context,
|
||||
void *stack_area_begin,
|
||||
|
||||
@@ -50,8 +50,7 @@ void _CPU_Context_Initialize(
|
||||
{
|
||||
uintptr_t stack = ((uintptr_t) stack_area_begin);
|
||||
|
||||
/* Account for red-zone */
|
||||
uintptr_t stack_high = stack + stack_area_size - RISCV_GCC_RED_ZONE_SIZE;
|
||||
uintptr_t stack_high = stack + stack_area_size;
|
||||
|
||||
memset(context, 0, sizeof(*context));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user