OS X uses i386_set_ldt, not modify_ldt. I should probably consider moving to autotools or something.
We set up the %fs segment to point to the emulated CPU's memory, and do all memory acesses through that segment. The emulator program should now be completely sandboxed from the guest.
Also, add a Makefile rule for emacs flymake-mode
arithmetic instructions. Everything else is still emulated.
CPU emulation is now mostly correct.