|
|
1.1 root 1: /*
2: * This is the co-expression context switch for the VAX-11 operating
3: * under Berkeley 4.3bsd. It should work for 4.1 and 4.2,
4: */
5:
6: /*
7: * coswitch
8: */
9:
10: /* >coswitch */
11: coswitch(old_cs, new_cs, first)
12: int *old_cs, *new_cs;
13: int first;
14: {
15: asm(" movl 4(ap),r0");
16: asm(" movl 8(ap),r1");
17: asm(" movl sp,0(r0)");
18: asm(" movl fp,4(r0)");
19: asm(" movl ap,8(r0)");
20: asm(" movl r11,16(r0)");
21: asm(" movl r10,20(r0)");
22: asm(" movl r9,24(r0)");
23: asm(" movl r8,28(r0)");
24: asm(" movl r7,32(r0)");
25: asm(" movl r6,36(r0)");
26: if (first == 0) { /* this is first activation */
27: asm(" movl 0(r1),sp");
28: asm(" clrl fp");
29: asm(" clrl ap");
30: interp(0, 0);
31: syserr("interp() returned in coswitch");
32: }
33: else {
34: asm(" movl 0(r1),sp");
35: asm(" movl 4(r1),fp");
36: asm(" movl 8(r1),ap");
37: asm(" movl 16(r1),r11");
38: asm(" movl 20(r1),r10");
39: asm(" movl 24(r1),r9");
40: asm(" movl 28(r1),r8");
41: asm(" movl 32(r1),r7");
42: asm(" movl 36(r1),r6");
43: }
44: }
45: /* <coswitch */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.