Re: [PATCH v2 16/21] target/ppc: Remove msr_ep macro

2022-05-02 Thread Richard Henderson
On 5/2/22 07:39, Víctor Colombo wrote: -if (unlikely((value >> MSR_EP) & 1) != msr_ep) { -env->excp_prefix = ((value >> MSR_EP) & 1) * 0xFFF0; +if (unlikely(!(value & env->msr & R_MSR_EP_MASK))) { Needs xor. +env->excp_prefix = FIELD_EX64(env->msr, MSR, EP) * 0xFFF

[PATCH v2 16/21] target/ppc: Remove msr_ep macro

2022-05-02 Thread Víctor Colombo
msr_ep 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. Also, this macro was called in a specific place where it was being used 'kinda' like a mask: (value >> MSR_EP) & 1) != msr_ep. The setup to use FIELD_E