/* Get contents of register REGNO in task TASK.  */
static long get_reg(struct task_struct *task, int regno)
/* Get contents of register REGNO in task TASK.  */
static long get_reg(struct task_struct *task, int regno)
{
	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 0;
	return *addr;
}