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 From: Richard Henderson Date: Thu, 27 May 2010 13:45:46 -0700 Message-Id: <1274993204-30766-5-git-send-email-rth@twiddle.net> In-Reply-To: <1274993204-30766-1-git-send-email-rth@twiddle.net> References: <1274993204-30766-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 04/62] tcg-s390: Fix tcg_prepare_qemu_ldst for user mode. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: agraf@suse.de, aurelien@aurel32.net 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) -- 1.7.0.1