summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/powerpc/rtems/score/powerpc.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/cpu/powerpc/rtems/score/powerpc.h')
-rw-r--r--cpukit/score/cpu/powerpc/rtems/score/powerpc.h22
1 files changed, 6 insertions, 16 deletions
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.