diff options
-rw-r--r-- | target-s390x/helper.h | 2 | ||||
-rw-r--r-- | target-s390x/insn-data.def | 2 | ||||
-rw-r--r-- | target-s390x/mem_helper.c | 4 | ||||
-rw-r--r-- | target-s390x/translate.c | 20 |
4 files changed, 13 insertions, 15 deletions
diff --git a/target-s390x/helper.h b/target-s390x/helper.h index 9bcf4d6b85..4597b58f59 100644 --- a/target-s390x/helper.h +++ b/target-s390x/helper.h @@ -107,7 +107,7 @@ DEF_HELPER_2(sacf, void, env, i64) DEF_HELPER_FLAGS_3(ipte, TCG_CALL_NO_RWG, void, env, i64, i64) DEF_HELPER_FLAGS_1(ptlb, TCG_CALL_NO_RWG, void, env) DEF_HELPER_2(lra, i64, env, i64) -DEF_HELPER_3(stura, void, env, i64, i32) +DEF_HELPER_3(stura, void, env, i64, i64) #endif #include "exec/def-helper.h" diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index 24a419c416..8e457cb9f2 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -678,6 +678,8 @@ C(0xac00, STNSM, SI, Z, la1, 0, 0, 0, stnosm, 0) /* STORE THEN OR SYSTEM MASK */ C(0xad00, STOSM, SI, Z, la1, 0, 0, 0, stnosm, 0) +/* STORE USING REAL ADDRESS */ + C(0xb246, STURA, RRE, Z, r1_o, r2_o, 0, 0, stura, 0) /* TEST PROTECTION */ C(0xe501, TPROT, SSE, Z, la1, a2, 0, 0, tprot, 0) diff --git a/target-s390x/mem_helper.c b/target-s390x/mem_helper.c index 406ec9b69d..8987bbb9b1 100644 --- a/target-s390x/mem_helper.c +++ b/target-s390x/mem_helper.c @@ -1093,9 +1093,9 @@ void HELPER(ptlb)(CPUS390XState *env) } /* store using real address */ -void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint32_t v1) +void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint64_t v1) { - stw_phys(get_address(env, 0, 0, addr), v1); + stw_phys(get_address(env, 0, 0, addr), (uint32_t)v1); } /* load real address */ diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 1172031465..8079c6fc3d 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1033,18 +1033,6 @@ static void disas_b2(CPUS390XState *env, DisasContext *s, int op, LOG_DISAS("disas_b2: op 0x%x r1 %d r2 %d\n", op, r1, r2); switch (op) { - case 0x46: /* STURA R1,R2 [RRE] */ - /* Store Using Real Address */ - check_privileged(s); - r1 = (insn >> 4) & 0xf; - r2 = insn & 0xf; - tmp32_1 = load_reg32(r1); - tmp = load_reg(r2); - potential_page_fault(s); - gen_helper_stura(cpu_env, tmp, tmp32_1); - tcg_temp_free_i32(tmp32_1); - tcg_temp_free_i64(tmp); - break; case 0x50: /* CSP R1,R2 [RRE] */ /* Compare And Swap And Purge */ check_privileged(s); @@ -2945,6 +2933,14 @@ static ExitStatus op_stnosm(DisasContext *s, DisasOps *o) } return NO_EXIT; } + +static ExitStatus op_stura(DisasContext *s, DisasOps *o) +{ + check_privileged(s); + potential_page_fault(s); + gen_helper_stura(cpu_env, o->in2, o->in1); + return NO_EXIT; +} #endif static ExitStatus op_st8(DisasContext *s, DisasOps *o) |