On 07/10/2017 01:57 PM, Emilio G. Cota wrote:
What I would prefer to do is generalize tb->cflags.  Those values *do*
affect how we compile the TB, and yet we don't take them into account.  So I
think it would be a good idea to feed that into the TB hash.

I'm having trouble seeing how this could work.
Where do we get the "current" values from the current state, i.e.
the ones we need to generate the hash and perform comparisons?
In particular:
- CF_COUNT_MASK: just use CF_COUNT_MASK?
- CF_LAST_IO: ?
- CF_NOCACHE: always 0 I guess

All of these are set by cpu_io_recompile as needed.
They are all clear for normal TBs.

- CF_USE/IGNORE_ICOUNT: ?
CF_IGNORE_ICOUNT probably shouldn't exist. Probably the callers of tb_gen_code should simply set CF_USE_ICOUNT properly if use_icount is true, rather than having two flags control the same feature.

At which point CF_USE_ICOUNT should be set iff use_icount is true.

Likewise CF_PARALLEL would be set iff parallel_cpus is true, except for within cpu_exec_step_atomic where we would always use 0 (because that's the whole point of that function).


r~

Reply via email to