Message ID | 20170710204521.2058-9-rth@twiddle.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/target/s390x/translate.c b/target/s390x/translate.c index f94ba7c..0c609bd 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -3471,8 +3471,8 @@ static ExitStatus op_risbg(DisasContext *s, DisasOps *o) } /* In some cases we can implement this with extract. */ - if (imask == 0 && pos == 0 && len > 0 && rot + len <= 64) { - tcg_gen_extract_i64(o->out, o->in2, rot, len); + if (imask == 0 && pos == 0 && len > 0 && len <= rot) { + tcg_gen_extract_i64(o->out, o->in2, 64 - rot, len); return NO_EXIT; }