diff options
author | Richard Henderson <rth@twiddle.net> | 2012-08-24 14:27:42 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-01-05 12:18:42 -0800 |
commit | 4600c994d93fc9af2b045086dd31e613d2f9d7bc (patch) | |
tree | 80c65cd48324e2547aba5ab7bd813729027a3202 /target-s390x/translate.c | |
parent | aa31bf60312157aefb09f887e2f750c7d59a8bbc (diff) | |
download | qemu-4600c994d93fc9af2b045086dd31e613d2f9d7bc.tar.gz qemu-4600c994d93fc9af2b045086dd31e613d2f9d7bc.tar.bz2 qemu-4600c994d93fc9af2b045086dd31e613d2f9d7bc.zip |
target-s390: Convert SRST
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-s390x/translate.c')
-rw-r--r-- | target-s390x/translate.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/target-s390x/translate.c b/target-s390x/translate.c index f1eb4bb8da..bbbd5fe09a 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1021,12 +1021,11 @@ static void free_compare(DisasCompare *c) static void disas_b2(CPUS390XState *env, DisasContext *s, int op, uint32_t insn) { +#ifndef CONFIG_USER_ONLY TCGv_i64 tmp, tmp2, tmp3; - TCGv_i32 tmp32_1, tmp32_2, tmp32_3; + TCGv_i32 tmp32_1, tmp32_2; int r1, r2; -#ifndef CONFIG_USER_ONLY int r3, d2, b2; -#endif r1 = (insn >> 4) & 0xf; r2 = insn & 0xf; @@ -1034,19 +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 0x5e: /* SRST R1,R2 [RRE] */ - tmp32_1 = load_reg32(0); - tmp32_2 = tcg_const_i32(r1); - tmp32_3 = tcg_const_i32(r2); - potential_page_fault(s); - gen_helper_srst(cc_op, cpu_env, tmp32_1, tmp32_2, tmp32_3); - set_cc_static(s); - tcg_temp_free_i32(tmp32_1); - tcg_temp_free_i32(tmp32_2); - tcg_temp_free_i32(tmp32_3); - break; - -#ifndef CONFIG_USER_ONLY case 0x02: /* STIDP D2(B2) [S] */ /* Store CPU ID */ check_privileged(s); @@ -1314,12 +1300,14 @@ static void disas_b2(CPUS390XState *env, DisasContext *s, int op, tcg_temp_free_i32(tmp32_1); tcg_temp_free_i64(tmp); break; -#endif default: +#endif LOG_DISAS("illegal b2 operation 0x%x\n", op); gen_illegal_opcode(s); +#ifndef CONFIG_USER_ONLY break; } +#endif } static void disas_s390_insn(CPUS390XState *env, DisasContext *s) @@ -3136,6 +3124,15 @@ static ExitStatus op_stmh(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_srst(DisasContext *s, DisasOps *o) +{ + potential_page_fault(s); + gen_helper_srst(o->in1, cpu_env, regs[0], o->in1, o->in2); + set_cc_static(s); + return_low128(o->in2); + return NO_EXIT; +} + static ExitStatus op_sub(DisasContext *s, DisasOps *o) { tcg_gen_sub_i64(o->out, o->in1, o->in2); |