From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN1v9-00022Q-QJ for qemu-devel@nongnu.org; Wed, 05 Aug 2015 12:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZN1v8-0004wf-Sb for qemu-devel@nongnu.org; Wed, 05 Aug 2015 12:52:03 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN1v8-0004wY-O9 for qemu-devel@nongnu.org; Wed, 05 Aug 2015 12:52:02 -0400 From: Christopher Covington Date: Wed, 5 Aug 2015 12:51:21 -0400 Message-Id: <1438793483-12721-13-git-send-email-cov@codeaurora.org> In-Reply-To: <1438793483-12721-1-git-send-email-cov@codeaurora.org> References: <1438793483-12721-1-git-send-email-cov@codeaurora.org> Subject: [Qemu-devel] [RFC 12/14] bbvec: Detect mode changes after uncached_cpsr update List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Christopher Covington The previous code checked for the mode change before the new mode was written to env->uncached_cpsr, which unfortunately made the bbvec output look reasonable for small tests. Written by Aaron Lindsay. Signed-off-by: Christopher Covington --- target-arm/helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 297eb7c..ae0a4ac 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -4281,6 +4281,9 @@ void cpsr_write(CPUARMState *env, uint32_t val, uint32_t mask) } mask &= ~CACHED_CPSR_BITS; env->uncached_cpsr = (env->uncached_cpsr & ~mask) | (val & mask); +#ifdef CONFIG_BBVEC + context_check_mode(env); +#endif } #ifdef CONFIG_BBVEC @@ -4540,9 +4543,6 @@ void switch_mode(CPUARMState *env, int mode) return; update_instruction_count(env); -#ifdef CONFIG_BBVEC - context_check_mode(env); -#endif if (old_mode == ARM_CPU_MODE_FIQ) { memcpy (env->fiq_regs, env->regs + 8, 5 * sizeof(uint32_t)); -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project