RISC-V: Replace __builtin_popcount with ctpop8 in PLIC
commit244df421333970e66bc48e48e7fb45fcb1017ea0
authorMichael Clark <mjc@sifive.com>
Sat, 16 Mar 2019 01:20:11 +0000 (16 01:20 +0000)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 19 Mar 2019 12:14:38 +0000 (19 05:14 -0700)
tree69930f5b39cf9968a3b78ed3ac0829a8fc8d7e4a
parentaad5ac2311f3ad2c0be12d0eaaf4ef4398438fc2
RISC-V: Replace __builtin_popcount with ctpop8 in PLIC

The mode variable only uses the lower 4-bits (M,H,S,U) so
replace the GCC specific __builtin_popcount with ctpop8.

Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
hw/riscv/sifive_plic.c