Messages in this thread | | | Date | Mon, 24 May 2004 14:28:19 +0200 (CEST) | From | "Maciej W. Rozycki" <> | Subject | Re: i486 emu in mainline? |
| |
On Sun, 23 May 2004, Christoph Hellwig wrote:
> + /* we'll verify if this is a BSWAP opcode, main source of SIGILL on 386's */ > + if ((*eip & 0xF8) == 0xC8) { /* BSWAP */ > + u8 reg; > + > + reg = *eip++ & 0x07; > + src = reg_address(regs, 1, reg); > + > + __asm__ __volatile__ ( > + "xchgb %%al, %%ah\n\t" > + "roll $16, %%eax\n\t" > + "xchgb %%al, %%ah\n\t" > + : "=a" (*(u32*)src) > + : "a" (*(u32*)src)); > + regs->eip = (u32)eip; > + goto out; > + }
You've forgotten about the 16-bit variant here -- the emulation is wrong with PREFIX_D32. This may not matter much in practice, though.
-- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |