aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2017-05-24 11:49:53 -0700
committerRichard Henderson <rth@twiddle.net>2017-06-06 14:34:31 -0700
commit8350079329562e93d109607d03393153de582d4a (patch)
tree864bd14cde539d4e4a738201a4fc7182ca301f83 /target/s390x/translate.c
parentb90fb26bded72c28865e4fb257b5d3975f93b88b (diff)
target/s390x: Fix some helper_ex problems
(1) The OR of the low bits or R1 into INSN were not being done consistently; it was forgotten along all but the SVC path. (2) The setting of ILEN was wrong on SVC path for EXRL. (3) The data load for ICM read too much. Fix these by consolidating data load at the beginning, using get_ilen to control the number of bytes loaded, and ORing in the byte from R1. Use extract64 from the full aligned insn to extract arguments. Pass in ILEN rather than RET as the more natural way to give the required data along the SVC path. Modify ENV->CC_OP directly rather than include it in the functional interface. 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index e99fbd9f4c..c1162a134d 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -2164,14 +2164,14 @@ static ExitStatus op_ex(DisasContext *s, DisasOps *o)
MVC inside of memcpy, which needs a helper call anyway. So
perhaps this doesn't bear thinking about any further. */
- TCGv_i64 tmp;
+ TCGv_i32 ilen;
update_psw_addr(s);
gen_op_calc_cc(s);
- tmp = tcg_const_i64(s->next_pc);
- gen_helper_ex(cc_op, cpu_env, cc_op, o->in1, o->in2, tmp);
- tcg_temp_free_i64(tmp);
+ ilen = tcg_const_i32(s->next_pc - s->pc);
+ gen_helper_ex(cpu_env, ilen, o->in1, o->in2);
+ tcg_temp_free_i32(ilen);
return NO_EXIT;
}