qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 04/62] tcg-s390: Fix tcg_prepare_qemu_ldst for user


From: Richard Henderson
Subject: [Qemu-devel] [PATCH 04/62] tcg-s390: Fix tcg_prepare_qemu_ldst for user mode.
Date: Thu, 27 May 2010 13:45:46 -0700

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]