From patchwork Thu May 27 20:45:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 53786 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 772B0B7D1E for ; Fri, 28 May 2010 06:53:35 +1000 (EST) Received: from localhost ([127.0.0.1]:33541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHk4w-0004yf-IA for incoming@patchwork.ozlabs.org; Thu, 27 May 2010 16:53:22 -0400 Received: from [140.186.70.92] (port=37862 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHjyh-0001nD-7C for qemu-devel@nongnu.org; Thu, 27 May 2010 16:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHjyg-0005Bj-3r for qemu-devel@nongnu.org; Thu, 27 May 2010 16:46:55 -0400 Received: from are.twiddle.net ([75.149.56.221]:36608) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjyf-0005BV-U9 for qemu-devel@nongnu.org; Thu, 27 May 2010 16:46:54 -0400 Received: from anchor.twiddle.home (anchor.twiddle.home [172.31.0.4]) by are.twiddle.net (Postfix) with ESMTPS id 43539A60; Thu, 27 May 2010 13:46:53 -0700 (PDT) Received: from anchor.twiddle.home (anchor.twiddle.home [127.0.0.1]) by anchor.twiddle.home (8.14.4/8.14.4) with ESMTP id o4RKkqKB030853; Thu, 27 May 2010 13:46:52 -0700 Received: (from rth@localhost) by anchor.twiddle.home (8.14.4/8.14.4/Submit) id o4RKkpsT030852; Thu, 27 May 2010 13:46:51 -0700 From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 May 2010 13:45:46 -0700 Message-Id: <1274993204-30766-5-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.0.1 In-Reply-To: <1274993204-30766-1-git-send-email-rth@twiddle.net> References: <1274993204-30766-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: agraf@suse.de, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 04/62] tcg-s390: Fix tcg_prepare_qemu_ldst for user mode. 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 This isn't the most efficient way to implement user memory accesses, but it's the minimal change to fix the compilation error. Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index 9ab1d96..f0013e7 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -418,8 +418,14 @@ static void tcg_prepare_qemu_ldst(TCGContext* s, int data_reg, int addr_reg, int mem_index, int opc, uint16_t **label2_ptr_p, int is_store) { + int arg0 = TCG_REG_R2; + /* user mode, no address translation required */ - *arg0 = addr_reg; + if (TARGET_LONG_BITS == 32) { + tcg_out_b9(s, B9_LLGFR, arg0, addr_reg); + } else { + tcg_out_b9(s, B9_LGR, arg0, addr_reg); + } } static void tcg_finish_qemu_ldst(TCGContext* s, uint16_t *label2_ptr)