On 14/03/2016 13:23, KONRAD Frederic wrote: >> These "target-specific hooks" probably ought not be "hooks" in the >> traditional sense of attaching them to CPUState. I'd be more >> comfortable with a refactoring that used include files -- maybe .h or >> maybe .inc.c. If we do the normal sort of hook, then we've got to >> either expose DisasContext in places we shouldn't, or dynamically >> allocate it. Neither seems particularly appealing. > > On the other side I think attaching them to CPUState would make > heterogenous system emulation easier?
It depends on whether they're going to be called from generic code. As long as they are only called from other CPU-specific bits, adding them to CPUState isn't necessary. Paolo