Gautam Bhat <mindentr...@gmail.com> writes: > On Thu, Jan 2, 2025 at 3:45 PM Alex Bennée <alex.ben...@linaro.org> wrote: > <SNIP> >> The call into the prologue comes from: >> >> ret = tcg_qemu_tb_exec(cpu_env(cpu), tb_ptr); >> >> in cpu_tb_exec. With env in RDI and tb_ptr (the code address) being in >> RSI. >> >> >> -- >> Alex Bennée >> Virtualisation Tech Lead @ Linaro > > Thanks Alex. So this would be regular function calling conventions. I > thought there would be some inline assembly to the jump to the disas > rather > then a call to tcg_qemu_tb_exec(..)
No it is just regular calling conventions - as it is when the generated code calls out to the helper functions. As TB's chain execution we just maintain the TCG_AREG0 (cpu_env) and TCG_REG_CALL_STACK (stack) until the point they exit and come out back through the epilogue code. I think for *-user we sometimes reserve a register for guest_base as well. > > I verified all of this in the gdb disas of the function. > > -Gautam. -- Alex Bennée Virtualisation Tech Lead @ Linaro