Re: [PATCH v4 24/33] target/nios2: Introduce shadow register sets

2022-03-09 Thread Richard Henderson
On 3/9/22 04:02, Amir Gonnen wrote: How does "cpu_crs_R" work? ...> Otherwise, each gpr access would be indirect. I'm probably missing something here. They are indirect, but with some optimization. +TCGv_ptr crs = tcg_global_mem_new_ptr(cpu_env, +

RE: [PATCH v4 24/33] target/nios2: Introduce shadow register sets

2022-03-09 Thread Amir Gonnen
Hi Richard, How does "cpu_crs_R" work? In your version you hold a pointer to the current register set instead of copying registers back and forth like I did, which makes sense. But how does TCG know which set to refer to when it generates code? It looks like it's always accessing the same cpu_cr