arch/xtensa/src/commin/xtensa_usestack&createstack.c: Set the alignment

to be 4 bytes.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2020-10-12 17:01:46 +01:00 committed by Alan Carvalho de Assis
parent 172896728f
commit 0182e6e8bb
2 changed files with 6 additions and 16 deletions

View File

@ -60,17 +60,13 @@
* Pre-processor Macros
****************************************************************************/
/* XTENSA requires at least a 4-byte stack alignment. For floating point
* use, however, the stack must be aligned to 8-byte addresses.
*
* REVIST: Is this true? Comes from ARM EABI
*/
/* XTENSA requires at least a 4-byte stack alignment. */
#define STACK_ALIGNMENT 8
#define STACK_ALIGNMENT 4
/* Stack alignment macros */
#define STACK_ALIGN_MASK (STACK_ALIGNMENT-1)
#define STACK_ALIGN_MASK (STACK_ALIGNMENT - 1)
#define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
#define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)

View File

@ -54,19 +54,13 @@
* Pre-processor Definitions
****************************************************************************/
/* XTENSA requires at least a 4-byte stack alignment. For floating point
* use, however, the stack must be aligned to 8-byte addresses.
*/
/* XTENSA requires at least a 4-byte stack alignment. */
#ifdef CONFIG_LIBC_FLOATINGPOINT
# define STACK_ALIGNMENT 8
#else
# define STACK_ALIGNMENT 4
#endif
#define STACK_ALIGNMENT 4
/* Stack alignment macros */
#define STACK_ALIGN_MASK (STACK_ALIGNMENT-1)
#define STACK_ALIGN_MASK (STACK_ALIGNMENT - 1)
#define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
#define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)