From: Julius Baxter <juliusbaxter@gmail.com>
To: cgen@sourceware.org
Subject: Delay slots in GNU sim
Date: Sun, 15 Jan 2012 03:25:00 -0000 [thread overview]
Message-ID: <CAF6YiZ673yCz5CxbA3+cVn_snt0q58Ta_gQLtJCm-bjADf6Vdg@mail.gmail.com> (raw)
Hi,
I've been working on the OpenRISC CGEN description and have got the
assembler working and am now looking at getting a GNU sim port running
too.
I can see a lot of functionality working OK so far (I've based my
simulator port on the lm32 and m32r ports, which are both CGEN-based
implementations of the simulator) but one thing which is not working
are delay slots. They never appear to b executed when a branch is
going to be taken.
I'm yet to delve into the workings if the simulator to figure out why
it's not executing the delay slots, but I just wanted to ask if this
is a known issue with the particular configuration I'm using. The sim
port has "#define WITH_SCACHE_PBB 1", in the tconfig.in file and the
Makefile calls the mloop.c generation script with:
...
$(SHELL) $(srccom)/genmloop.sh \
-mono -fast -pbb -full-switch -switch sem-switch.c \
-cpu or1k32bef -infile $(srcdir)/mloop.in
...
My understanding is that this will generate a main loop for a "fast"
model with pseudo-basic-block processing. This is an "upgrade" over
the default "simple" model without pbb.
I'm wondering if delay slots not working are a known issue when
compiling a fast model with pbb support?
As far as I can tell, my semantic description is correct. For example,
the jump instruction is:
(dni l-j "jump (pc-relative iaddr)"
; This function may not be in delay slot
(NOT-IN-DELAY-SLOT)
"l.j ${disp-26}"
(+ OPC_J disp-26)
; We execute the delay slot before doin' the real branch
(delay 1 (set pc disp-26))
()
)
Other semantic descriptions of delay slot execution appear to be along
the same lines, but I can't see any CGEN-based sim ports which have
instructions with delay slots, so, as I said, I'm wondering if this is
even supported at all.
Thanks for any help,
Julius
next reply other threads:[~2012-01-15 3:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-15 3:25 Julius Baxter [this message]
2012-01-16 7:50 ` Julius Baxter
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=CAF6YiZ673yCz5CxbA3+cVn_snt0q58Ta_gQLtJCm-bjADf6Vdg@mail.gmail.com \
--to=juliusbaxter@gmail.com \
--cc=cgen@sourceware.org \
/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).