On Tue May 28, 2024 at 6:52 PM AEST, Harsh Prateek Bora wrote: > corrected typo, it's bitwise. > > On 5/28/24 14:18, Harsh Prateek Bora wrote: > >> - (POWERPC_CPU(cs)->env.spr_cb[SPR_PIR].default_value & > >> ~(cs->nr_threads - 1)) > >> + (POWERPC_CPU(cs)->env.core_index) > > > > Dont we want to keep the bitwise & with ~(cs->nr_threads - 1) ? > > How's it taken care ?
For these accessors it actually just wants to have something that compares if a CPU belongs to the same core or not, so exact value doesn't really matter. Maybe the helpers should do that comparison. It could possibly even be a class method to be really clean, although that's more costly to call (but writing to a SMT shared register is pretty costly anyway so maybe doesn't matter). I'll think a bit more. Thanks, Nick