Emulation of early 486 CPUs (no fpu, no cpuid)
Hi,
I'm trying to emulate a 486SX CPU, so was wondering how to knock out cpuid and fpu. I've changed the definition of ID_MASK in target-i386/cpu.h to zero, and this prevents Linux from detecting cpuid capability. Bit of a hack, because the instruction is still there, but never mind. I've been trying to work out how to disable fpu emulation so Linux falls back on software emulation.
Can someone throw me a bone?
many thanks.
Biff.
Quoted 5 lines · bifferos
Hi,
I'm trying to emulate a 486SX CPU, so was wondering how to knock out cpuid and fpu. I've changed the definition of
ID_MASKintarget-i386/cpu.hto zero, and this prevents Linux from detecting cpuid capability. Bit of a hack, because the instruction is still there, but never mind. I've been trying to work out how to disable fpu emulation so Linux falls back on software emulation.Can someone throw me a bone?
x86 CPU support is a bit primitive compared to PPC, ARM or Sparc. On those targets there are plenty of CPU types to choose from and if that is not enough, there are ways to modify the cpu features. The CPU type also influences instruction translation: without an FPU, floating point instructions trap on Sparc.
There may be an order of magnitude more x86 CPU types than all other targets combined, so we may not want to support all of them but at least the x86 feature selection support and translation should be more flexible.