[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH 08/20] target/arm: Don't warn about e
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH 08/20] target/arm: Don't warn about exception return with PC low bit set for v8M |
Date: |
Thu, 5 Oct 2017 12:32:27 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/22/2017 10:59 AM, Peter Maydell wrote:
> + if ((env->regs[15] & 1) && !arm_feature(env, ARM_FEATURE_V8)) {
> qemu_log_mask(LOG_GUEST_ERROR,
> "M profile return from interrupt with misaligned "
> - "PC is UNPREDICTABLE\n");
> - /* Actual hardware seems to ignore the lsbit, and there are
> several
> - * RTOSes out there which incorrectly assume the r15 in the stack
> - * frame should be a Thumb-style "lsbit indicates ARM/Thumb"
> value.
> - */
> - env->regs[15] &= ~1U;
> + "PC is UNPREDICTABLE on v7M\n");
> }
> + env->regs[15] &= ~1U;
If you're going to always test regs[15] & 1, you might as well use that and
avoid an unlikely(?) writeback.
if (env->regs[15] & 1) {
if (!arm_feature(env, ARM_FEATURE_V8)) {
qemu_log_mask(...);
}
env->regs[15] &= ~1U;
}
Otherwise,
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [Qemu-arm] [Qemu-devel] [PATCH 08/20] target/arm: Don't warn about exception return with PC low bit set for v8M,
Richard Henderson <=