qemu-arm
[Top][All Lists]
Advanced

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

[Qemu-arm] [PATCH v2 04/26] armv7m: additional cpu state for exception h


From: Michael Davidsaver
Subject: [Qemu-arm] [PATCH v2 04/26] armv7m: additional cpu state for exception handling
Date: Wed, 2 Dec 2015 19:18:31 -0500

Track priorities and highest active and pending
exception.  Also the highest pending exception
for faster exception handler entry.

The pending exception information will be re-calculated
on load, so no additional vmstate tracking is needed.
---
 target-arm/cpu.c | 2 ++
 target-arm/cpu.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 728854f..5348028 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -173,6 +173,8 @@ static void arm_cpu_reset(CPUState *s)
         uint32_t initial_pc; /* Loaded from 0x4 */
         uint8_t *rom;
 
+        env->v7m.exception_prio = env->v7m.pending_prio = 0x100;
+
         env->daif &= ~PSTATE_I;
         rom = rom_ptr(0);
         if (rom) {
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 815fef8..c193fbb 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -398,6 +398,9 @@ typedef struct CPUARMState {
         uint32_t control;
         int current_sp;
         int exception;
+        int exception_prio;
+        unsigned pending;
+        int pending_prio;
     } v7m;
 
     /* Information associated with an exception about to be taken:
-- 
2.1.4




reply via email to

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