OSDN Git Service

target/ppc: remove ROTRu32 and ROTRu64 macros from int_helper.c
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 30 Jan 2019 20:36:37 +0000 (20:36 +0000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 4 Feb 2019 07:44:19 +0000 (18:44 +1100)
commit0ef83bf29e95bf4ec7ad22ea66153c331e14a099
treee8eba302c67fdea5b4138848ef730f3993d7b926
parent634c583526ffcd3db8753d4684c5e0a51e74cbbf
target/ppc: remove ROTRu32 and ROTRu64 macros from int_helper.c

Richard points out that these macros suffer from a -fsanitize=shift bug in that
they improperly handle n == 0 turning it into a shift by 32/64 respectively.
Replace them with QEMU's existing ror32() and ror64() functions instead.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/int_helper.c