On 11/2/21 6:52 PM, Warner Losh wrote:
> + /*
> + * Low bit indicates whether or not we're entering thumb mode.
> + */
> + cpsr = cpsr_read(env);
> + if (ka->_sa_handler & 1) {
> + cpsr |= CPSR_T;
> + } else {
> + cpsr &= ~CPSR_T;
> + }
> + cpsr_write(env, cpsr, CPSR_T, CPSRWriteByInstr);
Like I said before, you don't need the cpsr_read, because the mask ensures that only
CPSR_T will change:
cpsr_write(env, (ka->_sa_handler & 1) * CPSR_T, CPSR_T, CPSRWriteByInstr);
Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Thanks. Applied. I'd intended to do this for this round, but it slipped my mind.
Warner