Am 29.05.2014 15:35, schrieb Petar Jovanovic: >> 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.
That was saying you shouldn't add an env argument to the code generator function. Agree. If hflags is the wrong field, then you can add a new field to DisasContext based on env. Note that a while back we eliminated some env fields from other DisasContexts, so please don't just add an env field. Andreas > > > [1] http://patchwork.ozlabs.org/patch/349709/ > ________________________________________ > From: Aurelien Jarno [aurel...@aurel32.net] > Sent: Thursday, May 29, 2014 3:08 PM > To: Petar Jovanovic > Cc: Petar Jovanovic; qemu-devel@nongnu.org; afaer...@suse.de; r...@twiddle.net > Subject: Re: [v3 PATCH] target-mips: implement UserLocal Register > > On Thu, May 29, 2014 at 01:01:38PM +0000, Petar Jovanovic wrote: >>> While adding MIPS_HFLAG_HWRENA_ULR is a good idea for performance >>> reasons, I don't think we should add MIPS_HFLAG_CP0UL. This value is >>> always the same (true or false) during all the run time of the >>> qemu-system-mips binary, and thus we don't need to take care of code >>> generated with it being true or being false. >> >> Initial version of this patch did not have this flag, but it was added >> as requested in code review. >> What do you suggest? > > Well maybe I missed something, but it looks to me the value can never > change as CP0_Config3 is a read-only register. If I am right, probably > the best is to check directly env->CP0_Config3. > > -- > Aurelien Jarno GPG: 4096R/1DDD8C9B > aurel...@aurel32.net http://www.aurel32.net > -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg