Message ID | 1274993204-30766-5-git-send-email-rth@twiddle.net |
---|---|
State | New |
Headers | show |
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)
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 <rth@twiddle.net> --- tcg/s390/tcg-target.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)