qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generating host code in TCG mode


From: Peter Maydell
Subject: Re: Generating host code in TCG mode
Date: Fri, 17 Mar 2023 16:17:23 +0000

On Fri, 17 Mar 2023 at 15:17, 沈梦姣 <shen.mengjiao3@icloud.com> wrote:
>
> Hi,
> When generating host code, sometimes it has to jmp to qemu common
> code(e.g. memory management code to get host virtual address), but
> it seems before the jmp the caller saved registers haven’t been
> pushed to stack, qemu common code is function so it can use caller
> saved registers.

TCG knows what registers may be clobbered by a call into
host C code (this is set up in the tcg_target_call_clobber_regs
regset by code in tcg_target_init()), so the register allocator
will either avoid using those registers for values that must
be preserved across the call, or else it will spill them to
memory.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]