[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH 3/6] target/s390x: fix ipm pollut
From: |
Richard Henderson |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH 3/6] target/s390x: fix ipm polluting irrelevant bits |
Date: |
Mon, 6 Aug 2018 08:24:44 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 08/05/2018 11:28 AM, Pavel Zbitskiy wrote:
> + tcg_gen_andi_i64(t1, psw_mask, 0x00000f0000000000);
> + tcg_gen_shri_i64(t1, t1, 16);
It would be better to swap these two operations, so that a 64-bit constant
isn't needed for the mask, e.g:
tcg_gen_shri_i64(t1, psw_mask, 16);
tcg_gen_andi_i64(t1, t1, 0xf000000);
Or maybe rewrite this whole function with extract/deposit:
tcg_gen_extract_i64(t1, psw_mask, 40, 4);
tcg_gen_extu_i32_i64(t2, cc_op);
tcg_gen_deposit_i64(t1, t1, t2, 4, 60);
tcg_gen_deposit_i64(o->out, o->out, t1, 24, 8);
But what you have is not wrong so,
Reviewed-by: Richard Henderson <address@hidden>
r~
- [Qemu-trivial] [PATCH 0/6] Some improvements in z/Arch instructions support, Pavel Zbitskiy, 2018/08/05
- [Qemu-trivial] [PATCH 0/6] Some improvements in z/Arch instructions support, Pavel Zbitskiy, 2018/08/05
- [Qemu-trivial] [PATCH 1/6] target/s390x: add BAL and BALR instructions, Pavel Zbitskiy, 2018/08/05
- [Qemu-trivial] [PATCH 2/6] target/s390x: fix CSST decoding and runtime alignment check, Pavel Zbitskiy, 2018/08/05
- [Qemu-trivial] [PATCH 3/6] target/s390x: fix ipm polluting irrelevant bits, Pavel Zbitskiy, 2018/08/05
- [Qemu-trivial] [PATCH 4/6] target/s390x: add EX support for TRT and TRTR, Pavel Zbitskiy, 2018/08/05
- [Qemu-trivial] [PATCH 5/6] target/s390x: fix PACK reading 1 byte less and writing 1 byte more, Pavel Zbitskiy, 2018/08/05
- [Qemu-trivial] [PATCH 6/6] target/s390x: implement CVB, CVBY and CVBG, Pavel Zbitskiy, 2018/08/05
- Re: [Qemu-trivial] [Qemu-devel] [PATCH 0/6] Some improvements in z/Arch instructions support, Cornelia Huck, 2018/08/06