Message ID | 20221006034421.1179141-10-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | target/s390x: pc-relative translation blocks | expand |
On Wed, Oct 05, 2022 at 08:44:04PM -0700, Richard Henderson wrote: > Trivial but non-mechanical conversion away from pc_tmp. > > Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > target/s390x/tcg/translate.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) I was a bit worried about this sequence and wrote a regression test. It did not find any issues, but I will post it here, might prove useful some day. Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 4c3ea958d7..ad73a64b05 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -1558,9 +1558,11 @@ static void save_link_info(DisasContext *s, DisasOps *o) return; } gen_op_calc_cc(s); - tcg_gen_andi_i64(o->out, o->out, 0xffffffff00000000ull); - tcg_gen_ori_i64(o->out, o->out, ((s->ilen / 2) << 30) | s->pc_tmp); t = tcg_temp_new_i64(); + tcg_gen_andi_i64(o->out, o->out, 0xffffffff00000000ull); + gen_psw_addr_disp(s, t, s->ilen); + tcg_gen_or_i64(o->out, o->out, t); + tcg_gen_ori_i64(o->out, o->out, (s->ilen / 2) << 30); tcg_gen_shri_i64(t, psw_mask, 16); tcg_gen_andi_i64(t, t, 0x0f000000); tcg_gen_or_i64(o->out, o->out, t);