From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1353 invoked by alias); 20 May 2005 06:18:21 -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 1289 invoked from network); 20 May 2005 06:18:16 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 20 May 2005 06:18:16 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j4K6IG0R029205 for ; Fri, 20 May 2005 02:18:16 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j4K6IFO30053; Fri, 20 May 2005 02:18:16 -0400 Received: from ballpeen.sfbay.redhat.com (ballpeen.sfbay.redhat.com [172.16.24.33]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id j4K6IDa8030879; Fri, 20 May 2005 02:18:14 -0400 Received: from ballpeen.sfbay.redhat.com (ballpeen.sfbay.redhat.com [127.0.0.1]) by ballpeen.sfbay.redhat.com (8.13.1/8.13.1) with ESMTP id j4K6IDQQ002453; Thu, 19 May 2005 23:18:13 -0700 Received: (from rth@localhost) by ballpeen.sfbay.redhat.com (8.13.1/8.13.1/Submit) id j4K6IB0T002452; Thu, 19 May 2005 23:18:11 -0700 X-Authentication-Warning: ballpeen.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Fri, 20 May 2005 11:31:00 -0000 From: Richard Henderson To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [testsuite/alpha] Add test for step over fbne instruction Message-ID: <20050520061810.GA29720@redhat.com> References: <20050520034254.GZ1462@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050520034254.GZ1462@adacore.com> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-05/txt/msg00486.txt.bz2 On Fri, May 20, 2005 at 01:42:54PM +1000, Joel Brobecker wrote: > int > main (void) > { > gt (); > > return 0; > } > > /* gt(). Obtained from the following code: > > void > gt (void) > { > double a = 360.0; > > if (a > 0) > a = 0.0; > else > a = -a; > } > > The purpose of the test is to stop just before the check against > zero, and do a stepi. GDB should step one instruction and stop, > rather than letting the program continue until the it terminates. */ > > asm(" .rdata\n" > " .align 3\n" .rdata is an ecoff thing; it won't work for elf systems. I suggest that you pass in this data from main and leave the symbol work to the compiler. That is, extern double gt(double); int main () { gt (360.0); gt (-360.0); return 0; } /* double gt(double a) { if (a > 0) a = 0; else a = -a; return a; } */ asm ( " .text\n" " .ent gt\n" "gt:\n" " .frame $30,0,$26,0" " .prologue 0\n" " cpys $f31,$f31,$f0\n" " fble $f16,$gt_1\n" /* stop at this instruction. */ " cpysn $f16,$f16,$f0\n" "$gt_1:\n" " ret $31,($26),1\n" " .end gt\n"); I might also suggest that you test both branch directions. r~