Lines Matching +full:ip +full:- +full:addr

4  *  SPDX-License-Identifier: Apache-2.0
9 static bool valid_stack(uintptr_t addr, k_tid_t current) in valid_stack() argument
11 return current->stack_info.start <= addr && in valid_stack()
12 addr < current->stack_info.start + current->stack_info.size; in valid_stack()
15 static inline bool in_text_region(uintptr_t addr) in in_text_region() argument
19 return (addr >= (uintptr_t)&__text_region_start) && (addr < (uintptr_t)&__text_region_end); in in_text_region()
36 * In riscv (arch/riscv/core/isr.S) ra, ip($mepc) and fp($s0) are saved in arch_perf_current_stack_trace()
39 * _current_cpu->irq_stack and save $sp with offset -16 on irq stack in arch_perf_current_stack_trace()
41 * The following lines lines do the reverse things to get ra, ip anf fp in arch_perf_current_stack_trace()
45 *((struct arch_esf **)(((uintptr_t)_current_cpu->irq_stack) - 16)); in arch_perf_current_stack_trace()
53 * [-] <- $fp($s0) (curr) in arch_perf_current_stack_trace()
61 * [-] <- $fp($s0) (curr) in arch_perf_current_stack_trace()
66 void **fp = (void **)esf->s0; in arch_perf_current_stack_trace()
67 void **new_fp = (void **)fp[-1]; in arch_perf_current_stack_trace()
69 buf[idx++] = (uintptr_t)esf->mepc; in arch_perf_current_stack_trace()
78 buf[idx++] = (uintptr_t)esf->ra; in arch_perf_current_stack_trace()
87 if (!in_text_region((uintptr_t)fp[-1])) { in arch_perf_current_stack_trace()
91 buf[idx++] = (uintptr_t)fp[-1]; in arch_perf_current_stack_trace()
92 new_fp = (void **)fp[-2]; in arch_perf_current_stack_trace()
95 * anti-infinity-loop if in arch_perf_current_stack_trace()