On 05/27/2014 02:47 AM, James Hogan wrote: > I agree for the Config3 bit that it shouldn't change during execution of > the guest so can be done at translation time, but I'm not convinced it's > worth wasting tb->flags bits for CP0_HWREna state which the guest OS is > free to change at any time, just to save a single branch each time it's > used (which could be done in tcg easily enough to avoid the helper). > Only a minority of code uses RDHWR, although admittedly UserLocal is the > most widespread of the RDHWR registers due to it's use for thread local > storage.
This patch set has used a bit for exactly this. If there are in fact two bits that control this feature, then we should make the hflag bit a function of the two. We shouldn't add the one hflag bit for Config0 to be checked at translate time, but then go off and check Config3 at runtime. r~