setup_return(CPUARMState *env, struct target_sigaction *ka,

	     abi_ulong *rc, abi_ulong frame_addr, int usig, abi_ulong rc_addr)

{

	abi_ulong handler = ka->_sa_handler;

	abi_ulong retcode;

	int thumb = handler & 1;

	uint32_t cpsr = cpsr_read(env);



	cpsr &= ~CPSR_IT;

	if (thumb) {

		cpsr |= CPSR_T;

	} else {

		cpsr &= ~CPSR_T;

	}



	if (ka->sa_flags & TARGET_SA_RESTORER) {

		retcode = ka->sa_restorer;

	} else {

		unsigned int idx = thumb;



		if (ka->sa_flags & TARGET_SA_SIGINFO)

			idx += 2;



		if (__put_user(retcodes[idx], rc))

			return 1;



		retcode = rc_addr + thumb;

	}



	env->regs[0] = usig;

	env->regs[13] = frame_addr;

	env->regs[14] = retcode;

	env->regs[15] = handler & (thumb ? ~1 : ~3);

	cpsr_write(env, cpsr, 0xffffffff);



	return 0;

}

setup_return(CPUARMState *env, struct target_sigaction *ka,

	     abi_ulong *rc, abi_ulong frame_addr, int usig, abi_ulong rc_addr)

{

	abi_ulong handler = ka->_sa_handler;

	abi_ulong retcode;

	int thumb = handler & 1;

	uint32_t cpsr = cpsr_read(env);



	cpsr &= ~CPSR_IT;

	if (thumb) {

		cpsr |= CPSR_T;

	} else {

		cpsr &= ~CPSR_T;

	}



	if (ka->sa_flags & TARGET_SA_RESTORER) {

		retcode = ka->sa_restorer;

	} else {

		unsigned int idx = thumb;



		if (ka->sa_flags & TARGET_SA_SIGINFO)

			idx += 2;



		if (__put_user(retcodes[idx], rc))

			return 1;



		retcode = rc_addr + thumb;

	}



	env->regs[0] = usig;

	env->regs[13] = frame_addr;

	env->regs[14] = retcode;

	env->regs[15] = handler & (thumb ? ~1 : ~3);

	cpsr_write(env, cpsr, 0xffffffff);



	return 0;

}

		if (__put_user(retcodes[idx], rc)) 			return 1; 	return 0;
FUNC_0(CPUARMState *VAR_0, struct target_sigaction *VAR_1,

	     abi_ulong *VAR_2, abi_ulong VAR_3, int VAR_4, abi_ulong VAR_5)

{

	abi_ulong handler = VAR_1->_sa_handler;

	abi_ulong retcode;

	int VAR_6 = handler & 1;

	uint32_t cpsr = cpsr_read(VAR_0);



	cpsr &= ~CPSR_IT;

	if (VAR_6) {

		cpsr |= CPSR_T;

	} else {

		cpsr &= ~CPSR_T;

	}



	if (VAR_1->sa_flags & TARGET_SA_RESTORER) {

		retcode = VAR_1->sa_restorer;

	} else {

		unsigned int VAR_7 = VAR_6;



		if (VAR_1->sa_flags & TARGET_SA_SIGINFO)

			VAR_7 += 2;



		if (__put_user(retcodes[VAR_7], VAR_2))

			return 1;



		retcode = VAR_5 + VAR_6;

	}



	VAR_0->regs[0] = VAR_4;

	VAR_0->regs[13] = VAR_3;

	VAR_0->regs[14] = retcode;

	VAR_0->regs[15] = handler & (VAR_6 ? ~1 : ~3);

	cpsr_write(VAR_0, cpsr, 0xffffffff);



	return 0;

}

FUNC_0(CPUARMState *VAR_0, struct target_sigaction *VAR_1,
abi_ulong *VAR_2, abi_ulong VAR_3, int VAR_4, abi_ulong VAR_5)
{ abi_ulong handler = VAR_1->_sa_handler; abi_ulong retcode; int VAR_6 = handler & 1; uint32_t cpsr = cpsr_read(VAR_0); cpsr &= ~CPSR_IT; if (VAR_6) { cpsr |= CPSR_T; } else { cpsr &= ~CPSR_T; } if (VAR_1->sa_flags & TARGET_SA_RESTORER) { retcode = VAR_1->sa_restorer; } else { unsigned int VAR_7 = VAR_6; if (VAR_1->sa_flags & TARGET_SA_SIGINFO)
VAR_7 += 2; if (__put_user(retcodes[VAR_7], VAR_2))
return 1; retcode = VAR_5 + VAR_6; } VAR_0->regs[0] = VAR_4; VAR_0->regs[13] = VAR_3; VAR_0->regs[14] = retcode; VAR_0->regs[15] = handler & (VAR_6 ? ~1 : ~3); cpsr_write(VAR_0, cpsr, 0xffffffff); return 0; }