3 ms·
My middle paragraph up-thread proposes that you can emulate it much faster than we're doing now, at full precision with integer SIMD and a specialized JIT. I'll
by lunixbochs 4y ago
My middle paragraph up-thread proposes that you can emulate it much faster than we're doing now, at full precision with integer SIMD and a specialized JIT. I'll reiterate the 80-bit softfloat stuff I've seen in use now is not really optimized. I suspect that beating the performance of a cpu on x87 from the era where x87 was relevant is somewhere between realistic and trivial. Beating a modern cpu on x87 from another architecture still feels possible (but it's a less useful thing to spend time on).
> Even lowering the precision of the x87 unit isn’t sufficient as that only reduces the precision of the mantissa not the exponent.
I don't know what you mean by "isn't sufficient". To be clear, I'm speaking from experience emulating x86 games on low resource arm devices, where I had success emulating x87 in lower precision.
For QEMU, IMO the bigger performance issue is that it doesn't natively JIT _any_ FPU or vector instructions, and the indirect memory mapping hurts general performance quite a bit too.
- olliej 4y agoOh I have no idea when qemu wouldn't be doing those, but I wasn't very clear about precision. The x87 unit has control bits that you control (shocking!) behaviour of the unit, one of the things you can control is the precision it will operate at operate. People think that if the x87 unit is in the lower precision modes it's possible to simply use the common 32 or 64 bit FPUs, but the x87's 32/64 bit modes only impact the mantissa, not the the exponent so they reduced precision modes are still not interchangeable with fp32 or fp64.