From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4325 invoked by alias); 11 Jun 2002 05:15:08 -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 4317 invoked from network); 11 Jun 2002 05:15:05 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 11 Jun 2002 05:15:05 -0000 Received: from culebra.cygnus.com (remus.sfbay.redhat.com [172.16.27.252]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id WAA29935 for ; Mon, 10 Jun 2002 22:15:04 -0700 (PDT) Received: (from aldyh@localhost) by culebra.cygnus.com (8.10.2/8.10.2) id g5B5EnS24733 for gdb-patches@sources.redhat.com; Tue, 11 Jun 2002 15:14:49 +1000 (EST) Date: Mon, 10 Jun 2002 22:15:00 -0000 From: Aldy Hernandez To: gdb-patches@sources.redhat.com Subject: patch: init exponent for sim_fpu_class_zero Message-ID: <20020611051437.GA22845@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i X-SW-Source: 2002-06/txt/msg00168.txt.bz2 howdy. in sim-fpu.c, the exponent is left undefined for zeros (sim_fpu_class_zero). i am working on a port whose multiply and divide instructions check the value of the operands' exponent and sign to determine overflow bits to set. this is obviously not working when the exponent is undefined ;-). i have verified that i can build the sim and gdb after my change (for powerpc-eabi). ok to install? 2002-06-09 Aldy Hernandez * sim-fpu.c (unpack_fpu): Initialize exponent for sim_fpu_class_zero. (i2fpu): Same. (sim_fpu_sqrt): Same. Index: sim-fpu.c =================================================================== RCS file: /cvs/src/src/sim/common/sim-fpu.c,v retrieving revision 1.3 diff -c -r1.3 sim-fpu.c *** sim-fpu.c 23 Dec 2000 11:51:04 -0000 1.3 --- sim-fpu.c 11 Jun 2002 05:14:16 -0000 *************** *** 330,335 **** --- 330,336 ---- /* tastes like zero */ dst->class = sim_fpu_class_zero; dst->sign = sign; + dst->normal_exp = 0; } else { *************** *** 520,525 **** --- 521,527 ---- { f->class = sim_fpu_class_zero; f->sign = 0; + f->normal_exp = 0; } else { *************** *** 648,653 **** --- 650,656 ---- { f->class = sim_fpu_class_zero; f->sign = 0; + f->normal_exp = 0; } else { *************** *** 1799,1804 **** --- 1802,1808 ---- { f->class = sim_fpu_class_zero; f->sign = r->sign; + f->normal_exp = 0; return 0; } if (sim_fpu_is_infinity (r))