From: Dominic Sweetman <dom@mips.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: karthikeyan natarajan <karthik_96cse@yahoo.com>,
linux-mips@linux-mips.org
Subject: Re: In r4k, where does PC point to?
Date: Mon, 19 Jan 2004 14:57:12 +0000 [thread overview]
Message-ID: <16395.61512.498041.811385@gladsmuir.mips.com> (raw)
In-Reply-To: <20040119145017.GA9141@linux-mips.org>
> > Basically, the PC points to the next instruction
> > to
> > be executed. But, in R4k, there are 8 instructions
> > getting executed in parallel. Where does the PC point
> > to? My understanding is that PC points to the next
> > instruction that will be entered into the pipeline.
> > Please correct me if i am wrong..
Ralf Baechle (ralf@linux-mips.org) writes:
> The fact that instructions are issued in a pipeline is not visible in
> the EPC value.
Which is true, but perhaps a bit cryptic given the question.
A MIPS CPU does not have a register called "PC". In the MIPS
architecture, "PC" is just slang meaning "the address of this
instruction" - and only makes any sense if you're prepared to say
WHICH instruction you mean.
There IS a register called "EPC" (for "exception PC"). When you
take any kind of exception, it's the address of the first instruction
which didn't get run because the CPU took the exception instead. So
EPC tells you where to jump back to after the exception handler runs.
Did any of that make any sense?
--
Dominic Sweetman
MIPS Technologies.
next prev parent reply other threads:[~2004-01-19 14:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-19 7:42 In r4k, where does PC point to? karthikeyan natarajan
2004-01-19 14:50 ` Ralf Baechle
2004-01-19 14:57 ` Dominic Sweetman [this message]
2004-01-19 15:14 ` karthikeyan natarajan
2004-01-19 15:22 ` Ralf Baechle
2004-01-19 15:45 ` karthikeyan natarajan
2004-01-19 17:08 ` Dominic Sweetman
2004-01-19 16:30 ` Dominic Sweetman
2004-01-19 16:49 ` karthikeyan natarajan
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=16395.61512.498041.811385@gladsmuir.mips.com \
--to=dom@mips.com \
--cc=karthik_96cse@yahoo.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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