Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 1 Jul 2002 09:27:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 1 Jul 2002 09:27:14 -0400 Received: from 167.imtp.Ilyichevsk.Odessa.UA ([195.66.192.167]:18181 "EHLO Port.imtp.ilyichevsk.odessa.ua") by vger.kernel.org with ESMTP id ; Mon, 1 Jul 2002 09:27:13 -0400 Message-Id: <200207011326.g61DQ0T18850@Port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain; charset="us-ascii" From: Denis Vlasenko Reply-To: vda@port.imtp.ilyichevsk.odessa.ua To: Willy TARREAU , linux-kernel@vger.kernel.org, Ronald.Wahl@informatik.tu-chemnitz.de Subject: Re: [ANNOUNCE] CMOV emulation for 2.4.19-rc1 Date: Mon, 1 Jul 2002 16:25:46 -0200 X-Mailer: KMail [version 1.3.2] References: <20020630043950.GA15516@pcw.home.local> In-Reply-To: <20020630043950.GA15516@pcw.home.local> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 866 Lines: 26 On 30 June 2002 02:39, Willy TARREAU wrote: > Hi all, > > OK, I know that many people dislike this, but I know others > who occasionally need it anyway. So I don't post it for general > inclusion, but for interested people. + if ((*eip == 0x0F) && ((*(eip+1) & 0xF0) == 0x40)) { /* CMOV* */ ... + if ((*eip == 0x0F) && ((*(eip+1) & 0xF8) == 0xC8)) { /* BSWAP */ ... + if ((*eip == 0x0F) && ((*(eip+1) & 0xFE) == 0xB0)) { /* CMPXCHG */ ... + if ((*eip == 0x0F) && ((*(eip+1) & 0xFE) == 0xC0)) { /* XADD */ You may check for 0x0F only once: if(*eip!=0x0f) goto invalid_opcode; eip++; -- vda - 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/