From patchwork Tue Nov 1 22:06:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 123147 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CF0AEB6F6F for ; Wed, 2 Nov 2011 09:07:47 +1100 (EST) Received: from localhost ([::1]:46812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLMUd-0002Eh-4k for incoming@patchwork.ozlabs.org; Tue, 01 Nov 2011 18:07:39 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLMUU-0002Cz-DY for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:07:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLMUR-00058g-2W for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:07:30 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:33693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLMUQ-00058U-Tn for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:07:26 -0400 Received: by vws17 with SMTP id 17so1757075vws.4 for ; Tue, 01 Nov 2011 15:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=Uvpf+E5wGhOo0kYx9ls+0f7SgCkmeUbZoCNSmVRGzWE=; b=iRI/d91fvpxZUoH4aWvRL0/UClnPZs3HGNIMZzz3682wEJ6cmFwm1EhJQZE9hirnTZ K/nSnRzmqLY0ZGK/ZpCzfRW+YgHhC/54Ko3Qk4r4Zmgg5gI4jy0z7YSWbV1pmvBTK1HN 6Pw1d3F9dxPdRAU2J/6TBYQm29UWxfShgW2Ps= Received: by 10.52.21.83 with SMTP id t19mr1501629vde.88.1320185246239; Tue, 01 Nov 2011 15:07:26 -0700 (PDT) Received: from localhost.localdomain (c-98-203-235-125.hsd1.wa.comcast.net. [98.203.235.125]) by mx.google.com with ESMTPS id ha1sm381848vdb.17.2011.11.01.15.07.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Nov 2011 15:07:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 1 Nov 2011 15:06:42 -0700 Message-Id: <1320185203-28036-1-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.6.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.45 Cc: blauwirbel@gmail.com, agraf@suse.de Subject: [Qemu-devel] [PATCH 1/2] tcg: Fix regression in tcg_gen_deposit_i64. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The error being caused by the failure to copy the other half of the input to the output after having narrowed the deposit operation. Signed-off-by: Richard Henderson --- tcg/tcg-op.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index 24ec7fc..8637fe8 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -2090,6 +2090,7 @@ static inline void tcg_gen_deposit_i64(TCGv_i64 ret, TCGv_i64 arg1, #if TCG_TARGET_REG_BITS == 32 if (ofs >= 32) { + tcg_gen_mov_i32(TCGV_LOW(ret), TCGV_LOW(arg1)); tcg_gen_deposit_i32(TCGV_HIGH(ret), TCGV_HIGH(arg1), TCGV_LOW(arg2), ofs - 32, len); return; @@ -2097,6 +2098,7 @@ static inline void tcg_gen_deposit_i64(TCGv_i64 ret, TCGv_i64 arg1, if (ofs + len <= 32) { tcg_gen_deposit_i32(TCGV_LOW(ret), TCGV_LOW(arg1), TCGV_LOW(arg2), ofs, len); + tcg_gen_mov_i32(TCGV_HIGH(ret), TCGV_HIGH(arg1)); return; } #endif