152 aligned_stack_ptr = new_stack_ptr & ~((
target_addr_t)align - 1);
153 if (aligned_stack_ptr != new_stack_ptr &&
161 return aligned_stack_ptr;
169 stacking, stack_ptr, 8);
195 const uint32_t ALIGN_NEEDED = (1 << 9);
204 if ((xpsr & ALIGN_NEEDED) != 0) {
205 LOG_DEBUG(
"XPSR(0x%08" PRIx32
") indicated stack alignment was necessary\r\n",
209 return new_stack_ptr;
216 const int XPSR_OFFSET = 0x3c;
218 stack_ptr, XPSR_OFFSET);
225 const int XPSR_OFFSET = 0x40;
227 stack_ptr, XPSR_OFFSET);
234 const int XPSR_OFFSET = 0x80;
236 stack_ptr, XPSR_OFFSET);
242 .stack_growth_direction = -1,
250 .stack_growth_direction = -1,
258 .stack_growth_direction = -1,
266 .stack_growth_direction = -1,
267 .num_output_registers = 26,
274 .stack_growth_direction = -1,
275 .num_output_registers = 32,
#define ARMV7M_NUM_CORE_REGS
#define LOG_DEBUG(expr ...)
static target_addr_t rtos_standard_cortex_m4f_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
static target_addr_t rtos_generic_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr, int align)
static const struct stack_register_offset rtos_standard_cortex_m4f_stack_offsets[]
static const struct stack_register_offset rtos_standard_cortex_m3_stack_offsets[ARMV7M_NUM_CORE_REGS]
const struct rtos_register_stacking rtos_standard_cortex_m3_stacking
static const struct stack_register_offset rtos_standard_cortex_m4f_fpu_stack_offsets[]
const struct rtos_register_stacking rtos_standard_cortex_m4f_fpu_stacking
static const struct stack_register_offset rtos_standard_nds32_n1068_stack_offsets[]
const struct rtos_register_stacking rtos_standard_cortex_m4f_stacking
static target_addr_t rtos_standard_cortex_m4f_fpu_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
const struct rtos_register_stacking rtos_standard_cortex_r4_stacking
static target_addr_t rtos_standard_cortex_m3_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
const struct rtos_register_stacking rtos_standard_nds32_n1068_stacking
static const struct stack_register_offset rtos_standard_cortex_r4_stack_offsets[]
target_addr_t rtos_cortex_m_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr, size_t xpsr_offset)
target_addr_t rtos_generic_stack_align8(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
unsigned char stack_registers_size
signed char stack_growth_direction
enum target_endianness endianness
static uint32_t be_to_h_u32(const uint8_t *buf)
static uint32_t le_to_h_u32(const uint8_t *buf)