/*
 * This file contains the fixes which need to be made
 * to /usr/sys/sys/trap.c in order to make the new
 * backup() work. The first part is simply 
 * a declaration of `backsp'.
 * The second part goes in the main switch statement
 * (the bit beginning `case 9+USER:'), and ensures
 * that the stack-pointer passed to grow() is held in
 * global variable `backsp', so that it can be modified
 * by the new backup routine.
 */


First part (line 23):

> /*
>  * In case of segmentation violations SP is stored in backsp to allow
>  * modification by the backup routine in m.c. This trick is
>  * only necessary for some of the machines without I and D space.
>  */
> int	backsp;
> 

Second part (line 168):

< 	case 9+USER: /* segmentation exception */
< 	{
< 	int	osp;
< 
< 		osp = sp;
< 		if(backup(u.u_ar0) == 0)
< 			if(grow((unsigned)osp))
< 				goto out;
< 		i = SIGSEG;
< 		break;
< 	}
---
> 	case 9+USER: /* segmentation exception */
> 		backsp = sp;
> 		if(backup(u.u_ar0) == 0)
> 			if(grow((unsigned)backsp))
> 				goto out;
> 		i = SIGSEG;
> 		break;
