linux-mips-fnet
[Top] [All Lists]

Re: Q: R3000, how to manipulate CP0_EPC?

To: linux-mips@fnet.fr
Subject: Re: Q: R3000, how to manipulate CP0_EPC?
From: Harald Koerfgen <hkoerfg1@ford.com>
Date: Wed, 28 Jan 1998 08:10:59 +0100
Organization: Ford Motor Company
References: <XFMail.980127183209.harald.koerfgen@netcologne.de> <19980128015827.34915@uni-koblenz.de>
Reply-to: hkoerfg1@ford.com
Hello,

ralf@uni-koblenz.de wrote:
> 
> On the R3000 c0_epc is a readonly register - as documented.  That's ok
> because the R3000 uses a different way of handling exceptions.  What you'll
> have to do to return from an exception is about as follows:
> 
>    restore c0_status
>    move k1, sp                          ; needed later
>    restore all gp registers
>    restore hi/lo registers
>    lw   k0, PT_EPC(sp)
>    jr   k0
>    rfe                                  ; in the delay slot of the jr
> 
>   Ralf

Thanks for the info, Ralf. Either this is not mentioned in the IDT
manual or I have simply overlooked this. The Kane book would have saved
me a lot of headache, I assume. But then again, as a side effect,
debugging output via serial port is working now on my DS5000/133 :-).

regards,
Harald

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