qemu-devel
[Top][All Lists]
Advanced

[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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]