ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.37k stars 859 forks source link

x86 emulation doesn't handle LOOP instruction #2174

Open markjreed opened 11 months ago

markjreed commented 11 months ago

I guess this is a feature request, but the x86 LOOP instruction (really a family of instructions, 0xE0 LOOPN[EZ], 0xE1 LOOP[EZ], and 0XE2 LOOP) is not supported by the emulation tier. Not often going to be a problem; most compilers don't generate code containing LOOP because a manual DEC / JNZ pair is faster. But I was trying some small assembly programs and was a bit confused when I got a "Hardware: illegal instruction" error.