* [MIPS sim PATCH] Remove SIGNEXTEND.
@ 2002-03-05 11:09 cgd
2002-03-05 11:18 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: cgd @ 2002-03-05 11:09 UTC (permalink / raw)
To: cagney; +Cc: gdb-patches
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))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [MIPS sim PATCH] Remove SIGNEXTEND.
2002-03-05 11:09 [MIPS sim PATCH] Remove SIGNEXTEND cgd
@ 2002-03-05 11:18 ` Andrew Cagney
2002-03-05 11:21 ` cgd
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-03-05 11:18 UTC (permalink / raw)
To: cgd; +Cc: cagney, gdb-patches
> 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?
Even if it is technically a problem for me, that isn't a reason to not
pull the macro. I don't think it is reasonable for me to hold up a
cleanup like this because it breaks some un-released code.
Yes feel free to commit it.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [MIPS sim PATCH] Remove SIGNEXTEND.
2002-03-05 11:18 ` Andrew Cagney
@ 2002-03-05 11:21 ` cgd
0 siblings, 0 replies; 3+ messages in thread
From: cgd @ 2002-03-05 11:21 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
At Tue, 05 Mar 2002 14:18:34 -0500, Andrew Cagney wrote:
> Even if it is technically a problem for me, that isn't a reason to not
> pull the macro. I don't think it is reasonable for me to hold up a
> cleanup like this because it breaks some un-released code.
My thought was something more like:
If you've got code that needs it, there's probably a chance that that
code would be pushed back eventually... and so why delete it only to
add it back N months from now.
(Looking at some of my changes it might be hard to believe, but i
prefer to avoid tweaking code back and forth. 8-)
> Yes feel free to commit it.
OK, thanks.
chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-03-05 19:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-05 11:09 [MIPS sim PATCH] Remove SIGNEXTEND cgd
2002-03-05 11:18 ` Andrew Cagney
2002-03-05 11:21 ` cgd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox