Blame SOURCES/gdb-rhbz1125820-ppc64le-enablement-31of37.patch

7ab123
commit 52f548e41f085550d7740c350c1c8a239532af77
7ab123
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
7ab123
Date:   Tue Feb 4 18:41:36 2014 +0100
7ab123
7ab123
    PowerPC64 ELFv2 ABI: stack frame layout changes
7ab123
    
7ab123
    This implementes another change in ELFv2: the stack frame no longer
7ab123
    contains the reserved double words for linker and compiler use
7ab123
    (which weren't really used for much of anything anyway).  This
7ab123
    affects placement of on-stack parameters in inferior calls.
7ab123
    
7ab123
    gdb/ChangeLog:
7ab123
    
7ab123
    	* ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Use correct
7ab123
    	offset to the stack parameter list for the ELFv2 ABI.
7ab123
7ab123
Index: gdb-7.6.1/gdb/ppc-sysv-tdep.c
7ab123
===================================================================
7ab123
--- gdb-7.6.1.orig/gdb/ppc-sysv-tdep.c
7ab123
+++ gdb-7.6.1/gdb/ppc-sysv-tdep.c
7ab123
@@ -1473,9 +1473,13 @@ ppc64_sysv_abi_push_dummy_call (struct g
7ab123
 	  argpos.regcache = regcache;
7ab123
 	  argpos.refparam = align_down (sp - refparam_size, 16);
7ab123
 	  argpos.gparam = align_down (argpos.refparam - gparam_size, 16);
7ab123
-	  /* Add in space for the TOC, link editor double word,
7ab123
-	     compiler double word, LR save area, CR save area.  */
7ab123
-	  sp = align_down (argpos.gparam - 48, 16);
7ab123
+	  /* Add in space for the TOC, link editor double word (v1 only),
7ab123
+	     compiler double word (v1 only), LR save area, CR save area,
7ab123
+	     and backchain.  */
7ab123
+	  if (tdep->elf_abi == POWERPC_ELF_V1)
7ab123
+	    sp = align_down (argpos.gparam - 48, 16);
7ab123
+	  else
7ab123
+	    sp = align_down (argpos.gparam - 32, 16);
7ab123
 	}
7ab123
 
7ab123
       /* If the function is returning a `struct', then there is an