[rtems commit] riscv: Remove RISCV_GCC_RED_ZONE_SIZE
Sebastian Huber
sebh at rtems.org
Fri Jun 29 09:58:46 UTC 2018
Module: rtems
Branch: master
Commit: 98f051efed0b415cce5c19d3f4a71858091a3cef
Changeset: http://git.rtems.org/rtems/commit/?id=98f051efed0b415cce5c19d3f4a71858091a3cef
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jun 27 08:08:10 2018 +0200
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.
---
cpukit/score/cpu/riscv/include/rtems/score/cpu.h | 3 ---
cpukit/score/cpu/riscv/riscv-context-initialize.c | 3 +--
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
index 4d9f828..564812c 100644
--- a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
@@ -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,
diff --git a/cpukit/score/cpu/riscv/riscv-context-initialize.c b/cpukit/score/cpu/riscv/riscv-context-initialize.c
index 03fcc5c..619c691 100644
--- a/cpukit/score/cpu/riscv/riscv-context-initialize.c
+++ b/cpukit/score/cpu/riscv/riscv-context-initialize.c
@@ -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));
More information about the vc
mailing list