Lines Matching +full:arm +full:- +full:linux +full:- +full:user
2 * arm signal functions
24 * Compare to arm/arm/machdep.c sendsig()
40 * lr = sigtramp at base of user stack in set_sigtramp_args()
43 env->regs[0] = sig; in set_sigtramp_args()
44 env->regs[1] = frame_addr + in set_sigtramp_args()
46 env->regs[2] = frame_addr + in set_sigtramp_args()
50 env->regs[5] = frame_addr + in set_sigtramp_args()
52 env->regs[TARGET_REG_PC] = ka->_sa_handler & ~1; in set_sigtramp_args()
53 env->regs[TARGET_REG_SP] = frame_addr; in set_sigtramp_args()
54 env->regs[TARGET_REG_LR] = TARGET_PS_STRINGS - TARGET_SZSIGCODE; in set_sigtramp_args()
58 cpsr_write(env, (ka->_sa_handler & 1) * CPSR_T, CPSR_T, CPSRWriteByInstr); in set_sigtramp_args()
66 /* see sendsig and get_vfpcontext in sys/arm/arm/exec_machdep.c */ in get_vfpcontext()
67 target_mcontext_vfp_t *vfp = &frame->sf_vfp; in get_vfpcontext()
68 target_mcontext_t *mcp = &frame->sf_uc.uc_mcontext; in get_vfpcontext()
72 vfp->mcv_reg[i] = tswap64(*aa32_vfp_dreg(env, i)); in get_vfpcontext()
74 vfp->mcv_fpscr = tswap32(vfp_get_fpscr(env)); in get_vfpcontext()
75 mcp->mc_vfp_size = tswap32(sizeof(*vfp)); in get_vfpcontext()
76 mcp->mc_vfp_ptr = tswap32(frame_addr + ((uintptr_t)vfp - (uintptr_t)frame)); in get_vfpcontext()
81 * Compare to arm/arm/exec_machdep.c get_mcontext()
82 * Assumes that the memory is locked if mcp points to user memory.
86 uint32_t *gr = mcp->__gregs; in get_mcontext()
93 gr[TARGET_REG_R0] = tswap32(env->regs[0]); in get_mcontext()
96 gr[TARGET_REG_R1] = tswap32(env->regs[1]); in get_mcontext()
97 gr[TARGET_REG_R2] = tswap32(env->regs[2]); in get_mcontext()
98 gr[TARGET_REG_R3] = tswap32(env->regs[3]); in get_mcontext()
99 gr[TARGET_REG_R4] = tswap32(env->regs[4]); in get_mcontext()
100 gr[TARGET_REG_R5] = tswap32(env->regs[5]); in get_mcontext()
101 gr[TARGET_REG_R6] = tswap32(env->regs[6]); in get_mcontext()
102 gr[TARGET_REG_R7] = tswap32(env->regs[7]); in get_mcontext()
103 gr[TARGET_REG_R8] = tswap32(env->regs[8]); in get_mcontext()
104 gr[TARGET_REG_R9] = tswap32(env->regs[9]); in get_mcontext()
105 gr[TARGET_REG_R10] = tswap32(env->regs[10]); in get_mcontext()
106 gr[TARGET_REG_R11] = tswap32(env->regs[11]); in get_mcontext()
107 gr[TARGET_REG_R12] = tswap32(env->regs[12]); in get_mcontext()
109 gr[TARGET_REG_SP] = tswap32(env->regs[13]); in get_mcontext()
110 gr[TARGET_REG_LR] = tswap32(env->regs[14]); in get_mcontext()
111 gr[TARGET_REG_PC] = tswap32(env->regs[15]); in get_mcontext()
118 mcp->mc_vfp_size = 0; in get_mcontext()
119 mcp->mc_vfp_ptr = 0; in get_mcontext()
120 memset(&mcp->mc_spare, 0, sizeof(mcp->mc_spare)); in get_mcontext()
126 * Compare to arm/arm/exec_machdep.c sendsig()
127 * Assumes that the memory is locked if frame points to user memory.
132 target_mcontext_t *mcp = &frame->sf_uc.uc_mcontext; in setup_sigframe_arch()
139 /* Compare to arm/arm/exec_machdep.c set_mcontext() */
143 const uint32_t *gr = mcp->__gregs; in set_mcontext()
149 * Only allow certain bits to change, reject attempted changes to non-user in set_mcontext()
150 * bits. In addition, make sure we're headed for user mode and none of the in set_mcontext()
154 return -TARGET_EINVAL; in set_mcontext()
158 return -TARGET_EINVAL; in set_mcontext()
172 if (mcp->mc_vfp_size != 0 && mcp->mc_vfp_size != sizeof(target_mcontext_vfp_t)) { in set_mcontext()
173 return -TARGET_EINVAL; in set_mcontext()
176 env->regs[0] = tswap32(gr[TARGET_REG_R0]); in set_mcontext()
177 env->regs[1] = tswap32(gr[TARGET_REG_R1]); in set_mcontext()
178 env->regs[2] = tswap32(gr[TARGET_REG_R2]); in set_mcontext()
179 env->regs[3] = tswap32(gr[TARGET_REG_R3]); in set_mcontext()
180 env->regs[4] = tswap32(gr[TARGET_REG_R4]); in set_mcontext()
181 env->regs[5] = tswap32(gr[TARGET_REG_R5]); in set_mcontext()
182 env->regs[6] = tswap32(gr[TARGET_REG_R6]); in set_mcontext()
183 env->regs[7] = tswap32(gr[TARGET_REG_R7]); in set_mcontext()
184 env->regs[8] = tswap32(gr[TARGET_REG_R8]); in set_mcontext()
185 env->regs[9] = tswap32(gr[TARGET_REG_R9]); in set_mcontext()
186 env->regs[10] = tswap32(gr[TARGET_REG_R10]); in set_mcontext()
187 env->regs[11] = tswap32(gr[TARGET_REG_R11]); in set_mcontext()
188 env->regs[12] = tswap32(gr[TARGET_REG_R12]); in set_mcontext()
190 env->regs[13] = tswap32(gr[TARGET_REG_SP]); in set_mcontext()
191 env->regs[14] = tswap32(gr[TARGET_REG_LR]); in set_mcontext()
192 env->regs[15] = tswap32(gr[TARGET_REG_PC] & ~mask); in set_mcontext()
193 if (mcp->mc_vfp_size != 0 && mcp->mc_vfp_ptr != 0) { in set_mcontext()
194 /* see set_vfpcontext in sys/arm/arm/exec_machdep.c */ in set_mcontext()
197 vfp = lock_user(VERIFY_READ, mcp->mc_vfp_ptr, sizeof(*vfp), 1); in set_mcontext()
199 __get_user(*aa32_vfp_dreg(env, i), &vfp->mcv_reg[i]); in set_mcontext()
201 __get_user(fpscr, &vfp->mcv_fpscr); in set_mcontext()
203 unlock_user(vfp, mcp->mc_vfp_ptr, sizeof(target_ucontext_t)); in set_mcontext()
206 * linux-user sets fpexc, fpinst and fpinst2, but these aren't in in set_mcontext()
215 /* Compare to arm/arm/machdep.c sys_sigreturn() */