Hi K. Richard, On Fri, 20 Oct 2006, K. Richard Pixley wrote:
> Could someone please explain the issue with gcc4, please? Or point me > to an existing explanation? The issue is that gcc4 optimizes better, but this breaks assumptions of QEmu. Example: The basic idea (simplified!) of QEmu is writing C functions which implement the instructions of the target CPU. Then, code to be emulated is translated by chaining the _compiled_ functions (corresponding to the target code) together, but _leaving_ out the return instruction at the end of the function (otherwise, the resulting code would return already after the first emulated instruction). Now, gcc4 can produce code with several return instructions (with no option to turn that of, as far as I understand). You cannot cut them out, and therefore you cannot chain the simple functions. There seem to be other issues, too, like not being able to correctly link the user emulation code, but I am not that sure about it. > And what's being done about it or what needs to be done about it? Paul started to implement a hand-written translator, which does not depend on gcc, but I guess that project is stalled. Ciao, Dscho _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel