On Wed, 2007-09-19 at 12:56 +0200, Alexander Graf wrote: > On Sep 19, 2007, at 1:28 AM, Paul Brook wrote: > > >>>> Ok, I will try to shift the intercepts in an uint_64 flags variable > >>>> in the TB. > >> > >> OK, great. Having 64 bits may also help for additional (ie future...) > >> features in PowerPC 64 emulation. > > > > Maybe worth letting the target say whether it needs 32 or 64-bit > > flags. > > The flag lookup is likely to be on a hot path. > > > > Paul > > here comes the patch.
The patch looks correct to me, I'm just wondering why a cast to 32 bits is needed in mips code ? I may be wrong, but it seems to me that TB flags are only used to be compared in tb_find_fast and tb_find_slow, which are not a very fast path (we come here when we cannot jump directly to the next tb and are not in the most time critical code) then we can afford adding a few asm instructions (I would say max 2 ?) to replace a 32 bits comparison with a 64 bits one. My feeling is that the performance loss here won't be sensible, but that may need to be proved.