====== QEMU ====== [[http://fabrice.bellard.free.fr/qemu/|QEMU]] is a generic and open source processor emulator from Fabrice Bellard. This page contains some patches I wrote for QEMU. ===== QEMU and GCC 4 ===== QEMU does not build with gcc4 on x86 at this time because of a [[http://gcc.gnu.org/PR15482|GCC change]] to fix other bugs. Here are some patches to wordaround this problem. ''x86_64-softmmu'' doesn't work though. Those patches were only tested with a post GCC 4.0.1 release snapshot. * [[this>projects/qemu/files/qemu-0.7.0-gcc4.patch.bz2]]\\ Original patch from Paul Brook + an addition to correctly decode ''imul''. * [[this>projects/qemu/files/qemu-0.7.2-dyngen-check-stack-clobbers.patch.bz2]]\\ Check stack is not clobbered in synthetic opcodes using ''GOTO_LABEL_PARAM''. * [[this>projects/qemu/files/qemu-0.8.0-gcc4-hacks.patch.bz2]]\\ Various workarounds to GCC ICEs. The softmmu asm optimization can be reactivated with a post GCC 4.0.2 release snapshot. * [[this>projects/qemu/files/qemu-0.7.2-gcc4-opts.patch.bz2]]\\ Don't generate stack variables for ''x86_64-softmmu'' case in functions using ''GOTO_LABEL_PARAM''. ===== QEMU port to MacOS X for Intel ===== **Note:** Mike Kronenberg has now integrated the following patches into [[http://www.kberg.ch/q/|Q]], a maintained port of QEMU to MacOS X. Universal binaries appeared in Q-0.8.0d562 and newer. * [[this>projects/qemu/files/qemu-0.8.0-enforce-16byte-stack-boundary.patch.bz2]]\\ Enforce 16-byte stack boundaries (the default). * [[this>projects/qemu/files/qemu-0.8.0-i386-FORCE_RET.patch.bz2]]\\ Try to enforce one exit point per synthetic opcode. * [[this>projects/qemu/files/qemu-0.8.0-osx-intel-port.patch.bz2]] (**updated** on 2006/03/17, Q-0.8.0d871)\\ Port dyngen to MacOS X for Intel.