From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17548 invoked by alias); 5 Mar 2002 19:09:38 -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 17396 invoked from network); 5 Mar 2002 19:09:31 -0000 Received: from unknown (HELO mms3.broadcom.com) (63.70.210.38) by sources.redhat.com with SMTP; 5 Mar 2002 19:09:32 -0000 Received: from 63.70.210.1 by mms3.broadcom.com with ESMTP (Broadcom MMS-3 SMTP Relay (MMS v4.7)); Tue, 05 Mar 2002 11:09:26 -0800 X-Server-Uuid: 1e1caf3a-b686-11d4-a6a3-00508bfc9ae5 Received: from dt-sj3-118.sj.broadcom.com (dt-sj3-118 [10.21.64.118]) by mail-sj1-5.sj.broadcom.com (8.12.2/8.12.2) with ESMTP id g25J9U1S011304; Tue, 5 Mar 2002 11:09:30 -0800 (PST) Received: (from cgd@localhost) by dt-sj3-118.sj.broadcom.com ( 8.9.1/SJ8.9.1) id LAA23947; Tue, 5 Mar 2002 11:09:29 -0800 (PST) To: cagney@redhat.com cc: gdb-patches@sources.redhat.com Subject: [MIPS sim PATCH] Remove SIGNEXTEND. From: cgd@broadcom.com Date: Tue, 05 Mar 2002 11:09:00 -0000 Message-ID: X-Mailer: Gnus v5.7/Emacs 20.4 MIME-Version: 1.0 X-WSS-ID: 109BC86C486570-01-01 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00051.txt.bz2 Hi Andrew, want your opinion as MIPS sim co-maintainer on this one: The SIGNEXTEND macro is no longer used by the MIPS sim code in the public sources. (I replaced all uses with uses of EXTENDnn, which IMO are preferred since they are sim/common macros and their use eats less screen real estate. 8-) If it's not a problem for you, I'd like to remove the SIGNEXTEND macro entirely. (I figure, it might be a problem because maybe you've got code in your private mips sim which uses SIGNEXTEND and can't be converted to use EXTENDnn.) What do you think? thanks, chris =================================================================== 2002-02-04 Chris Demetriou * sim-main.h (SIGNEXTEND): Remove. Index: sim-main.h =================================================================== RCS file: /cvs/src/src/sim/mips/sim-main.h,v retrieving revision 1.7 diff -u -p -r1.7 sim-main.h --- sim-main.h 2001/11/18 06:00:29 1.7 +++ sim-main.h 2002/03/05 19:05:15 @@ -56,15 +56,6 @@ typedef unsigned64 uword64; #define WORD64(h,l) ((word64)((SET64HI(h)|SET64LO(l)))) #define UWORD64(h,l) (SET64HI(h)|SET64LO(l)) -/* Sign-extend the given value (e) as a value (b) bits long. We cannot - assume the HI32bits of the operand are zero, so we must perform a - mask to ensure we can use the simple subtraction to sign-extend. */ -#define SIGNEXTEND(e,b) \ - ((unsigned_word) \ - (((e) & ((uword64) 1 << ((b) - 1))) \ - ? (((e) & (((uword64) 1 << (b)) - 1)) - ((uword64)1 << (b))) \ - : ((e) & (((((uword64) 1 << ((b) - 1)) - 1) << 1) | 1)))) - /* Check if a value will fit within a halfword: */ #define NOTHALFWORDVALUE(v) ((((((uword64)(v)>>16) == 0) && !((v) & ((unsigned)1 << 15))) || (((((uword64)(v)>>32) == 0xFFFFFFFF) && ((((uword64)(v)>>16) & 0xFFFF) == 0xFFFF)) && ((v) & ((unsigned)1 << 15)))) ? (1 == 0) : (1 == 1))