diff options
-rw-r--r-- | target-s390x/helper.h | 1 | ||||
-rw-r--r-- | target-s390x/insn-data.def | 2 | ||||
-rw-r--r-- | target-s390x/misc_helper.c | 6 | ||||
-rw-r--r-- | target-s390x/translate.c | 16 |
4 files changed, 9 insertions, 16 deletions
diff --git a/target-s390x/helper.h b/target-s390x/helper.h index dd7479abcf..8e90741d3f 100644 --- a/target-s390x/helper.h +++ b/target-s390x/helper.h @@ -83,7 +83,6 @@ DEF_HELPER_FLAGS_2(sfpc, TCG_CALL_NO_RWG, void, env, i64) DEF_HELPER_3(servc, i32, env, i32, i64) DEF_HELPER_4(diag, i64, env, i32, i64, i64) DEF_HELPER_3(load_psw, void, env, i64, i64) -DEF_HELPER_FLAGS_2(stidp, TCG_CALL_NO_RWG, void, env, i64) DEF_HELPER_FLAGS_2(spx, TCG_CALL_NO_RWG, void, env, i64) DEF_HELPER_FLAGS_1(sck, TCG_CALL_NO_RWG, i32, i64) DEF_HELPER_2(stck, i32, env, i64) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index 5e1f8fda9b..4d9ecf4b13 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -640,6 +640,8 @@ /* STORE CONTROL */ C(0xb600, STCTL, RS_a, Z, 0, a2, 0, 0, stctl, 0) C(0xeb25, STCTG, RSY_a, Z, 0, a2, 0, 0, stctg, 0) +/* STORE CPU ID */ + C(0xb202, STIDP, S, Z, la2, 0, new, m1_64, stidp, 0) /* STORE THEN AND SYSTEM MASK */ C(0xac00, STNSM, SI, Z, la1, 0, 0, 0, stnosm, 0) /* STORE THEN OR SYSTEM MASK */ diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index 6dca0ebabd..009cc92660 100644 --- a/target-s390x/misc_helper.c +++ b/target-s390x/misc_helper.c @@ -131,12 +131,6 @@ uint64_t HELPER(diag)(CPUS390XState *env, uint32_t num, uint64_t mem, return r; } -/* Store CPU ID */ -void HELPER(stidp)(CPUS390XState *env, uint64_t a1) -{ - cpu_stq_data(env, a1, env->cpu_num); -} - /* Set Prefix */ void HELPER(spx)(CPUS390XState *env, uint64_t a1) { diff --git a/target-s390x/translate.c b/target-s390x/translate.c index bbbd5fe09a..d57c737fc8 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1033,15 +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 0x02: /* STIDP D2(B2) [S] */ - /* Store CPU ID */ - check_privileged(s); - decode_rs(s, insn, &r1, &r3, &b2, &d2); - tmp = get_address(s, 0, b2, d2); - potential_page_fault(s); - gen_helper_stidp(cpu_env, tmp); - tcg_temp_free_i64(tmp); - break; case 0x04: /* SCK D2(B2) [S] */ /* Set Clock */ check_privileged(s); @@ -2967,6 +2958,13 @@ static ExitStatus op_stctl(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_stidp(DisasContext *s, DisasOps *o) +{ + check_privileged(s); + tcg_gen_ld32u_i64(o->out, cpu_env, offsetof(CPUS390XState, cpu_num)); + return NO_EXIT; +} + static ExitStatus op_stnosm(DisasContext *s, DisasOps *o) { uint64_t i2 = get_field(s->fields, i2); |