From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vum8L-0007jH-S7 for qemu-devel@nongnu.org; Sun, 22 Dec 2013 11:44:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vum8G-0004FW-Lo for qemu-devel@nongnu.org; Sun, 22 Dec 2013 11:44:05 -0500 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:34641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vum8G-0004FR-Ef for qemu-devel@nongnu.org; Sun, 22 Dec 2013 11:44:00 -0500 Received: by mail-pa0-f52.google.com with SMTP id ld10so4533922pab.11 for ; Sun, 22 Dec 2013 08:43:59 -0800 (PST) Sender: Richard Henderson Message-ID: <52B716CB.4090401@twiddle.net> Date: Sun, 22 Dec 2013 08:43:55 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1387644224-2404-1-git-send-email-aurelien@aurel32.net> <1387644224-2404-3-git-send-email-aurelien@aurel32.net> In-Reply-To: <1387644224-2404-3-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/5] tcg/i386: remove hardcoded P_REXW value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno , qemu-devel@nongnu.org On 12/21/2013 08:43 AM, Aurelien Jarno wrote: > P_REXW is defined has a constant at the beginning of i386/tcg-target.c, > but the corresponding bit is later used in a harcoded way, which defeat > the purpose of a constant. > > Fix that by using a conditional expression operator instead of a shift. > On x86 this actually makes the code slightly smaller as GCC does in > practice (opc >> 8) & 8 instead of (opc & 0x800) >> 8 so the constants > are smaller to load. > > Signed-off-by: Aurelien Jarno > --- > tcg/i386/tcg-target.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~