From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19305 invoked by alias); 15 Jun 2003 17:04:20 -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 19107 invoked from network); 15 Jun 2003 17:04:11 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 15 Jun 2003 17:04:11 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 19F402B5F; Sun, 15 Jun 2003 13:03:59 -0400 (EDT) Message-ID: <3EECA6FE.4010407@redhat.com> Date: Sun, 15 Jun 2003 17:04:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Sandiford Cc: gdb-patches@sources.redhat.com Subject: Re: [mips sim]: Fix check for negative dmult operands References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00517.txt.bz2 > Ping? > > Richard Sandiford writes: > >> do_dmultx tests for negative operands with: >> >> if (op1 < 0) >> { >> op1 = - op1; >> ++sign; >> } >> if (op2 < 0) >> { >> op2 = - op2; >> ++sign; >> } >> >> but op1 and op2 are unsigned... >> >> The patch below fixes some gcc.c-torture/execute/950426-2.c failures >> on mipsisa64-elf. Please install if OK. (I'm not ment to be maintaing MIPS sim any more :-) Yes, just add a comment reminding the reader that op1 is already 64 bits. Andrew >> Richard >> >> >> * mips.igen (do_dmultx): Fix check for negative operands. >> >> Index: sim/mips/mips.igen >> =================================================================== >> RCS file: /cvs/src/src/sim/mips/mips.igen,v >> retrieving revision 1.53 >> diff -u -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.53 mips.igen >> --- sim/mips/mips.igen 14 Jan 2003 19:01:41 -0000 1.53 >> +++ sim/mips/mips.igen 7 Jun 2003 10:14:00 -0000 >> @@ -1347,12 +1350,12 @@ 000000,5.RS,5.RT,0000000000,011011:SPECI >> sign = 0; >> if (signed_p) >> { >> - if (op1 < 0) >> + if ((signed64) op1 < 0) >> { >> op1 = - op1; >> ++sign; >> } >> - if (op2 < 0) >> + if ((signed64) op2 < 0) >> { >> op2 = - op2; >> ++sign; > >