News for hackers. Stuff that matters.
Re:Halfix – A portable x86 emulator written in C99 by ClassyJacket on Monday October 10, 2022 @07:56AM (#33150252)
Forgive me if this is wrong/ignorant, but you can't really do a JIT and keep it portable, no?
Re:Halfix – A portable x86 emulator written in C99 by wolf550e on Monday October 10, 2022 @10:00AM (#33151504)
Right, but it kinda depends on what you mean by "portable". Only an interpreter will work without modification on a new host arch, but code for a JIT that is organized in such a way that makes it easy to add support for new host arch might also be called "portable".
Re:Halfix – A portable x86 emulator written in C99 by euclaise on Monday October 10, 2022 @08:23PM (#33157995)
If I recall correctly, QEMU did portable JIT by implementing the instructions in C and then copying their compiled versions out of the emulator binary instead of calling them as functions.