public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "Monika Chaddha" <monika@acmet.com>
To: "'Xinan Tang'" <xinan@tidalnetworks.net>
Cc: <gdb@sources.redhat.com>
Subject: RE: "igen vs. cgen?"
Date: Fri, 23 Jul 2004 08:11:00 -0000	[thread overview]
Message-ID: <003e01c47077$c958ddc0$5100a8c0@monika> (raw)
In-Reply-To: <KAEHILJLFHMPJPLKAFBHEELICBAA.xinan@tidalnetworks.net>

Yes.... you will not find any specific document.

I can provide u some idea ... if it helps u
I'll take one example and try to explain u.

000000,5.RS,5.RT,5.RD,00000,100000:SPECIAL:32::ADD
"add r<RD>, r<RS>, r<RT>"
*mipsI:
*mipsII:
*mipsIII:
*mipsIV:
*mipsV:
*mips32:
*mips64:
*vr4100:
*vr5000:
*r3900:
{
------
------
}
The above is existing code for add instruction in mips.igen. You want
that this instruction should be supported by your architecture.

Firstly you need to change configuration files. Firstly add your
architecture based information in configure files in main directory and
sim directory

Example: /src/sim/mips/configure

For mipsisa32 the configuration information is as follows

mipsisa32*-*-*)	sim_gen=IGEN
			sim_igen_machine="-M mips32"
			sim_igen_filter="32,f"
			sim_mach_default="mipsisa32"
			;;

Here sim_gen is simulator generator
Sim_igen_machine will work as a model name ie for mipisa32 the model
name is mips32.
sim_igen_filter is size of instructions
sim_mach_defult is for bfd.

You also define ur architecture. Put yours entry wherever needed in the
configuration files.

Suppose u have defined as followes for architecture xyz

xyz*-*-*)		sim_gen=IGEN
			sim_igen_machine="-M xyz"
			sim_igen_filter="32,f"
			sim_mach_default="mipsisa32"
			;;

Also add this target name in the configuration files in the main
directory
If you want add instruction to be support by ur architecture "xyz"
Than put ur architecture name in the model list as follows

000000,5.RS,5.RT,5.RD,00000,100000:SPECIAL:32::ADD
"add r<RD>, r<RS>, r<RT>"
*mipsI:
*mipsII:
*mipsIII:
*mipsIV:
*mipsV:
*mips32:
*mips64:
*vr4100:
*vr5000:
*r3900:
*xyz: (new architecture)
{
------
------
}

Now if u build gdb for "xyz", this "ADD" instruction will be
supported.If u don't want to support this instruction ... remove ur
model name from here.


Regards
Monika
>-----Original Message-----
>From: gdb-owner@sources.redhat.com
[mailto:gdb-owner@sources.redhat.com] On
>Behalf Of Xinan Tang
>Sent: Friday, July 23, 2004 12:23 AM
>To: Monika Chaddha
>Cc: gdb@sources.redhat.com
>Subject: RE: "igen vs. cgen?"
>
>Hi Monika,
>
>  Thanks for the reply.
>
>  Is there doc. showing any examples on how to add a new instruction or
>disable some existing ones based on existing *.igen files?
>
>  I googled the web and only found a few pages from psim online manual.
>However it does not provide enough details.
>
>Thanks
>
>--Xinan
>
>-----Original Message-----
>From: gdb-owner@sources.redhat.com
>[mailto:gdb-owner@sources.redhat.com]On Behalf Of Monika Chaddha
>Sent: Wednesday, July 21, 2004 11:12 PM
>To: 'Xinan Tang'
>Cc: gdb@sources.redhat.com
>Subject: RE: "igen vs. cgen?"
>
>
>Hi Xinan
>
>Igen would be used for adding new simulator input. There are many igen
>files present in the source... Mips.igen, M16.igen etc...
>
>The source for 'igen' (the simulator generator used) is present at
>'src/sim/igen'. The 'igen' simulator generator takes input the
mips.igen
>file which includes other igen files and generates the simulator
source.
>
>
>The source for simulator will generate in build directory. The contents
>of this source will depend on the input 'mips.igen' file. These files
>are responsible for instruction implementation.
>
>U need new model name also to add any new instruction.
>
>Monika
>


  reply	other threads:[~2004-07-23  5:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <KAEHILJLFHMPJPLKAFBHAEDFCBAA.xinan@tidalnetworks.net>
2004-06-16  1:53 ` "Info reg doesn't work" Jim Blandy
2004-07-16 21:46   ` "which function is called when updating a register?" Xinan Tang
2004-07-18 20:38     ` Andrew Cagney
2004-07-19 18:50       ` Xinan Tang
2004-07-19 18:59         ` Andrew Cagney
2004-07-21  5:24           ` "Add sim memory region by default" Xinan Tang
2004-07-21 15:48             ` Dave Korn
2004-07-21 17:53               ` Xinan Tang
2004-07-21 19:15             ` "igen based simulators doc.?" Xinan Tang
2004-07-21 20:24               ` "igen vs. cgen?" Xinan Tang
2004-07-22  9:35                 ` Monika Chaddha
2004-07-22 19:12                   ` Xinan Tang
2004-07-23  8:11                     ` Monika Chaddha [this message]
2004-07-23 19:03               ` "igen based simulators doc.?" Andrew Cagney
2004-07-23 19:04 "igen vs. cgen?" xinan tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='003e01c47077$c958ddc0$5100a8c0@monika' \
    --to=monika@acmet.com \
    --cc=gdb@sources.redhat.com \
    --cc=xinan@tidalnetworks.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).