From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32079 invoked by alias); 17 May 2005 06:22:39 -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 32047 invoked from network); 17 May 2005 06:22:36 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 17 May 2005 06:22:36 -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 j4H6Ma99005000 for ; Tue, 17 May 2005 02:22:36 -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 j4H6MUO29707; Tue, 17 May 2005 02:22:30 -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 j4H6MSa8015366; Tue, 17 May 2005 02:22:29 -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 j4H6MSYe031883; Mon, 16 May 2005 23:22:28 -0700 Received: (from rth@localhost) by ballpeen.sfbay.redhat.com (8.13.1/8.13.1/Submit) id j4H6MSl9031882; Mon, 16 May 2005 23:22:28 -0700 X-Authentication-Warning: ballpeen.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Tue, 17 May 2005 08:02:00 -0000 From: Richard Henderson To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/alpha] Add handling of FP control insn in software-single step Message-ID: <20050517062228.GA31869@redhat.com> References: <20050517023400.GW1462@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050517023400.GW1462@adacore.com> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-05/txt/msg00413.txt.bz2 On Tue, May 17, 2005 at 12:34:00PM +1000, Joel Brobecker wrote: > +fp_register_zero_p (char *buf) > +{ > + return ((buf[1] & 0x0f) == 0 && buf[2] == 0 && buf[3] == 0 > + && buf[4] == 0 && buf[5] == 0 && buf[6] == 0 && buf[7] == 0); > +} ... > + case 0x31: /* FBEQ */ > + if (fp_register_zero_p (reg)) > + goto branch_taken; > + break; > + case 0x36: /* FBGE */ > + if (fp_register_sign_bit (reg) == 0 || fp_register_zero_p (reg)) > + goto branch_taken; > + break; > + case 0x37: /* FBGT */ > + if (fp_register_sign_bit (reg) == 0 && ! fp_register_zero_p (reg)) > + goto branch_taken; > + break; > + case 0x33: /* FBLE */ > + if (fp_register_sign_bit (reg) == 1 || fp_register_zero_p (reg)) > + goto branch_taken; > + break; > + case 0x32: /* FBLT */ > + if (fp_register_sign_bit (reg) == 1 && ! fp_register_zero_p (reg)) > + goto branch_taken; > + break; > + case 0x35: /* FBNE */ > + if (! fp_register_zero_p (reg)) > + goto branch_taken; > + break; NACK. Why are you ignoring the entire exponent? These are not the operations that fp branches perform. The tests are: zero (reg & 0x7fff_ffff_ffff_ffff) == 0 sign (reg & 0x8000_0000_0000_0000) != 0 fbeq zero fbne !zero fbge !sign || zero fbgt !sign && !zero fble sign || zero fblt sign && !zero This is a nearly normal integer test, except for the special case of 0x8000_0000_0000_0000, i.e. -0.0, which is treated as zero. r~