From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30359 invoked by alias); 2 Oct 2002 02:58:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30350 invoked from network); 2 Oct 2002 02:58:10 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 2 Oct 2002 02:58:10 -0000 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by touchme.toronto.redhat.com (Postfix) with ESMTP id E59568000F4 for ; Tue, 1 Oct 2002 22:58:09 -0400 (EDT) Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3CEE93ED5 for ; Tue, 1 Oct 2002 22:58:12 -0400 (EDT) Message-ID: <3D9A60C4.1040906@redhat.com> Date: Tue, 01 Oct 2002 19:58:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [rfa/ppc] correctly bias alloca_reg Content-Type: multipart/mixed; boundary="------------090609060900050801040100" X-SW-Source: 2002-10/txt/msg00038.txt.bz2 This is a multi-part message in MIME format. --------------090609060900050801040100 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 295 Hello, The attached patch fixes the regnum value assigned to alloca_reg so that it is baised by gpr0's regnum value The code was assuming that GPR 32, for instance had a regnum of 31 :-( It fixes the failure: gdb.base/call-ar-st.exp: check args of sum_array_print for the e500. ok? Andrew --------------090609060900050801040100 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 1321 2002-10-01 Andrew Cagney * rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.86 diff -u -r1.86 rs6000-tdep.c --- rs6000-tdep.c 1 Oct 2002 14:57:55 -0000 1.86 +++ rs6000-tdep.c 2 Oct 2002 02:46:32 -0000 @@ -465,6 +465,7 @@ int prev_insn_was_prologue_insn = 1; int num_skip_non_prologue_insns = 0; const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (current_gdbarch); + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); /* Attempt to find the end of the prologue when no limit is specified. Note that refine_prologue_limit() has been written so that it may @@ -694,7 +695,7 @@ { /* mr r31, r1 */ fdata->frameless = 0; framep = 1; - fdata->alloca_reg = 31; + fdata->alloca_reg = (tdep->ppc_gp0_regnum + 31); continue; /* Another way to set up the frame pointer. */ @@ -703,7 +704,8 @@ { /* addi rX, r1, 0x0 */ fdata->frameless = 0; framep = 1; - fdata->alloca_reg = (op & ~0x38010000) >> 21; + fdata->alloca_reg = (tdep->ppc_gp0_regnum + + ((op & ~0x38010000) >> 21)); continue; } /* AltiVec related instructions. */ --------------090609060900050801040100--