source: icGREP/icgrep-devel/cudd-2.5.1/util/state.c @ 5820

Last change on this file since 5820 was 4597, checked in by nmedfort, 4 years ago

Upload of the CUDD library.

File size: 2.0 KB
Line 
1#ifdef lint
2util_restart_save_state()
3{
4    return 0;
5}
6
7
8util_restart_restore_state()
9{
10}
11
12#else
13
14static char rcsid[] = "$Id: state.c,v 1.1 1997/11/04 22:38:50 fabio Exp $";
15
16#ifdef vax
17int util_restart_state[32];
18
19util_restart_save_state()
20{
21    asm("movl   sp,_util_save_sp");
22    asm("movl   r1,_util_restart_state");
23    asm("movl   r2,_util_restart_state+4");
24    asm("movl   r3,_util_restart_state+8");
25    asm("movl   r4,_util_restart_state+12");
26    asm("movl   r5,_util_restart_state+16");
27    asm("movl   r6,_util_restart_state+20");
28    asm("movl   r7,_util_restart_state+24");
29    asm("movl   r8,_util_restart_state+28");
30    asm("movl   r9,_util_restart_state+32");
31    asm("movl   r10,_util_restart_state+36");
32    asm("movl   r11,_util_restart_state+40");
33    asm("movl   8(fp),_util_restart_state+44");
34    asm("movl   12(fp),_util_restart_state+48");
35    asm("movl   16(fp),_util_restart_state+52");
36    asm("movl   $0,r0");
37}
38
39util_restart_restore_state()
40{
41    asm("movl   _util_restart_state,r1");
42    asm("movl   _util_restart_state+4,r2");
43    asm("movl   _util_restart_state+8,r3");
44    asm("movl   _util_restart_state+12,r4");
45    asm("movl   _util_restart_state+16,r5");
46    asm("movl   _util_restart_state+20,r6");
47    asm("movl   _util_restart_state+24,r7");
48    asm("movl   _util_restart_state+28,r8");
49    asm("movl   _util_restart_state+32,r9");
50    asm("movl   _util_restart_state+36,r10");
51    asm("movl   _util_restart_state+40,r11");
52    asm("movl   _util_restart_state+44,ap");
53    asm("movl   _util_restart_state+48,fp");
54    asm("addl3  fp,$4,sp");
55    asm("movl   _util_restart_state+52,r0");
56    asm("jmp    (r0)");
57}
58#endif
59
60
61#if defined(sun) && ! defined(sparc)
62int util_restart_state[32];
63
64util_restart_save_state()
65{
66    asm("movel  sp,_util_save_sp");
67    asm("movel  sp@,_util_restart_state");
68    asm("movel  sp@(0x4),_util_restart_state+4");
69    asm("moveml #0xFFFF,_util_restart_state+8");
70    return 0;
71}
72
73util_restart_restore_state()
74{
75    asm("moveml _util_restart_state+8,#0xFFFF");
76    asm("movel  _util_restart_state+4,sp@(0x4)");
77    asm("movel  _util_restart_state,sp@");
78    return 1;
79}
80#endif
81
82#endif
Note: See TracBrowser for help on using the repository browser.