summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/powerpc/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-12-23 11:46:08 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-09 14:05:46 +0100
commit0d0095f1f051aa32f2f8bc4710602c6f71418fc2 (patch)
tree1d82b491c70508ad14f6918abb8c2bd864fb8b4a /cpukit/score/cpu/powerpc/rtems/score
parentpowerpc: Set PPC_DEFAULT_CACHE_LINE_SIZE for e6500 (diff)
downloadrtems-0d0095f1f051aa32f2f8bc4710602c6f71418fc2.tar.bz2
powerpc: Add PPC_STACK_ALIGN_POWER
Simplify PPC_STACK_ALIGNMENT definition.
Diffstat (limited to 'cpukit/score/cpu/powerpc/rtems/score')
-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.