qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 19/21] target/ppc: Remove msr_hv macro


From: Richard Henderson
Subject: Re: [PATCH v2 19/21] target/ppc: Remove msr_hv macro
Date: Mon, 2 May 2022 14:55:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 5/2/22 07:39, Víctor Colombo wrote:
msr_hv macro hides the usage of env->msr, which is a bad
behavior. Substitute it with FIELD_EX64 calls that explicitly use
env->msr as a parameter.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>

---

v2: Remove M_MSR_HV and use FIELD_EX64 instead.

In this patch I'm having some problems on how to use FIELD in the
'not defined TARGET_PPC64' case. IIUC in case the target is 32 bits
then the mask should be zero. However the mask is created in
MAKE_64BIT_MASK, and MAKE_64BIT_MASK(_, 0) triggers undefined behavior
as it would try to do a 64 bit right shift. Am I missing an easy way
to do this?

Sadly not.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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