qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC/experimental patch] qemu (x86_64 on x86_64 -no-kqe


From: Paul Brook
Subject: Re: [Qemu-devel] [RFC/experimental patch] qemu (x86_64 on x86_64 -no-kqemu) compiles with gcc4 and works
Date: Mon, 26 Mar 2007 23:53:23 +0100
User-agent: KMail/1.9.5

> > I moved to helper2.c because AFAICT helper.c is compiled with the same
> > sort of restrictions as op.c which leads to the compile failure.
>
> Yes, helper.c is compiled with the global register variables and the code
> is called directly from the op_xxx functions, but one needs the global
> register variables to access global data, these contain the required
> environment for the emulation. AFAIK helper2.c is used by the CODE_COPY
> branch on i386 with even stronger restrictions, but I may be wrong here.

helper.c is compiled with the same setting as op.c, so has direct access to 
the dyngen state ("T0", "env" etc). helper2.c is regular code. Either may be 
used from op.c, the difference is whether all arguments are explicit. Also, 
if a helper throws an exception it must be in helper.c to avoid clobbering 
CPU state before calling raise_exception.

Note that some targets use a different naming scheme. They use helper.c for 
regular code and op_helper.c for op.c-like code. IMHO this is a much better 
naming scheme.

Paul




reply via email to

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