[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/6] target/ppc: eliminate use of EL_IDX macros
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] target/ppc: eliminate use of EL_IDX macros from int_helper.c |
Date: |
Wed, 26 Dec 2018 07:22:59 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 12/23/18 10:38 PM, Mark Cave-Ayland wrote:
> These macros can be eliminated by instead using the relavant Vsr* macros in
> the few locations where they appear.
>
> Signed-off-by: Mark Cave-Ayland <address@hidden>
> ---
> target/ppc/int_helper.c | 66
> ++++++++++++++++++++-----------------------------
> 1 file changed, 27 insertions(+), 39 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
> -#define ROTRu32(v, n) (((v) >> (n)) | ((v) << (32-n)))
> +#define ROTRu32(v, n) (((v) >> (n)) | ((v) << (32 - n)))
For a different patch, this is ror32().
This version contains a -fsanitize=shift bug, in that it improperly handles n
== 0 into a shift by 32.
> #define ROTRu64(v, n) (((v) >> (n)) | ((v) << (64-n)))
Similarly.
r~
- [Qemu-devel] [PATCH 0/6] target/ppc: remove various endian hacks from int_helper.c, Mark Cave-Ayland, 2018/12/23
- [Qemu-devel] [PATCH 3/6] target/ppc: rework vmul{e, o}{s, u}{b, h, w} instructions to use Vsr* macros, Mark Cave-Ayland, 2018/12/23
- [Qemu-devel] [PATCH 1/6] target/ppc: implement complete set of Vsr* macros, Mark Cave-Ayland, 2018/12/23
- [Qemu-devel] [PATCH 4/6] target/ppc: eliminate use of HI_IDX and LO_IDX macros from int_helper.c, Mark Cave-Ayland, 2018/12/23
- [Qemu-devel] [PATCH 6/6] target/ppc: remove various HOST_WORDS_BIGENDIAN hacks in int_helper.c, Mark Cave-Ayland, 2018/12/23
- [Qemu-devel] [PATCH 5/6] target/ppc: eliminate use of EL_IDX macros from int_helper.c, Mark Cave-Ayland, 2018/12/23
- Re: [Qemu-devel] [PATCH 5/6] target/ppc: eliminate use of EL_IDX macros from int_helper.c,
Richard Henderson <=
- [Qemu-devel] [PATCH 2/6] target/ppc: rework vmrg{l, h}{b, h, w} instructions to use Vsr* macros, Mark Cave-Ayland, 2018/12/23