9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_ARMDEFINES_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_ARMDEFINES_H
12#include "llvm/Support/ErrorHandling.h"
69#define COND_UNCOND 0xF
104 llvm_unreachable(
"Unknown condition code");
108 const uint32_t cpsr) {
109 const uint32_t cpsr_n = (cpsr >> 31) & 1u;
110 const uint32_t cpsr_z = (cpsr >> 30) & 1u;
111 const uint32_t cpsr_c = (cpsr >> 29) & 1u;
112 const uint32_t cpsr_v = (cpsr >> 28) & 1u;
116 return (cpsr_z == 1);
118 return (cpsr_z == 0);
120 return (cpsr_c == 1);
122 return (cpsr_c == 0);
124 return (cpsr_n == 1);
126 return (cpsr_n == 0);
128 return (cpsr_v == 1);
130 return (cpsr_v == 0);
132 return ((cpsr_c == 1) && (cpsr_z == 0));
134 return ((cpsr_c == 0) || (cpsr_z == 1));
136 return (cpsr_n == cpsr_v);
138 return (cpsr_n != cpsr_v);
140 return ((cpsr_z == 0) && (cpsr_n == cpsr_v));
142 return ((cpsr_z == 1) || (cpsr_n != cpsr_v));
165#define CPSR_MODE_USR 0x10u
166#define CPSR_MODE_FIQ 0x11u
167#define CPSR_MODE_IRQ 0x12u
168#define CPSR_MODE_SVC 0x13u
169#define CPSR_MODE_ABT 0x17u
170#define CPSR_MODE_UND 0x1bu
171#define CPSR_MODE_SYS 0x1fu
174#define MASK_CPSR_MODE_MASK (0x0000001fu)
175#define MASK_CPSR_IT_MASK (0x0600fc00u)
176#define MASK_CPSR_T (1u << CPSR_T_POS)
177#define MASK_CPSR_F (1u << CPSR_F_POS)
178#define MASK_CPSR_I (1u << CPSR_I_POS)
179#define MASK_CPSR_A (1u << CPSR_A_POS)
180#define MASK_CPSR_E (1u << CPSR_E_POS)
181#define MASK_CPSR_GE_MASK (0x000f0000u)
182#define MASK_CPSR_J (1u << CPSR_J_POS)
183#define MASK_CPSR_Q (1u << CPSR_Q_POS)
184#define MASK_CPSR_V (1u << CPSR_V_POS)
185#define MASK_CPSR_C (1u << CPSR_C_POS)
186#define MASK_CPSR_Z (1u << CPSR_Z_POS)
187#define MASK_CPSR_N (1u << CPSR_N_POS)
A class that represents a running process on the host machine.
static const char * ARMCondCodeToString(uint32_t CC)
static bool ARMConditionPassed(const uint32_t condition, const uint32_t cpsr)