/* Write contents of register REGNO in task TASK.  */
static int put_reg(struct task_struct *task, int regno, unsigned long data)
/* Write contents of register REGNO in task TASK.  */
static int put_reg(struct task_struct *task, int regno, unsigned long data)
{
	unsigned long *addr;
	if (regno == PT_USP)
		addr = &task->thread.usp;
	else if (regno < ARRAY_SIZE(regoff))
		addr = (unsigned long *) (task->thread.esp0 + regoff[regno]);
	else
		return -1;
	*addr = data;
	return 0;
}