* [RFA/PATCH/mips16] Remove dead code in mips_insn16_frame_cache
@ 2004-09-23 23:34 Joel Brobecker
2004-09-24 14:19 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2004-09-23 23:34 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
I think this is obvious, but just in case, I'm posting this as a
semi-rfa before I do something wrong.
2004-09-23 Joel Brobecker <brobecker@gnat.com>
* mips-tdep.c (mips_insn16_frame_cache): Remove dead code or
conditions that will always be true.
Untested. I'll make sure it compiles before I commit.
OK to apply anyway?
The next step is to mimick the mips32 changes to mips16, so that they
both update the frame cache.
Thanks,
--
Joel
[-- Attachment #2: mips16.diff --]
[-- Type: text/plain, Size: 1708 bytes --]
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.324
diff -u -p -r1.324 mips-tdep.c
--- mips-tdep.c 16 Sep 2004 00:35:55 -0000 1.324
+++ mips-tdep.c 23 Sep 2004 23:23:16 -0000
@@ -1850,24 +1850,14 @@ mips_insn16_frame_cache (struct frame_in
/* If the address is odd, assume this is MIPS16 code. */
addr = PROC_LOW_ADDR (proc_desc);
- mips16 = pc_is_mips16 (addr);
/* Scan through this function's instructions preceding the
current PC, and look for those that save registers. */
while (addr < frame_pc_unwind (next_frame))
{
- if (mips16)
- {
- mips16_decode_reg_save (mips16_fetch_instruction (addr),
- &gen_save_found);
- addr += MIPS16_INSTLEN;
- }
- else
- {
- mips32_decode_reg_save (mips32_fetch_instruction (addr),
- &gen_save_found, &float_save_found);
- addr += MIPS_INSTLEN;
- }
+ mips16_decode_reg_save (mips16_fetch_instruction (addr),
+ &gen_save_found);
+ addr += MIPS16_INSTLEN;
}
gen_mask = gen_save_found;
float_mask = float_save_found;
@@ -1891,7 +1881,6 @@ mips_insn16_frame_cache (struct frame_in
order of that normally used by gcc. Therefore, we have to fetch
the first instruction of the function, and if it's an entry
instruction that saves $s0 or $s1, correct their saved addresses. */
- if (pc_is_mips16 (PROC_LOW_ADDR (proc_desc)))
{
ULONGEST inst = mips16_fetch_instruction (PROC_LOW_ADDR (proc_desc));
if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700)
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [RFA/PATCH/mips16] Remove dead code in mips_insn16_frame_cache
2004-09-23 23:34 [RFA/PATCH/mips16] Remove dead code in mips_insn16_frame_cache Joel Brobecker
@ 2004-09-24 14:19 ` Andrew Cagney
2004-09-24 14:35 ` Joel Brobecker
2004-10-01 0:21 ` Joel Brobecker
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-09-24 14:19 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> I think this is obvious, but just in case, I'm posting this as a
> semi-rfa before I do something wrong.
>
> 2004-09-23 Joel Brobecker <brobecker@gnat.com>
>
> * mips-tdep.c (mips_insn16_frame_cache): Remove dead code or
> conditions that will always be true.
>
> Untested. I'll make sure it compiles before I commit.
> OK to apply anyway?
>
> The next step is to mimick the mips32 changes to mips16, so that they
> both update the frame cache.
>
> Thanks,
Definitly!
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA/PATCH/mips16] Remove dead code in mips_insn16_frame_cache
2004-09-24 14:19 ` Andrew Cagney
@ 2004-09-24 14:35 ` Joel Brobecker
2004-09-24 15:12 ` Andrew Cagney
2004-10-01 0:21 ` Joel Brobecker
1 sibling, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2004-09-24 14:35 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> >2004-09-23 Joel Brobecker <brobecker@gnat.com>
> >
> > * mips-tdep.c (mips_insn16_frame_cache): Remove dead code or
> > conditions that will always be true.
>
> Definitly!
Thanks! I will commit this change later today. May I have permission
to mimic the mips32 changes into mips16 without asking for approval?
Or would you rather see the patch first? (I'm asking because it saves
me a tiny bit of time. But not much so it's not a big deal if I have
to send an RFA first).
--
Joel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA/PATCH/mips16] Remove dead code in mips_insn16_frame_cache
2004-09-24 14:35 ` Joel Brobecker
@ 2004-09-24 15:12 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-09-24 15:12 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
>>>2004-09-23 Joel Brobecker <brobecker@gnat.com>
>>>> >
>>>> > * mips-tdep.c (mips_insn16_frame_cache): Remove dead code or
>>>> > conditions that will always be true.
>>
>>>
>>> Definitly!
>
>
> Thanks! I will commit this change later today. May I have permission
> to mimic the mips32 changes into mips16 without asking for approval?
> Or would you rather see the patch first? (I'm asking because it saves
> me a tiny bit of time. But not much so it's not a big deal if I have
> to send an RFA first).
yep,
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA/PATCH/mips16] Remove dead code in mips_insn16_frame_cache
2004-09-24 14:19 ` Andrew Cagney
2004-09-24 14:35 ` Joel Brobecker
@ 2004-10-01 0:21 ` Joel Brobecker
1 sibling, 0 replies; 5+ messages in thread
From: Joel Brobecker @ 2004-10-01 0:21 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> >2004-09-23 Joel Brobecker <brobecker@gnat.com>
> >
> > * mips-tdep.c (mips_insn16_frame_cache): Remove dead code or
> > conditions that will always be true.
> >
> >Untested. I'll make sure it compiles before I commit.
> >OK to apply anyway?
>
> Definitly!
Just committed, finally. Sorry for the delay...
--
Joel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-01 0:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23 23:34 [RFA/PATCH/mips16] Remove dead code in mips_insn16_frame_cache Joel Brobecker
2004-09-24 14:19 ` Andrew Cagney
2004-09-24 14:35 ` Joel Brobecker
2004-09-24 15:12 ` Andrew Cagney
2004-10-01 0:21 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox