public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB5.3 for MIPS ISA32 and MIPS ISA16
@ 2003-07-23  7:25 Saravanan J
       [not found] ` <mailpost.1058945163.5959@news-sj1-1>
  0 siblings, 1 reply; 4+ messages in thread
From: Saravanan J @ 2003-07-23  7:25 UTC (permalink / raw)
  To: gdb

Hi!!

I am new to this mailing list. 

Me along with my friends are designing a small MIPS based processor that supports ISA16 and ISA32. 

We require a simulator for this. We have planned to port GDB 5.3. 

I dont know which target i choose and port it to GDB5.3. Can anyone help me out.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB5.3 for MIPS ISA32 and MIPS ISA16
       [not found] ` <mailpost.1058945163.5959@news-sj1-1>
@ 2003-07-23 16:38   ` cgd
  2003-07-25  4:44     ` Saravanan J
  0 siblings, 1 reply; 4+ messages in thread
From: cgd @ 2003-07-23 16:38 UTC (permalink / raw)
  To: sharan; +Cc: gdb

At Wed, 23 Jul 2003 07:26:03 +0000 (UTC), "Saravanan J" wrote:
> I am new to this mailing list. 

Welcome!


> We require a simulator for this. We have planned to port GDB 5.3. 

Several of the targets supported by GDB already include simulator
support for 32-bit MIPS, and several others support MIPS64 (but
possibly not the current version of the MIPS16 spec).

Take a look at sim/mips/configure.in, in particular the case statement
starting around line 107.

You'll need to create a new target which uses sim_gen=M16 (as some
targets already do), but which uses as its base/default machine type
some 32-bit ISA.  I believe that should do the trick.



cgd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB5.3 for MIPS ISA32 and MIPS ISA16
  2003-07-23 16:38   ` cgd
@ 2003-07-25  4:44     ` Saravanan J
       [not found]       ` <mailpost.1059108281.26583@news-sj1-1>
  0 siblings, 1 reply; 4+ messages in thread
From: Saravanan J @ 2003-07-25  4:44 UTC (permalink / raw)
  To: cgd; +Cc: gdb

> Several of the targets supported by GDB already include simulator
> support for 32-bit MIPS, and several others support MIPS64 (but
> possibly not the current version of the MIPS16 spec).

> Take a look at sim/mips/configure.in, in particular the case statement
> starting around line 107.
> 
> You'll need to create a new target which uses sim_gen=M16 (as some
> targets already do), but which uses as its base/default machine type
> some 32-bit ISA.  I believe that should do the trick.

Great!! i have done it.  I have built it successfully.

in confihure.in i have changed

 mips*tx39*)  sim_gen=IGEN
   sim_igen_filter="32,f"
   sim_igen_machine="-M r3900"
   ;;

to

  mips*tx39*)  sim_gen=M16
   sim_igen_filter="32,f"
   sim_m16_filter="16"
   sim_igen_machine="-M mips32"
   sim_m16_machine="-M mips16"
   ;;

Is this OK

But i have a problem in simulating. 

The startup code is ISA32, and the other code is ISA16.

Jump from ISA32 code is ISA16 code is done by instruction "Jalx"

While simulating the jump has taken place, but it is not executing the ISA16 instructions.
It considers them as ISA32 and tries to execute it. Illegal Instruction error occurs.

The ISA mode does not get inverted in executing "Jalx"

How should i do it ?

 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB5.3 for MIPS ISA32 and MIPS ISA16
       [not found]       ` <mailpost.1059108281.26583@news-sj1-1>
@ 2003-07-25  5:30         ` cgd
  0 siblings, 0 replies; 4+ messages in thread
From: cgd @ 2003-07-25  5:30 UTC (permalink / raw)
  To: sharan; +Cc: gdb

At Fri, 25 Jul 2003 04:44:41 +0000 (UTC), "Saravanan J" wrote:
>   mips*tx39*)  sim_gen=M16
>    sim_igen_filter="32,f"
>    sim_m16_filter="16"
>    sim_igen_machine="-M mips32"
>    sim_m16_machine="-M mips16"
>    ;;
> 
> Is this OK

that looks reasonable comparing with the other configuration script
bits, but i've never done anything with MIPS16 so i'm not sure.

(obviously, if you're interested in using this long-term or want to
submit it back to gdb/sim eventually, you'll want to use a different
target name...)



> Jump from ISA32 code is ISA16 code is done by instruction "Jalx"

right.


> While simulating the jump has taken place, but it is not executing the ISA16 instructions.
> It considers them as ISA32 and tries to execute it. Illegal Instruction error occurs.

you'll note that JALX32 (in m16.igen) attempts to adjust the value of
'nia' to be odd, and m16run.c (following the mips16 ASE, IIRC -- it's
been a while since i looked) interprets that as meaning running in
mips16 mode.

have you verified in the code in m16run.c that the instruction address
is odd and m16_instruction_word/m16_idecode_issue are being invoked?



cgd

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-25  5:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-23  7:25 GDB5.3 for MIPS ISA32 and MIPS ISA16 Saravanan J
     [not found] ` <mailpost.1058945163.5959@news-sj1-1>
2003-07-23 16:38   ` cgd
2003-07-25  4:44     ` Saravanan J
     [not found]       ` <mailpost.1059108281.26583@news-sj1-1>
2003-07-25  5:30         ` cgd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).