From: David Voit <david.voit@gmail.com>
To: gdb@sources.redhat.com
Subject: Need help at writing basic igen simulator
Date: Tue, 14 Sep 2004 21:30:00 -0000 [thread overview]
Message-ID: <pan.2004.09.14.21.03.59.671898@gmail.com> (raw)
Hello everybody,
I writed a simple igen file and want to test it now. So I tried to
integrate it with the existing v850 sourcecode (this looked the simplest
of all igen sims) but I find it still to complex for my needs. And now I
want to ask if somebody has tried the same and has a base for a simple
igen simulator which dont need to do much but execute the instructions in
the igen file.
I dont need:
- Any sort of memory handling
- Interupts
- or any other complicated things
I just want, in the begining, write a template for all MMIX instructions.
Here is the very very simple igen file at the moment:
:model:::mmix:mmix:
:internal::::illegal:
{
sim_io_eprintf (SD, "Illegal instruction at address 0x%lx\n",
(unsigned long) cia);
sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL);
}
11100011,8.reg,16.value::::setl
"setl reg, value"
{
/* TODO */
}
00100000,8.reg1,8.reg2,8.reg3::::add
"add reg1, reg2, reg3"
{
/* TODO */
}
00011000,8.reg1,8.reg2,8.reg3::::mul
"mul reg1, reg2, reg3"
{
/* TODO */
}
00100100,8.reg1,8.reg2,8.reg3::::sub
"sub reg1, reg2, reg3"
{
/* TODO */
}
00011100,8.reg1,8.reg2,8.reg3::::div
"div reg1, reg2, reg3"
{
/* TODO */
}
ps.:
If i write the instruction identifer in hexform like this
"8.0xe3,8.reg,16.value::::setl" igen fails with "ld-insn.c:293: assertion
failed - word->first->last < 0" it this the correct behavior.
Thanks David
next reply other threads:[~2004-09-14 21:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-14 21:30 David Voit [this message]
2004-09-14 22:12 ` Andrew Cagney
2004-09-15 19:41 ` David Voit
[not found] ` <005001c49aef$eb8cf000$5100a8c0@monika>
2004-09-15 19:43 ` David Voit
2004-09-15 9:37 Monika Chaddha
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=pan.2004.09.14.21.03.59.671898@gmail.com \
--to=david.voit@gmail.com \
--cc=gdb@sources.redhat.com \
/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).