Re: i486 emu in mainline?

Alan Cox
2004-05-23T11:10:25Z

On Sun, May 23, 2004 at 10:29:12AM +0200, Willy Tarreau wrote:
> being emulated. I think it's already the case. He also said that I
> didn't take care of the segment selectors (such as SS) which some
> programs use perfectly legally (eg Wine). I don't know how to do
> that.

You have to parse all the valid header bytes (the opcode prefixes) that
change segment, cause repeats and change sizes. DOSemu has a worked example
of this particular set of horrors.

> - why not include the CMOV emulation while we're at it ? There are so
> many people using VIA EDEN chips who think it's i686 compatible that
> they may get hit too. IIRC, the chip only executes CMOV on registers,
> but very slowly (a few tens of cycles), while register to memory
> accesses generate a trap.

gcc generates a lot of cmov on i686 so many that people I've talked with
on the compiler side also feel cmov emulation isnt useful. Newer Eden btw
has cmov.

> Other than that, I'm happy that someone found it useful, and happy too that
> someone did the 2.6 port :-)

Is there a reason btw it can't be done with LD_PRELOAD ?