1 #if !defined(__MRDUMP_PRIVATE_H__)
3 static inline void mrdump_save_current_backtrace(struct pt_regs
*regs
)
6 asm volatile("stmia %1, {r0 - r15}\n\t"
8 : "=r"(regs
->uregs
[16])
11 #elif defined(__aarch64__)
13 asm volatile("stp x0, x1, [%0] \n\t"
14 "stp x2, x3, [%0, #16] \n\t"
15 "stp x4, x5, [%0, #32] \n\t"
16 "stp x6, x7, [%0, #48] \n\t"
17 "stp x8, x9, [%0, #64] \n\t"
18 "stp x10, x11, [%0, #80] \n\t"
19 "stp x12, x13, [%0, #96] \n\t"
20 "stp x14, x15, [%0, #112] \n\t"
21 "stp x16, x17, [%0, #128] \n\t"
22 "stp x18, x19, [%0, #144] \n\t"
23 "stp x20, x21, [%0, #160] \n\t"
24 "stp x22, x23, [%0, #176] \n\t"
25 "stp x24, x25, [%0, #192] \n\t"
26 "stp x26, x27, [%0, #208] \n\t"
27 "stp x28, x29, [%0, #224] \n\t"
28 "str x30, [%0, #240] \n\t"
30 :"r" (®s
->user_regs
)
32 asm volatile("mov x8, sp \n\t"
38 :"r" (®s
->user_regs
.sp
), "r" (®s
->user_regs
.pc
)
41 #error "Unsupport archtecture"