You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.0 KiB

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