Skip to contentSkip to conversation

correcting ARM CPSR register bit position comment

PATCH In review nemesisofstate 3 participants 3 messages Dec 14, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 correcting ARM CPSR register bit position comment

From: nemesis <nemesis@nemesis-laptop.(none)>

---
 target-arm/cpu.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-arm/cpu.h +1 -1
index 4a1c53f..910604f 100644
@@ -90,7 +90,7 @@ typedef struct CPUARMState {
 
     /* cpsr flag cache for faster execution */
     uint32_t CF; /* 0 or 1 */
-    uint32_t VF; /* V is the bit 31. All other bits are undefined */
+    uint32_t VF; /* V is the bit 28. */
     uint32_t NF; /* N is bit 31. All other bits are undefined.  */
     uint32_t ZF; /* Z set if zero.  */
     uint32_t QF; /* 0 or 1 */
Signature · 1 line
1.6.3.3
#1 lore raw

target-arm/cpu.h typedef struct CPUARMState { · line 93

Quoted 2 lines
target-arm/cpu.h +1 -1
-    uint32_t VF; /* V is the bit 31. All other bits are undefined */
+    uint32_t VF; /* V is the bit 28. */

No. The original comment is correct.

Paul

#2 lore raw
Quoted 4 lines · Paul Brook
Quoted 2 lines

-    uint32_t VF; /* V is the bit 31. All other bits are undefined */
+    uint32_t VF; /* V is the bit 28. */

No. The original comment is correct.

And so that the answer is at least a bit useful: these fields are not directly mapped to CPSR; they are the results of computations and can then be translated to bits in CPSR (look for cpsr_read/cpsr_write in helper.c). If you want to see how VF is set, look for add_cc in op_helper.c. This is done this way to speed up simulation.

HTH,

Laurent