ppc: spapr: cleanup cr get/set with helpers.
commit2060436aab55ec391115ddb73e8773393008cac3
authorHarsh Prateek Bora <harshpb@linux.ibm.com>
Wed, 3 May 2023 09:36:18 +0000 (3 15:06 +0530)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 5 May 2023 15:34:22 +0000 (5 12:34 -0300)
treea0548197e9115ea1f565dffd8904aef8a5af9aff
parent1b336bb63e6fa6e3bc343b19725e09a55adc17b1
ppc: spapr: cleanup cr get/set with helpers.

The bits in cr reg are grouped into eight 4-bit fields represented
by env->crf[8] and the related calculations should be abstracted to
keep the calling routines simpler to read. This is a step towards
cleaning up the related/calling code for better readability.

Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230503093619.2530487-2-harshpb@linux.ibm.com>
[danielhb: add 'const' modifier to fix linux-user build]
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
hw/ppc/spapr_hcall.c
linux-user/elfload.c
linux-user/ppc/signal.c
target/ppc/cpu.c
target/ppc/cpu.h
target/ppc/gdbstub.c
target/ppc/kvm.c
target/ppc/ppc-qmp-cmds.c