[PATCH] Handle mtsprg and mfsprg properly for BookE

Alan Modra amodra@bigpond.net.au
Thu Mar 10 03:58:00 GMT 2005


On Wed, Mar 09, 2005 at 04:30:03PM -0600, Kumar Gala wrote:
> On Mar 8, 2005, at 8:11 PM, Alan Modra wrote:
> > also still be worried that gas isn't generating the right opcodes, but
> > I suppose that's another issue..
> 
> I'm confused what the correctness concern is.  The only subject that is 
> up in the air is if SPRG3 (SPR #259) should allow read access on some 
> book-e implementations.  It would seem allowing this is more broad and 
> leaves the decision up to the user.

My concern is that my booke manual says there are two spr numbers that
can be used to access sprg4 through sprg7.  One of these values can be
used for privileged write and read access, the other gives read access
to non-privileged programs.  Whether sprg3 is accessible to
non-privileged programs is implementation dependent, but if it is, it
too uses a second spr number to provide non-privileged access.  Let's
leave sprg3 out of the discussion for now..

There remains the question of which spr number should be used by
privileged programs for read access to sprg4 through sprg7.  Does the
non-privileged spr number work when privileged?  I would think it
probably does, but I'm just guessing..

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list