From d8fe4a9c284f244679ab251637bff81126d91dfe Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 22 Aug 2012 13:15:10 -0700 Subject: target-s390: Convert LRA Note that truncating the store to r1 based on PSW_MASK_64 is incorrect. We always modify the entire register. Signed-off-by: Richard Henderson --- target-s390x/mem_helper.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'target-s390x/mem_helper.c') diff --git a/target-s390x/mem_helper.c b/target-s390x/mem_helper.c index 1b63259351..dcaa5a59d7 100644 --- a/target-s390x/mem_helper.c +++ b/target-s390x/mem_helper.c @@ -1127,7 +1127,7 @@ void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint32_t v1) } /* load real address */ -uint32_t HELPER(lra)(CPUS390XState *env, uint64_t addr, uint32_t r1) +uint64_t HELPER(lra)(CPUS390XState *env, uint64_t addr) { uint32_t cc = 0; int old_exc = env->exception_index; @@ -1151,14 +1151,7 @@ uint32_t HELPER(lra)(CPUS390XState *env, uint64_t addr, uint32_t r1) } env->exception_index = old_exc; - if (!(env->psw.mask & PSW_MASK_64)) { - env->regs[r1] = (env->regs[r1] & 0xffffffff00000000ULL) | - (ret & 0xffffffffULL); - } else { - env->regs[r1] = ret; - } - - return cc; + env->cc_op = cc; + return ret; } - #endif -- cgit v1.2.3