linux-mips
[Top] [All Lists]

Re: In r4k, where does PC point to?

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: In r4k, where does PC point to?
From: karthikeyan natarajan <karthik_96cse@yahoo.com>
Date: Mon, 19 Jan 2004 15:45:38 +0000 (GMT)
Cc: Dominic Sweetman <dom@mips.com>, linux-mips@linux-mips.org
In-reply-to: <20040119152214.GA9933@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi Ralf,

> > > Which is true, but perhaps a bit cryptic given
> the
> > > question.
> > > 
> > > A MIPS CPU does not have a register called "PC".
>  In
> > 
> > In the r4k user manual, it is mentioned that there
> is
> > a special register PC in the core CPU (other than
> the 
> > HI & LO special registers). Could you please let
> me 
> > know the purpose of this register?
> 
> Obviously the CPU needs to know where to fetch the
> next instruction from

So the PC points to the next instruction to be
fetched,
but it is not visible to the programmer..

> or for computing the destination address of branch
> and jump instructions
> or the value to put into the programmer visible EPC
> and ErrorEPC registers

Am curious to know, how the PC register can be used to

locate the instruction which caused the exception as 
the exception can happen at any one of the eight 
pipeline stages..

Thanks much,
-karthi


> etc.  The PC register is an internal register that
> isn't visible to the
> programmer.

So the bottom line here is PC is internal register and

the EPC is visible to the programmer.. 


Thanks,
-karthi
 
>   Ralf
>  

=====
The expert at anything was once a beginner
                  ______________________________
                 /                              \
             O  /      Karthikeyan.N             \
           O   |       Chennai, India.            |
    `\|||/'     \    Mobile: +919884104346       /
     (o o)       \                              /
_ ooO (_) Ooo____________________________________
_____|_____|_____|_____|_____|_____|_____|_____|_
__|_____|_____|_____|_____|_____|_____|_____|____
_____|_____|_____|_____|_____|_____|_____|_____|_

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

<Prev in Thread] Current Thread [Next in Thread>