qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register
Date: Thu, 29 May 2014 15:45:11 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, May 29, 2014 at 01:35:17PM +0000, Petar Jovanovic wrote:
> > change as CP0_Config3 is a read-only register. If I am right, probably
> > the best is to check directly env->CP0_Config3.
> 
> If you take a look at v1 of the patch, that's what was done.
> In the code review, this was marked as unacceptable because it
> required [1] passing env within the translator.

Well, I agree it should not be done to access things that will change at
runtime, as in that case the TB might re-executed with different values
later.

That said in the case of CP0_Config3, it is only used to access a
read-only value, so in my opinion it is something fine. It is something
already done in plenty of places in this code.

What we have there is more a philosophical issue, probably the best way
to fix that is to have a copy of CP0_ConfigX in DisasContext, so that we
don't explicitly access env anymore from the translator.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]