Linux Kernel 2.4 Useful Patches

Web access to the GIT repository - GIT access to the repository

x86-emu : i486/i686 instructions emulation for low-end processors

This patch allows user space programs compiled for 486 to run on a 386 without crashing with a SIGILL. As any emulation, performance will be very low, but since these instruction are not often used, this might not hurt. The i686 emulation can have an impact though, because the CMOV instructions are often used in optimized code. Note that this patch must not be used on SMP systems and might even be at risk on hyperthreaded code.

Initial date:2002/06/30
Last update:2004/03/04
Description:i486/i686 instructions emulation for low-end processors
Author(s):Willy Tarreau
Abstract:This patch allows user space programs compiled for 486 to run on a 386 without crashing with a SIGILL. As any emulation, performance will be very low, but since these instruction are not often used, this might not hurt. The i686 emulation can have an impact though, because the CMOV instructions are often used in optimized code. Note that this patch must not be used on SMP systems and might even be at risk on hyperthreaded code.

Notes

The following i486 instructions are emulated on i386 :
  • bswap (does the same as htonl())
  • cmpxchg (used in multi-threading, mutex locking)
  • xadd (rarely used)
The CMOV emulation from the i686 instruction set is emulated on 386, 486, Pentium, AmdK6, and VIA Eden. It is relatively slow (about 1µs on a k6/450) and should be emulated only for compatibility.

Contents


(C) Willy Tarreau - 2008-06-01