powerpc: Fix ABIv2 issues with stack offsets in assembly code
authorAnton Blanchard <anton@samba.org>
Tue, 4 Feb 2014 05:09:02 +0000 (16:09 +1100)
committerAnton Blanchard <anton@samba.org>
Wed, 23 Apr 2014 00:05:23 +0000 (10:05 +1000)
Fix STK_PARAM and use it instead of hardcoding ABIv1 offsets.

Signed-off-by: Anton Blanchard <anton@samba.org>
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/lib/copypage_power7.S
arch/powerpc/lib/copyuser_power7.S
arch/powerpc/lib/memcpy_64.S
arch/powerpc/lib/memcpy_power7.S

index 5394d41..3185d11 100644 (file)
@@ -189,7 +189,11 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR)
 #define __STK_REG(i)   (112 + ((i)-14)*8)
 #define STK_REG(i)     __STK_REG(__REG_##i)
 
+#if defined(_CALL_ELF) && _CALL_ELF == 2
+#define __STK_PARAM(i) (32 + ((i)-3)*8)
+#else
 #define __STK_PARAM(i) (48 + ((i)-3)*8)
+#endif
 #define STK_PARAM(i)   __STK_PARAM(__REG_##i)
 
 #if defined(_CALL_ELF) && _CALL_ELF == 2
Simple merge
Simple merge
Simple merge
Simple merge