/* The insnslot_?arg_rflags() functions below are to keep the msr -> *fn -> mrs instruction sequences indivisible so that the state of the CPSR flags aren't inadvertently modified just before or just after the call.  */
static long __kprobes insnslot_0arg_rflags(long cpsr, insn_0arg_fn_t *fn)
/* The insnslot_?arg_rflags() functions below are to keep the msr -> *fn -> mrs instruction sequences indivisible so that the state of the CPSR flags aren't inadvertently modified just before or just after the call.  */
static long __kprobes insnslot_0arg_rflags(long cpsr, insn_0arg_fn_t *fn)
{
	register long ret asm("r0");
	__asm__ __volatile__ (
		"msr	cpsr_fs, %[cpsr]	\n\t"
		"mov	lr, pc			\n\t"
		"mov	pc, %[fn]		\n\t"
		: "=r" (ret)
		: [cpsr] "r" (cpsr), [fn] "r" (fn)
		: "lr", "cc"
	);
	return ret;
}