diff options
author | Richard Henderson <rth@twiddle.net> | 2017-06-18 11:26:38 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-07-17 14:13:17 -0700 |
commit | 7591db780d9e464232e7ae692302ebe1dbb76141 (patch) | |
tree | 38427efffa6caae63622feaa978eb62554283324 /target/s390x/translate.c | |
parent | 941ef3db03fe40cec04fbf0102d1aa14711c708d (diff) | |
download | qemu-7591db780d9e464232e7ae692302ebe1dbb76141.zip qemu-7591db780d9e464232e7ae692302ebe1dbb76141.tar.gz qemu-7591db780d9e464232e7ae692302ebe1dbb76141.tar.bz2 |
target/s390x: Tidy SRST
Since we require all registers saved on input, read R0 from ENV instead
of passing it manually. Recognize the specification exception when R0
contains incorrect data. Keep high bits of result registers unmodified
when in 31 or 24-bit mode.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/s390x/translate.c')
-rw-r--r-- | target/s390x/translate.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c index edfdaf4..e37a56f 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -4287,9 +4287,14 @@ static ExitStatus op_stpq(DisasContext *s, DisasOps *o) static ExitStatus op_srst(DisasContext *s, DisasOps *o) { - gen_helper_srst(o->in1, cpu_env, regs[0], o->in1, o->in2); + TCGv_i32 r1 = tcg_const_i32(get_field(s->fields, r1)); + TCGv_i32 r2 = tcg_const_i32(get_field(s->fields, r2)); + + gen_helper_srst(cpu_env, r1, r2); + + tcg_temp_free_i32(r1); + tcg_temp_free_i32(r2); set_cc_static(s); - return_low128(o->in2); return NO_EXIT; } |