1 struct arm_pt_regs { 2 uint32_t uregs[18]; 3 }; 4 #define ARM_cpsr uregs[16] 5 #define ARM_pc uregs[15] 6 #define ARM_lr uregs[14] 7 #define ARM_sp uregs[13] 8 #define ARM_ip uregs[12] 9 #define ARM_fp uregs[11] 10 #define ARM_r10 uregs[10] 11 #define ARM_r9 uregs[9] 12 #define ARM_r8 uregs[8] 13 #define ARM_r7 uregs[7] 14 #define ARM_r6 uregs[6] 15 #define ARM_r5 uregs[5] 16 #define ARM_r4 uregs[4] 17 #define ARM_r3 uregs[3] 18 #define ARM_r2 uregs[2] 19 #define ARM_r1 uregs[1] 20 #define ARM_r0 uregs[0] 21 #define ARM_ORIG_r0 uregs[17] 22 23 static union { 24 struct user_pt_regs aarch64_r; 25 struct arm_pt_regs arm_r; 26 } arm_regs_union; 27 #define aarch64_regs arm_regs_union.aarch64_r 28 #define arm_regs arm_regs_union.arm_r 29 30 uint64_t *const aarch64_sp_ptr = (uint64_t *) &aarch64_regs.sp; 31 uint32_t *const arm_sp_ptr = &arm_regs.ARM_sp; 32 static struct iovec aarch64_io = { 33 .iov_base = &arm_regs_union 34 }; 35 36 #define ARCH_REGS_FOR_GETREGSET arm_regs_union 37 #define ARCH_IOVEC_FOR_GETREGSET aarch64_io 38 #define ARCH_PC_REG ((aarch64_io.iov_len == sizeof(arm_regs)) ? arm_regs.ARM_pc : aarch64_regs.pc) 39 40 #define ARCH_PERSONALITY_0_IOV_SIZE sizeof(aarch64_regs) 41 #define ARCH_PERSONALITY_1_IOV_SIZE sizeof(arm_regs) 42