From patchwork Sun Sep 13 12:27:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Desnogues X-Patchwork-Id: 33549 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 07017B6F1E for ; Sun, 13 Sep 2009 22:28:26 +1000 (EST) Received: from localhost ([127.0.0.1]:53594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmoBr-0002ls-64 for incoming@patchwork.ozlabs.org; Sun, 13 Sep 2009 08:28:23 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MmoBD-0002jV-7n for qemu-devel@nongnu.org; Sun, 13 Sep 2009 08:27:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MmoBC-0002iS-Bt for qemu-devel@nongnu.org; Sun, 13 Sep 2009 08:27:42 -0400 Received: from [199.232.76.173] (port=43031 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmoBC-0002iG-8c for qemu-devel@nongnu.org; Sun, 13 Sep 2009 08:27:42 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:20470) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MmoBB-0006U1-Sq for qemu-devel@nongnu.org; Sun, 13 Sep 2009 08:27:42 -0400 Received: by fg-out-1718.google.com with SMTP id e21so272586fga.10 for ; Sun, 13 Sep 2009 05:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Rx0TsuKfX5/n/kAGrIVfv7yYuAx8D0cGs3UHDpFmUMM=; b=wA0XpDJNlvSy1WGooNNSnJ/WAiNJQXoEKf3Hv+3ZYQ8O5Hra7ML0DXiqeVMOlDbv1g lrzOU1Wo0pBYUnrC+0TyQ33BE/91v/r7JtyYFG3CBSBU2g8seOwUGZbMzblM6siiptME 8VqpQVKXNYssFjNyAUuc+Pp4i3cj69Anp0vvE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=iKq//6X+UzV9dvRWcgB7a0QqBiRHJiJN4O4yj0iuzSw4xwgtrMgm1tQEc4T6d5V7eG uMgEEv0qTK9pkit8S1XlJfSVqwGXrnFsW9rxQ0nZhns6gjQK+MTVHCH62k5Jwnd7nMJx QExeOaVn2erD3APZSG20QpuRfaoqSP6UEGviU= MIME-Version: 1.0 Received: by 10.86.12.2 with SMTP id 2mr3935751fgl.12.1252844851449; Sun, 13 Sep 2009 05:27:31 -0700 (PDT) Date: Sun, 13 Sep 2009 14:27:31 +0200 Message-ID: <761ea48b0909130527r79393ed9y1cb87af4283d4f99@mail.gmail.com> From: Laurent Desnogues To: qemu-devel@nongnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH] ARM back-end: Use sxt[bh] instructions for ext{8, 6}s 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 Hello, this patch uses sxtb for ext8s_i32 and sxth for ext16s_i32 in ARM back-end. Laurent Signed-off-by: Laurent Desnogues diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 4e17f7f..252558e 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -1547,16 +1547,26 @@ static inline void tcg_out_op(TCGContext *s, int opc, break; case INDEX_op_ext8s_i32: +#ifdef __ARM_ARCH_7A__ + /* sxtb */ + tcg_out32(s, 0xe6af0070 | (args[0] << 12) | args[1]); +#else tcg_out_dat_reg(s, COND_AL, ARITH_MOV, args[0], 0, args[1], SHIFT_IMM_LSL(24)); tcg_out_dat_reg(s, COND_AL, ARITH_MOV, args[0], 0, args[0], SHIFT_IMM_ASR(24)); +#endif break; case INDEX_op_ext16s_i32: +#ifdef __ARM_ARCH_7A__ + /* sxth */ + tcg_out32(s, 0xe6bf0070 | (args[0] << 12) | args[1]); +#else tcg_out_dat_reg(s, COND_AL, ARITH_MOV, args[0], 0, args[1], SHIFT_IMM_LSL(16)); tcg_out_dat_reg(s, COND_AL, ARITH_MOV, args[0], 0, args[0], SHIFT_IMM_ASR(16)); +#endif break; default: