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 aurel...@aurel32.net http://www.aurel32.net