* [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c
@ 2004-02-12 22:12 Fred Fish
2004-02-16 15:48 ` Elena Zannoni
0 siblings, 1 reply; 3+ messages in thread
From: Fred Fish @ 2004-02-12 22:12 UTC (permalink / raw)
To: gdb-patches; +Cc: fnf
In sh-tdep.c, cache->uses_fp is set to either 0 or 1, so there is no
point in testing to see if it is already 1 before setting it to 1.
-Fred
2004-02-12 Fred Fish <fnf@redhat.com>
* sh-tdep.c (sh_analyze_prologue): Eliminate useless test of
cache->uses_fp prior to setting it.
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.158
diff -c -r1.158 sh-tdep.c
*** sh-tdep.c 11 Feb 2004 15:40:28 -0000 1.158
--- sh-tdep.c 12 Feb 2004 22:07:29 -0000
***************
*** 501,508 ****
}
else if (IS_MOV_SP_FP (inst))
{
! if (!cache->uses_fp)
! cache->uses_fp = 1;
/* At this point, only allow argument register moves to other
registers or argument register moves to @(X,fp) which are
moving the register arguments onto the stack area allocated
--- 504,510 ----
}
else if (IS_MOV_SP_FP (inst))
{
! cache->uses_fp = 1;
/* At this point, only allow argument register moves to other
registers or argument register moves to @(X,fp) which are
moving the register arguments onto the stack area allocated
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c
2004-02-12 22:12 [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c Fred Fish
@ 2004-02-16 15:48 ` Elena Zannoni
2004-02-20 0:17 ` Fred Fish
0 siblings, 1 reply; 3+ messages in thread
From: Elena Zannoni @ 2004-02-16 15:48 UTC (permalink / raw)
To: fnf; +Cc: gdb-patches
Fred Fish writes:
> In sh-tdep.c, cache->uses_fp is set to either 0 or 1, so there is no
> point in testing to see if it is already 1 before setting it to 1.
>
ok.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c
2004-02-16 15:48 ` Elena Zannoni
@ 2004-02-20 0:17 ` Fred Fish
0 siblings, 0 replies; 3+ messages in thread
From: Fred Fish @ 2004-02-20 0:17 UTC (permalink / raw)
To: Elena Zannoni, fnf; +Cc: gdb-patches
On Monday 16 February 2004 08:43, Elena Zannoni wrote:
>
> ok.
Committed.
-Fred
2004-02-19 Fred Fish <fnf@redhat.com>
* sh-tdep.c (sh_analyze_prologue): Eliminate useless test of
cache->uses_fp prior to setting it.
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.164
diff -c -p -r1.164 sh-tdep.c
*** sh-tdep.c 19 Feb 2004 23:05:07 -0000 1.164
--- sh-tdep.c 20 Feb 2004 00:14:57 -0000
*************** sh_analyze_prologue (CORE_ADDR pc, CORE_
*** 482,489 ****
}
else if (IS_MOV_SP_FP (inst))
{
! if (!cache->uses_fp)
! cache->uses_fp = 1;
/* At this point, only allow argument register moves to other
registers or argument register moves to @(X,fp) which are
moving the register arguments onto the stack area allocated
--- 482,488 ----
}
else if (IS_MOV_SP_FP (inst))
{
! cache->uses_fp = 1;
/* At this point, only allow argument register moves to other
registers or argument register moves to @(X,fp) which are
moving the register arguments onto the stack area allocated
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-20 0:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-12 22:12 [RFA] Eliminate useless test of variable before overwriting it in sh-tdep.c Fred Fish
2004-02-16 15:48 ` Elena Zannoni
2004-02-20 0:17 ` Fred Fish
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox