On 8/22/26 08:46, Brian Cain wrote:
I arrived at this belief somewhat backwards, I guess - the file-scope TCGv's used by other architectures who do support MTTCG already, and our results using file-scope TCGv's on qemu-system-hexagon with MTTCG in a downstream fork.

But after digging a bit I think it's still safe/appropriate to have file-scope TCGv's concurrently accessed by multiple translation threads.  Because they are merely a reference to the state data and not the data itself.  The state data is modified by the TCG instructions generated by translation.  The TCGv - the reference itself - is probably immutable, meaning it couldn't be made to refer to anything else.  Or certainly shouldn't.

Correct.  The only thing stored in the actual TCGTemp structure (of which TCGv_i32 is a trivial subclass) is an index into the thread-private TCGContext structure.  The tcg_global_mem_* temporaries are reserved at startup and are immutable thereafter.

r~


Reply via email to