Re: GDB5.3 for MIPS ISA32 and MIPS ISA16

Saravanan J
2003-07-25T04:44:23Z

> 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 ?