VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

Looking at the 80386 instruction set again, CR0 can't be modified from Virtual 8086 mode(throwing #GP(0)):
https://pdos.csail.mit.edu/6.828/2005/reading … /i386/MOVRS.htm

But looking at LMSW reveals something odd:
https://pdos.csail.mit.edu/6.828/2005/readings/i386/LMSW.htm

The Virtual 8086 column clearly states that it's the same exceptions as in real mode.
So, in other words, you can modify bits 1-15 of CR0 from Virtual 8086 mode? So that exposes all FPU related functionality from CR0?

The only good thing about that is that you cannot clear the PE bit(bit 0) in CR0.
But you CAN modify bits 1-4, which may or may not be essential, according to that documentation from Intel.

Oddly enough, https://www.felixcloutier.com/x86/lmsw does state it throws #GP(0) in said mode?

So does it or does it not throw #GP(0) in V86 mode?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io