On 26 April 2017 at 11:07, Richard Henderson <r...@twiddle.net> wrote: > On 04/24/2017 06:33 PM, Peter Maydell wrote: >> >> Overall questions: >> * does this look like it's workable enough to justify taking >> it rather than the simple-but-worse-perf-on-some-archs >> option 1 ? > > > I think it's workable.
Yes, I think I agree overall. >> * this does risk breaking A profile in corner cases, because >> C unfortunately doesn't typecheck int vs enum so if I forgot >> a call to an index conversion function somewhere things will >> break. are we happy the risk isn't too huge? > > > If you like, we could add a tcg_debug assert somewhere that verifies that > the given index is < NB_MMU_MODES... There is one already, because in my testing I ran into it. The problem is that since it's a runtime assert, it's not certain that I caught everything. thanks -- PMM