From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20434 invoked by alias); 26 Mar 2004 14:12:05 -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 20378 invoked from network); 26 Mar 2004 14:12:00 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 26 Mar 2004 14:12:00 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2QEC01X016626 for ; Fri, 26 Mar 2004 09:12:00 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2Q5Gsj08353 for ; Fri, 26 Mar 2004 00:16:54 -0500 Received: from localhost.localdomain (vpn50-9.rdu.redhat.com [172.16.50.9]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i2Q5Gr53020375; Fri, 26 Mar 2004 00:16:53 -0500 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.10/8.12.10) with SMTP id i2Q5GmOR013196; Thu, 25 Mar 2004 22:16:48 -0700 Date: Fri, 26 Mar 2004 14:12:00 -0000 From: Kevin Buettner To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: recognize new instructions in rs6000 prologues Message-Id: <20040325221648.77308418@saguaro> In-Reply-To: References: Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00658.txt.bz2 On 24 Mar 2004 10:10:04 -0500 Jim Blandy wrote: > > These prologues are generated by a not-yet-released compiler, but the > test suite does catch the problem. > > 2004-02-25 Jim Blandy > > * rs6000-tdep.c (skip_prologue): Recognize moves from argument > registers to temp register r0 and byte stores as prologue > instructions. > > *** gdb/rs6000-tdep.c.~2~ 2004-02-25 15:14:13.000000000 -0500 > --- gdb/rs6000-tdep.c 2004-02-25 15:15:43.000000000 -0500 > *************** > *** 772,777 **** > --- 772,785 ---- > > /* store parameters in stack */ > } > + /* Move parameters from argument registers to temporary register. */ > + else if ((op & 0xfc0007fe) == 0x7c000378 && /* mr(.) Rx,Ry */ > + (((op >> 21) & 31) >= 3) && /* R3 >= Ry >= R10 */ > + (((op >> 21) & 31) <= 10) && > + (((op >> 16) & 31) == 0)) /* Rx: scratch register r0 */ > + { > + continue; > + } Is this case really needed? I would have thought that the catchall case at the end would handle this situation. I'm concerned that adding this case may cause us to overshoot the prologue in some circumstances. (Of course, there's a danger of doing that anyway...) > else if ((op & 0xfc1f0003) == 0xf8010000 || /* std rx,NUM(r1) */ > (op & 0xfc1f0000) == 0xd8010000 || /* stfd Rx,NUM(r1) */ > (op & 0xfc1f0000) == 0xfc010000) /* frsp, fp?,NUM(r1) */ > *************** > *** 781,790 **** > /* store parameters in stack via frame pointer */ > } > else if (framep && > ! ((op & 0xfc1f0000) == 0x901f0000 || /* st rx,NUM(r1) */ > ! (op & 0xfc1f0000) == 0xd81f0000 || /* stfd Rx,NUM(r1) */ > ! (op & 0xfc1f0000) == 0xfc1f0000)) > ! { /* frsp, fp?,NUM(r1) */ > continue; > > /* Set up frame pointer */ > --- 789,799 ---- > /* store parameters in stack via frame pointer */ > } > else if (framep && > ! ((op & 0xfc1f0000) == 0x901f0000 || /* st rx,NUM(r31) */ > ! (op & 0xfc1f0000) == 0x981f0000 || /* stb Rx,NUM(r31) */ > ! (op & 0xfc1f0000) == 0xd81f0000 || /* stfd Rx,NUM(r31) */ > ! (op & 0xfc1f0000) == 0xfc1f0000)) /* frsp, fp?,NUM(r31) */ > ! { > continue; > > /* Set up frame pointer */ This part is okay. Kevin