> I made minimal modifications in each target so that they can still work > by using TCG and legacy "dyngen" micro operations. More work will be > needed to convert each target to TCG, but it can be done progressively. > Only the x86 and x86_64 targets have been significantly modified to use > TCG.
When playing with this a bit with the ARM target I found it very easy to get variables, immediate values and register indexes mixed up. e.g. using gen_add_i32 instead of gen_add_i32, or gen_mov_i32(foo, rn) instead of gen_ld_i32(foo, cpu_env, offsetof(CPUState, regs[rn]). Would you object to a patch that changed then gen_* functions in tgc_op to use an opaque type for variables? For performance reasons we probably want to keep it as an in in production builds, but for debugging it's nice to be able to catch the types of error mentioned above. IMHO it also helps to improve the clarity of the code. The changes should be mostly mechanical. Paul