ppc: Define SETFIELD for the ppc target
commit95444afcab4dd7ecd117b67aae5af8f8665be0ff
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Tue, 28 Jun 2022 08:05:44 +0000 (28 18:05 +1000)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 6 Jul 2022 13:22:38 +0000 (6 10:22 -0300)
tree169a6e17c6336a0c52fff98165d06520b03e4ec0
parentb7d30fae5b4fe672c31f567358947990c37cd957
ppc: Define SETFIELD for the ppc target

It keeps repeating, move it to the header. This uses __builtin_ffsll() to
allow using the macros in #define.

This is not using the QEMU's FIELD macros as this would require changing
all such macros found in skiboot (the PPC PowerNV firmware).

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220628080544.1509428-1-aik@ozlabs.ru>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
hw/intc/pnv_xive.c
hw/intc/pnv_xive2.c
hw/pci-host/pnv_phb4.c
include/hw/pci-host/pnv_phb3_regs.h
target/ppc/cpu.h