Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: cgd@broadcom.com
To: cagney@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: [MIPS sim PATCH] Remove SIGNEXTEND.
Date: Tue, 05 Mar 2002 11:09:00 -0000	[thread overview]
Message-ID: <yov5y9h6sufq.fsf@broadcom.com> (raw)

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  <cgd@broadcom.com>

	* 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))
 


             reply	other threads:[~2002-03-05 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-05 11:09 cgd [this message]
2002-03-05 11:18 ` Andrew Cagney
2002-03-05 11:21   ` cgd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yov5y9h6sufq.fsf@broadcom.com \
    --to=cgd@broadcom.com \
    --cc=cagney@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox