From patchwork Fri Oct 2 18:55:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 34879 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6F7D2B7BCE for ; Sat, 3 Oct 2009 05:53:43 +1000 (EST) Received: from localhost ([127.0.0.1]:55052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtoCC-0006Y2-RM for incoming@patchwork.ozlabs.org; Fri, 02 Oct 2009 15:53:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtoB0-0005TT-A9 for qemu-devel@nongnu.org; Fri, 02 Oct 2009 15:52:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtoAz-0005RS-AD for qemu-devel@nongnu.org; Fri, 02 Oct 2009 15:52:25 -0400 Received: from [199.232.76.173] (port=42352 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtoAz-0005Qv-1I for qemu-devel@nongnu.org; Fri, 02 Oct 2009 15:52:25 -0400 Received: from hall.aurel32.net ([88.191.82.174]:40564) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtoAy-0003Cs-Dq for qemu-devel@nongnu.org; Fri, 02 Oct 2009 15:52:24 -0400 Received: from [2002:52e8:2fb:1:21e:8cff:feb0:693b] (helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MtoAt-0004u9-5h for qemu-devel@nongnu.org; Fri, 02 Oct 2009 21:52:19 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1MtoAr-00023y-Gz for qemu-devel@nongnu.org; Fri, 02 Oct 2009 21:52:17 +0200 Resent-From: Aurelien Jarno Resent-Date: Fri, 2 Oct 2009 21:52:17 +0200 Resent-Message-ID: <20091002195217.GC7454@volta.aurel32.net> Resent-To: qemu-devel@nongnu.org Message-Id: In-Reply-To: References: From: Aurelien Jarno Date: Fri, 2 Oct 2009 20:55:24 +0200 Resent-Date: Fri, 02 Oct 2009 21:52:17 +0200 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH 3/3] tcg/i386: add support for ext{8, 16, 32}u_i{32, 64} TCG ops X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Aurelien Jarno --- tcg/i386/tcg-target.c | 8 ++++++++ tcg/i386/tcg-target.h | 2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index b4e3b6f..dd4d4e0 100644 --- a/tcg/i386/tcg-target.c +++ b/tcg/i386/tcg-target.c @@ -1073,6 +1073,12 @@ static inline void tcg_out_op(TCGContext *s, int opc, case INDEX_op_ext16s_i32: tcg_out_modrm(s, 0xbf | P_EXT, args[0], args[1]); break; + case INDEX_op_ext8u_i32: + tcg_out_modrm(s, 0xb6 | P_EXT, args[0], args[1]); + break; + case INDEX_op_ext16u_i32: + tcg_out_modrm(s, 0xb7 | P_EXT, args[0], args[1]); + break; case INDEX_op_qemu_ld8u: tcg_out_qemu_ld(s, args, 0); @@ -1160,6 +1166,8 @@ static const TCGTargetOpDef x86_op_defs[] = { { INDEX_op_ext8s_i32, { "r", "q" } }, { INDEX_op_ext16s_i32, { "r", "r" } }, + { INDEX_op_ext8u_i32, { "r", "q"} }, + { INDEX_op_ext16u_i32, { "r", "r"} }, #if TARGET_LONG_BITS == 32 { INDEX_op_qemu_ld8u, { "r", "L" } }, diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index 461ef31..69227c3 100644 --- a/tcg/i386/tcg-target.h +++ b/tcg/i386/tcg-target.h @@ -52,6 +52,8 @@ enum { #define TCG_TARGET_HAS_ext8s_i32 #define TCG_TARGET_HAS_ext16s_i32 #define TCG_TARGET_HAS_rot_i32 +#define TCG_TARGET_HAS_ext8u_i32 +#define TCG_TARGET_HAS_ext16u_i32 #define TCG_TARGET_HAS_GUEST_BASE