From 0d0095f1f051aa32f2f8bc4710602c6f71418fc2 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 23 Dec 2014 11:46:08 +0100 Subject: powerpc: Add PPC_STACK_ALIGN_POWER Simplify PPC_STACK_ALIGNMENT definition. --- cpukit/score/cpu/powerpc/rtems/score/powerpc.h | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'cpukit/score/cpu/powerpc/rtems/score') diff --git a/cpukit/score/cpu/powerpc/rtems/score/powerpc.h b/cpukit/score/cpu/powerpc/rtems/score/powerpc.h index 90cbbd1db3..7eaa237125 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/powerpc.h +++ b/cpukit/score/cpu/powerpc/rtems/score/powerpc.h @@ -108,23 +108,13 @@ extern "C" { #define PPC_ABI PPC_ABI_EABI #endif -#if (PPC_ABI == PPC_ABI_SVR4) || defined(__ALTIVEC__) -#define PPC_STACK_ALIGNMENT 16 -#elif (PPC_ABI == PPC_ABI_EABI) -#if 1 -/* Till.S: 2008/07/10; AFAIK, the CPU_STACK_ALIGNMENT is only - * used to align the top of the stack. We don't lose much - * if we always align TOS to 16-bytes but we then are always - * OK, even if the user tells the compiler to generate 16-byte - * alignment. +/* + * Use worst case stack alignment. For the EABI an 8-byte alignment would be + * sufficient. */ -#define PPC_STACK_ALIGNMENT 16 -#else -#define PPC_STACK_ALIGNMENT 8 -#endif -#else -#error "PPC_ABI is not properly defined" -#endif + +#define PPC_STACK_ALIGN_POWER 4 +#define PPC_STACK_ALIGNMENT (1 << PPC_STACK_ALIGN_POWER) /* * Assume PPC_HAS_FPU to be a synonym for _SOFT_FLOAT. -- cgit v1.2.3